d3d12: Don't unnecessarily zero out gs/tcs keys
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21527>
This commit is contained in:

committed by
Marge Bot

parent
56d30bf591
commit
30883c0145
@@ -637,17 +637,19 @@ static void
|
||||
validate_geometry_shader_variant(struct d3d12_selection_context *sel_ctx)
|
||||
{
|
||||
struct d3d12_context *ctx = sel_ctx->ctx;
|
||||
d3d12_shader_selector *vs = ctx->gfx_stages[PIPE_SHADER_VERTEX];
|
||||
d3d12_shader_selector *fs = ctx->gfx_stages[PIPE_SHADER_FRAGMENT];
|
||||
struct d3d12_gs_variant_key key = {0};
|
||||
bool variant_needed = false;
|
||||
|
||||
d3d12_shader_selector *gs = ctx->gfx_stages[PIPE_SHADER_GEOMETRY];
|
||||
|
||||
/* Nothing to do if there is a user geometry shader bound */
|
||||
if (gs != NULL && !gs->is_variant)
|
||||
return;
|
||||
|
||||
d3d12_shader_selector* vs = ctx->gfx_stages[PIPE_SHADER_VERTEX];
|
||||
d3d12_shader_selector* fs = ctx->gfx_stages[PIPE_SHADER_FRAGMENT];
|
||||
|
||||
struct d3d12_gs_variant_key key{0};
|
||||
|
||||
bool variant_needed = false;
|
||||
|
||||
/* Fill the geometry shader variant key */
|
||||
if (sel_ctx->fill_mode_lowered != PIPE_POLYGON_MODE_FILL) {
|
||||
key.fill_mode = sel_ctx->fill_mode_lowered;
|
||||
@@ -688,15 +690,16 @@ static void
|
||||
validate_tess_ctrl_shader_variant(struct d3d12_selection_context *sel_ctx)
|
||||
{
|
||||
struct d3d12_context *ctx = sel_ctx->ctx;
|
||||
d3d12_shader_selector *vs = ctx->gfx_stages[PIPE_SHADER_VERTEX];
|
||||
d3d12_shader_selector *tcs = ctx->gfx_stages[PIPE_SHADER_TESS_CTRL];
|
||||
d3d12_shader_selector *tes = ctx->gfx_stages[PIPE_SHADER_TESS_EVAL];
|
||||
struct d3d12_tcs_variant_key key = {0};
|
||||
|
||||
/* Nothing to do if there is a user tess ctrl shader bound */
|
||||
if (tcs != NULL && !tcs->is_variant)
|
||||
return;
|
||||
|
||||
d3d12_shader_selector *vs = ctx->gfx_stages[PIPE_SHADER_VERTEX];
|
||||
d3d12_shader_selector *tes = ctx->gfx_stages[PIPE_SHADER_TESS_EVAL];
|
||||
struct d3d12_tcs_variant_key key = {0};
|
||||
|
||||
bool variant_needed = tes != nullptr;
|
||||
|
||||
/* Fill the variant key */
|
||||
|
Reference in New Issue
Block a user