Module: Mesa Branch: main Commit: a07bdf0152f4a04ec0294c90675f4fe762f21bb6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a07bdf0152f4a04ec0294c90675f4fe762f21bb6
Author: Jesse Natalie <jenat...@microsoft.com> Date: Tue Nov 7 09:04:48 2023 -0800 d3d12: Initialize shader key swizzle for non-int textures Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26104> --- src/gallium/drivers/d3d12/d3d12_compiler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp index 6682096458e..8bba7ebd2d2 100644 --- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp +++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp @@ -1113,9 +1113,10 @@ d3d12_fill_shader_key(struct d3d12_selection_context *sel_ctx, if (wrap_state.is_int_sampler) { memcpy(&key->tex_wrap_states[i], &wrap_state, sizeof(wrap_state)); key->swizzle_state[i] = sel_ctx->ctx->tex_swizzle_state[stage][i]; - } - else + } else { memset(&key->tex_wrap_states[i], 0, sizeof(key->tex_wrap_states[i])); + key->swizzle_state[i] = { PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y, PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W }; + } } }