Skip to content

Commit 81900e3

Browse files
llandwerlin-inteljlahtine-intel
authored andcommitted
drm/i915: disable sampler indirect state in bindless heap
By default the indirect state sampler data (border colors) are stored in the same heap as the SAMPLER_STATE structure. For userspace drivers that can be 2 different heaps (dynamic state heap & bindless sampler state heap). This means that border colors have to copied in 2 different places so that the same SAMPLER_STATE structure find the right data. This change is forcing the indirect state sampler data to only be in the dynamic state pool (more convenient for userspace drivers, they only have to have one copy of the border colors). This is reproducing the behavior of the Windows drivers. BSpec: 46052 Signed-off-by: Lionel Landwerlin <[email protected]> Cc: [email protected] Reviewed-by: Haridhar Kalvala <[email protected]> Signed-off-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 16fc9c0) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 55bf149 commit 81900e3

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

drivers/gpu/drm/i915/gt/intel_gt_regs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,7 @@
11451145
#define SC_DISABLE_POWER_OPTIMIZATION_EBB REG_BIT(9)
11461146
#define GEN11_SAMPLER_ENABLE_HEADLESS_MSG REG_BIT(5)
11471147
#define MTL_DISABLE_SAMPLER_SC_OOO REG_BIT(3)
1148+
#define GEN11_INDIRECT_STATE_BASE_ADDR_OVERRIDE REG_BIT(0)
11481149

11491150
#define GEN9_HALF_SLICE_CHICKEN7 MCR_REG(0xe194)
11501151
#define DG2_DISABLE_ROUND_ENABLE_ALLOW_FOR_SSLA REG_BIT(15)

drivers/gpu/drm/i915/gt/intel_workarounds.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2971,6 +2971,25 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
29712971

29722972
add_render_compute_tuning_settings(i915, wal);
29732973

2974+
if (GRAPHICS_VER(i915) >= 11) {
2975+
/* This is not a Wa (although referred to as
2976+
* WaSetInidrectStateOverride in places), this allows
2977+
* applications that reference sampler states through
2978+
* the BindlessSamplerStateBaseAddress to have their
2979+
* border color relative to DynamicStateBaseAddress
2980+
* rather than BindlessSamplerStateBaseAddress.
2981+
*
2982+
* Otherwise SAMPLER_STATE border colors have to be
2983+
* copied in multiple heaps (DynamicStateBaseAddress &
2984+
* BindlessSamplerStateBaseAddress)
2985+
*
2986+
* BSpec: 46052
2987+
*/
2988+
wa_mcr_masked_en(wal,
2989+
GEN10_SAMPLER_MODE,
2990+
GEN11_INDIRECT_STATE_BASE_ADDR_OVERRIDE);
2991+
}
2992+
29742993
if (IS_MTL_GRAPHICS_STEP(i915, M, STEP_B0, STEP_FOREVER) ||
29752994
IS_MTL_GRAPHICS_STEP(i915, P, STEP_B0, STEP_FOREVER))
29762995
/* Wa_14017856879 */

0 commit comments

Comments
 (0)