diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2022-06-14 17:13:20 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-30 23:46:35 +0000 |
commit | a141a351de177181e1e8a524e26357dc9c9a1a3f (patch) | |
tree | ec0a709e0216c6a919b3e0d0c97110ed382d5028 /src/gallium | |
parent | 434bc468fe308f861b7979ec9d6cede4c73db025 (diff) |
intel/compiler: Stop including src/mesa/main/config.h
src/mesa/main includes are for Mesa's OpenGL implementation, and the
compiler is used in Vulkan drivers and other tools. We really only
needed one #define, which is that we offer 32 samplers. It probably
makes more sense to have our own defined limit for that rather than
importing a project-wide value which theoretically could be adjusted,
so swap MAX_SAMPLERS for a new BRW_MAX_SAMPLERS and call it a day.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17309>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/crocus/crocus_program.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_program.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/crocus/crocus_program.c b/src/gallium/drivers/crocus/crocus_program.c index b07a4ceb20f..54c1434b061 100644 --- a/src/gallium/drivers/crocus/crocus_program.c +++ b/src/gallium/drivers/crocus/crocus_program.c @@ -49,7 +49,7 @@ #define KEY_INIT_NO_ID() \ .base.subgroup_size_type = BRW_SUBGROUP_SIZE_UNIFORM, \ - .base.tex.swizzles[0 ... MAX_SAMPLERS - 1] = 0x688, \ + .base.tex.swizzles[0 ... BRW_MAX_SAMPLERS - 1] = 0x688, \ .base.tex.compressed_multisample_layout_mask = ~0 #define KEY_INIT() \ .base.program_string_id = ish->program_id, \ @@ -60,7 +60,7 @@ static void crocus_sanitize_tex_key(struct brw_sampler_prog_key_data *key) { key->gather_channel_quirk_mask = 0; - for (unsigned s = 0; s < MAX_SAMPLERS; s++) { + for (unsigned s = 0; s < BRW_MAX_SAMPLERS; s++) { key->swizzles[s] = SWIZZLE_NOOP; key->gfx6_gather_wa[s] = 0; } diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 64097d87de2..df0cd178312 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -50,12 +50,12 @@ #define KEY_INIT(prefix) \ .prefix.program_string_id = ish->program_id, \ .prefix.limit_trig_input_range = screen->driconf.limit_trig_input_range -#define BRW_KEY_INIT(gen, prog_id, limit_trig_input) \ - .base.program_string_id = prog_id, \ - .base.limit_trig_input_range = limit_trig_input, \ - .base.subgroup_size_type = BRW_SUBGROUP_SIZE_UNIFORM, \ - .base.tex.swizzles[0 ... MAX_SAMPLERS - 1] = 0x688, \ - .base.tex.compressed_multisample_layout_mask = ~0, \ +#define BRW_KEY_INIT(gen, prog_id, limit_trig_input) \ + .base.program_string_id = prog_id, \ + .base.limit_trig_input_range = limit_trig_input, \ + .base.subgroup_size_type = BRW_SUBGROUP_SIZE_UNIFORM, \ + .base.tex.swizzles[0 ... BRW_MAX_SAMPLERS - 1] = 0x688, \ + .base.tex.compressed_multisample_layout_mask = ~0, \ .base.tex.msaa_16 = (gen >= 9 ? ~0 : 0) struct iris_threaded_compile_job { |