zink: move viewport count into dynamic state1 part of pipeline hash

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12586>
This commit is contained in:
Mike Blumenkrantz
2021-06-15 09:50:26 -04:00
committed by Marge Bot
parent 94e9091ba2
commit cab68281ba
3 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -968,9 +968,9 @@ zink_set_viewport_states(struct pipe_context *pctx,
ctx->vp_state.num_viewports = start_slot + num_viewports;
if (!zink_screen(pctx->screen)->info.have_EXT_extended_dynamic_state) {
if (ctx->gfx_pipeline_state.num_viewports != ctx->vp_state.num_viewports)
if (ctx->gfx_pipeline_state.dyn_state1.num_viewports != ctx->vp_state.num_viewports)
ctx->gfx_pipeline_state.dirty = true;
ctx->gfx_pipeline_state.num_viewports = ctx->vp_state.num_viewports;
ctx->gfx_pipeline_state.dyn_state1.num_viewports = ctx->vp_state.num_viewports;
}
ctx->vp_state_changed = true;
}
+2 -2
View File
@@ -125,9 +125,9 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
VkPipelineViewportStateCreateInfo viewport_state = {0};
viewport_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
viewport_state.viewportCount = state->num_viewports;
viewport_state.viewportCount = state->dyn_state1.num_viewports;
viewport_state.pViewports = NULL;
viewport_state.scissorCount = state->num_viewports;
viewport_state.scissorCount = state->dyn_state1.num_viewports;
viewport_state.pScissors = NULL;
VkPipelineRasterizationStateCreateInfo rast_state = {0};
+1 -2
View File
@@ -49,8 +49,6 @@ struct zink_gfx_pipeline_state {
uint8_t rast_samples;
uint8_t vertices_per_patch;
unsigned num_viewports;
/* Pre-hashed value for table lookup, invalid when zero.
* Members after this point are not included in pipeline state hash key */
uint32_t hash;
@@ -59,6 +57,7 @@ struct zink_gfx_pipeline_state {
struct {
struct zink_depth_stencil_alpha_hw_state *depth_stencil_alpha_state; //non-dynamic state
VkFrontFace front_face;
unsigned num_viewports;
} dyn_state1;
bool primitive_restart; //dynamic state2