mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
zink: force per-sample interpolation
this gives us new rasterizer states when multisample stuff changes instead of new fs states, which is what we want since these correlate to pipeline flags, not shader-specific things Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8631>
This commit is contained in:
parent
e2500c02cc
commit
0ab9114abd
4 changed files with 7 additions and 0 deletions
|
|
@ -85,6 +85,10 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
|
|||
ms_state.alphaToCoverageEnable = state->blend_state->alpha_to_coverage;
|
||||
ms_state.alphaToOneEnable = state->blend_state->alpha_to_one;
|
||||
ms_state.pSampleMask = state->sample_mask ? &state->sample_mask : NULL;
|
||||
if (state->rast_state->force_persample_interp) {
|
||||
ms_state.sampleShadingEnable = VK_TRUE;
|
||||
ms_state.minSampleShading = 1.0;
|
||||
}
|
||||
|
||||
VkPipelineViewportStateCreateInfo viewport_state = {};
|
||||
viewport_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS:
|
||||
case PIPE_CAP_CLEAR_TEXTURE:
|
||||
case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
|
||||
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
|
||||
return 1;
|
||||
|
||||
case PIPE_CAP_MULTI_DRAW_INDIRECT:
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@ zink_create_rasterizer_state(struct pipe_context *pctx,
|
|||
assert(rs_state->depth_clip_far == rs_state->depth_clip_near);
|
||||
state->hw_state.depth_clamp = rs_state->depth_clip_near == 0;
|
||||
state->hw_state.rasterizer_discard = rs_state->rasterizer_discard;
|
||||
state->hw_state.force_persample_interp = rs_state->force_persample_interp;
|
||||
|
||||
assert(rs_state->fill_front <= PIPE_POLYGON_MODE_POINT);
|
||||
if (rs_state->fill_back != rs_state->fill_front)
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ struct zink_rasterizer_hw_state {
|
|||
VkFrontFace front_face;
|
||||
VkPolygonMode polygon_mode;
|
||||
VkCullModeFlags cull_mode;
|
||||
bool force_persample_interp;
|
||||
};
|
||||
|
||||
struct zink_rasterizer_state {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue