anv,iris: Move the SHADER_RELOC enums to brw_compiler.h
They're common between the two drivers and we want to add a couple more that get emitted from code in src/intel/compiler. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8637>
This commit is contained in:

committed by
Marge Bot

parent
d95d5b1465
commit
f7668d6fe5
@@ -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
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
},
|
||||
};
|
||||
|
@@ -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
|
||||
|
@@ -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)),
|
||||
|
@@ -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,
|
||||
},
|
||||
};
|
||||
|
@@ -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];
|
||||
|
Reference in New Issue
Block a user