Module: Mesa Branch: master Commit: 8708d32d9c941542d9483a4102a653a652dbae39 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8708d32d9c941542d9483a4102a653a652dbae39
Author: Jesse Natalie <jenat...@microsoft.com> Date: Mon Mar 1 13:42:21 2021 -0800 d3d12: Handle is_new_style_shadow comparison filtering Note: the tex instruction is modified in place, so the correct number of expected result components needs to be cached before the shadow state is modified Reviewed-by: Bill Kristiansen <billk...@microsoft.com> Reviewed-by: Erik Faye-Lund <erik.faye-l...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349> --- src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c b/src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c index 976a58a58ae..5bf1087fd8b 100644 --- a/src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c +++ b/src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c @@ -80,6 +80,7 @@ lower_sample_tex_compare_impl(nir_builder *b, nir_instr *instr, nir_tex_instr *tex = nir_instr_as_tex(instr); sampler_state *state = (sampler_state *)options; + unsigned num_components = nir_tex_instr_result_size(tex); b->cursor = nir_after_instr(instr); tex->is_shadow = false; @@ -122,7 +123,7 @@ lower_sample_tex_compare_impl(nir_builder *b, nir_instr *instr, lookup[state->tex_swizzles[sampler->data.binding].swizzle_a] }; - result = nir_vec(b, r, nir_dest_num_components(tex->dest)); + result = nir_vec(b, r, num_components); sampler->type = strip_shadow_with_array(sampler->type); sampler_deref->type = sampler->type; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit