diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index ca21bcdd158..f34aeadd6fa 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -58,11 +58,6 @@ enum iris_param_domain { BRW_PARAM_DOMAIN_IMAGE, }; -enum iris_shader_reloc { - IRIS_SHADER_RELOC_CONST_DATA_ADDR_LOW, - IRIS_SHADER_RELOC_CONST_DATA_ADDR_HIGH, -}; - enum { DRI_CONF_BO_REUSE_DISABLED, DRI_CONF_BO_REUSE_ALL diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index ec3c493eb0b..9e5ae7aebd3 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -440,8 +440,8 @@ iris_setup_uniforms(const struct brw_compiler *compiler, offset = nir_umin(&b, offset, nir_imm_int(&b, max_offset)); nir_ssa_def *const_data_base_addr = nir_pack_64_2x32_split(&b, - nir_load_reloc_const_intel(&b, IRIS_SHADER_RELOC_CONST_DATA_ADDR_LOW), - nir_load_reloc_const_intel(&b, IRIS_SHADER_RELOC_CONST_DATA_ADDR_HIGH)); + nir_load_reloc_const_intel(&b, BRW_SHADER_RELOC_CONST_DATA_ADDR_LOW), + nir_load_reloc_const_intel(&b, BRW_SHADER_RELOC_CONST_DATA_ADDR_HIGH)); nir_ssa_def *data = nir_load_global(&b, nir_iadd(&b, const_data_base_addr, diff --git a/src/gallium/drivers/iris/iris_program_cache.c b/src/gallium/drivers/iris/iris_program_cache.c index 5388615c47e..36faeefd91f 100644 --- a/src/gallium/drivers/iris/iris_program_cache.c +++ b/src/gallium/drivers/iris/iris_program_cache.c @@ -145,11 +145,11 @@ iris_upload_shader(struct iris_screen *screen, struct brw_shader_reloc_value reloc_values[] = { { - .id = IRIS_SHADER_RELOC_CONST_DATA_ADDR_LOW, + .id = BRW_SHADER_RELOC_CONST_DATA_ADDR_LOW, .value = shader_data_addr, }, { - .id = IRIS_SHADER_RELOC_CONST_DATA_ADDR_HIGH, + .id = BRW_SHADER_RELOC_CONST_DATA_ADDR_HIGH, .value = shader_data_addr >> 32, }, }; diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index 3152dc3005a..65a0b57af8b 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -675,6 +675,11 @@ enum brw_param_builtin { #define BRW_PARAM_BUILTIN_CLIP_PLANE_COMP(param) \ (((param) - BRW_PARAM_BUILTIN_CLIP_PLANE_0_X) & 0x3) +enum brw_shader_reloc_id { + BRW_SHADER_RELOC_CONST_DATA_ADDR_LOW, + BRW_SHADER_RELOC_CONST_DATA_ADDR_HIGH, +}; + /** Represents a code relocation * * Relocatable constants are immediates in the code which we want to be able diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index e642ce1ec50..0745e59e627 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -1079,8 +1079,8 @@ lower_load_constant(nir_builder *b, nir_intrinsic_instr *intrin, offset = nir_umin(b, offset, nir_imm_int(b, max_offset)); nir_ssa_def *const_data_base_addr = nir_pack_64_2x32_split(b, - nir_load_reloc_const_intel(b, ANV_SHADER_RELOC_CONST_DATA_ADDR_LOW), - nir_load_reloc_const_intel(b, ANV_SHADER_RELOC_CONST_DATA_ADDR_HIGH)); + nir_load_reloc_const_intel(b, BRW_SHADER_RELOC_CONST_DATA_ADDR_LOW), + nir_load_reloc_const_intel(b, BRW_SHADER_RELOC_CONST_DATA_ADDR_HIGH)); data = nir_load_global_constant(b, nir_iadd(b, const_data_base_addr, nir_u2u64(b, offset)), diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index dc4d12379a3..b2491c27877 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -84,11 +84,11 @@ anv_shader_bin_create(struct anv_device *device, struct brw_shader_reloc_value reloc_values[] = { { - .id = ANV_SHADER_RELOC_CONST_DATA_ADDR_LOW, + .id = BRW_SHADER_RELOC_CONST_DATA_ADDR_LOW, .value = shader_data_addr, }, { - .id = ANV_SHADER_RELOC_CONST_DATA_ADDR_HIGH, + .id = BRW_SHADER_RELOC_CONST_DATA_ADDR_HIGH, .value = shader_data_addr >> 32, }, }; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 6d4b08b6d05..7f454a205f8 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3364,11 +3364,6 @@ void anv_semaphore_reset_temporary(struct anv_device *device, stage = __builtin_ffs(__tmp) - 1, __tmp; \ __tmp &= ~(1 << (stage))) -enum anv_shader_reloc { - ANV_SHADER_RELOC_CONST_DATA_ADDR_LOW, - ANV_SHADER_RELOC_CONST_DATA_ADDR_HIGH, -}; - struct anv_pipeline_bind_map { unsigned char surface_sha1[20]; unsigned char sampler_sha1[20];