iris: modify Wa_14014414195 to use intel_needs_workaround
authorTapani Pälli <tapani.palli@intel.com>
Wed, 13 Sep 2023 05:01:04 +0000 (08:01 +0300)
committerMarge Bot <emma+marge@anholt.net>
Thu, 14 Sep 2023 04:25:48 +0000 (04:25 +0000)
Only applies to DG2, this was fixed in MTL.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25197>

src/gallium/drivers/iris/iris_state.c

index c7e3423..14166de 100644 (file)
@@ -2488,9 +2488,12 @@ iris_upload_sampler_states(struct iris_context *ice, gl_shader_stage stage)
          memset(map, 0, 4 * GENX(SAMPLER_STATE_length));
       } else {
          const uint32_t *sampler_state = state->sampler_state;
+
 #if GFX_VERx10 == 125
-         if (tex && tex->res->base.b.target == PIPE_TEXTURE_3D)
-            sampler_state = state->sampler_state_3d;
+         if (intel_needs_workaround(screen->devinfo, 14014414195) &&
+             tex && tex->res->base.b.target == PIPE_TEXTURE_3D) {
+               sampler_state = state->sampler_state_3d;
+         }
 #endif
 
          if (!state->needs_border_color) {