diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp index 856cc319d89..569d6adb847 100644 --- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp +++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp @@ -855,7 +855,8 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx, (!next || next->stage == PIPE_SHADER_FRAGMENT))) { key->last_vertex_processing_stage = 1; key->invert_depth = sel_ctx->ctx->reverse_depth_range; - if (sel_ctx->ctx->pstipple.enabled) + if (sel_ctx->ctx->pstipple.enabled && + sel_ctx->ctx->gfx_pipeline_state.rast->base.poly_stipple_enable) key->next_varying_inputs |= VARYING_BIT_POS; } @@ -882,7 +883,8 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx, key->fs.missing_dual_src_outputs = sel_ctx->missing_dual_src_outputs; key->fs.frag_result_color_lowering = sel_ctx->frag_result_color_lowering; key->fs.manual_depth_range = sel_ctx->manual_depth_range; - key->fs.polygon_stipple = sel_ctx->ctx->pstipple.enabled; + key->fs.polygon_stipple = sel_ctx->ctx->pstipple.enabled && + sel_ctx->ctx->gfx_pipeline_state.rast->base.poly_stipple_enable; key->fs.multisample_disabled = sel_ctx->ctx->gfx_pipeline_state.rast && !sel_ctx->ctx->gfx_pipeline_state.rast->desc.MultisampleEnable; if (sel_ctx->ctx->gfx_pipeline_state.blend && diff --git a/src/gallium/drivers/d3d12/d3d12_draw.cpp b/src/gallium/drivers/d3d12/d3d12_draw.cpp index d49cdf62fb9..b991aab070a 100644 --- a/src/gallium/drivers/d3d12/d3d12_draw.cpp +++ b/src/gallium/drivers/d3d12/d3d12_draw.cpp @@ -947,7 +947,7 @@ d3d12_draw_vbo(struct pipe_context *pctx, ctx->initial_api_prim = saved_mode; } - if (ctx->pstipple.enabled) + if (ctx->pstipple.enabled && ctx->gfx_pipeline_state.rast->base.poly_stipple_enable) ctx->shader_dirty[PIPE_SHADER_FRAGMENT] |= D3D12_SHADER_DIRTY_SAMPLER_VIEWS | D3D12_SHADER_DIRTY_SAMPLERS;