Mesa (main): d3d12: Only force point sampling for emulated shadow samplers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 10 23:49:35 UTC 2022


Module: Mesa
Branch: main
Commit: 9dba60f397fe4283df7bdfbe23e6bfd959199e76
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9dba60f397fe4283df7bdfbe23e6bfd959199e76

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Thu Feb 10 12:58:18 2022 -0800

d3d12: Only force point sampling for emulated shadow samplers

Reviewed-by: Bill Kristiansen <billkris at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14981>

---

 src/gallium/drivers/d3d12/ci/d3d12-quick_gl.txt | 6 ++++--
 src/gallium/drivers/d3d12/d3d12_context.cpp     | 7 ++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/d3d12/ci/d3d12-quick_gl.txt b/src/gallium/drivers/d3d12/ci/d3d12-quick_gl.txt
index 2e9c0774a56..7884466698a 100644
--- a/src/gallium/drivers/d3d12/ci/d3d12-quick_gl.txt
+++ b/src/gallium/drivers/d3d12/ci/d3d12-quick_gl.txt
@@ -200,6 +200,7 @@ spec/!opengl 2.0/max-samplers: fail
 spec/!opengl 2.0/max-samplers border: fail
 spec/!opengl 3.0/bound-resource-limits: fail
 spec/!opengl 3.0/required-sized-texture-formats: fail
+spec/!opengl 3.0/sampler-cube-shadow: fail
 spec/!opengl 3.1/default-vao: fail
 spec/!opengl 3.1/draw-buffers-errors: skip
 spec/!opengl 3.1/genned-names: fail
@@ -1679,6 +1680,7 @@ spec/arb_texture_cube_map/copyteximage cube samples=4: skip
 spec/arb_texture_cube_map/copyteximage cube samples=6: skip
 spec/arb_texture_cube_map/copyteximage cube samples=8: skip
 spec/arb_texture_cube_map_array/arb_texture_cube_map_array-cubemap: fail
+spec/arb_texture_cube_map_array/arb_texture_cube_map_array-sampler-cube-array-shadow: fail
 spec/arb_texture_float/multisample-formats 32 gl_arb_texture_float: skip
 spec/arb_texture_gather/texturegather/fs-r-none-float-2d: fail
 spec/arb_texture_gather/texturegather/fs-r-none-float-2darray: fail
@@ -3525,8 +3527,8 @@ wgl/wgl-sanity: skip
 summary:
        name:  results
        ----  --------
-       pass:    17841
-       fail:     2046
+       pass:    17839
+       fail:     2048
       crash:        7
        skip:     1452
     timeout:        0
diff --git a/src/gallium/drivers/d3d12/d3d12_context.cpp b/src/gallium/drivers/d3d12/d3d12_context.cpp
index cf83512e388..1fe2195d296 100644
--- a/src/gallium/drivers/d3d12/d3d12_context.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_context.cpp
@@ -653,14 +653,13 @@ d3d12_create_sampler_state(struct pipe_context *pctx,
 
    if (state->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
       desc.ComparisonFunc = compare_op((pipe_compare_func) state->compare_func);
-      desc.Filter = D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT;
    } else if (state->compare_mode == PIPE_TEX_COMPARE_NONE) {
       desc.ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
-      desc.Filter = get_filter(state);
    } else
       unreachable("unexpected comparison mode");
 
    desc.MaxAnisotropy = state->max_anisotropy;
+   desc.Filter = get_filter(state);
 
    desc.AddressU = sampler_address_mode((pipe_tex_wrap) state->wrap_s,
                                         (pipe_tex_filter) state->min_img_filter);
@@ -677,9 +676,7 @@ d3d12_create_sampler_state(struct pipe_context *pctx,
 
    if (state->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
       desc.ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
-      struct pipe_sampler_state fake_state = *state;
-      fake_state.compare_mode = PIPE_TEX_COMPARE_NONE;
-      desc.Filter = get_filter(&fake_state);
+      desc.Filter = D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT;
 
       d3d12_descriptor_pool_alloc_handle(ctx->sampler_pool,
                                          &ss->handle_without_shadow);



More information about the mesa-commit mailing list