diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-05-01 14:15:32 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-05-20 10:53:38 -0700 |
commit | 31a7476335f911ae4fc95b77b6badc83bacacfb3 (patch) | |
tree | dc957d0bb9d821b2471d7327bd50d07e07fb4225 /src/intel/vulkan/anv_pipeline.c | |
parent | 6bc9cdb1b70cadd628e441cec63b82152c93980e (diff) |
spirv, radv, anv: Replace ptr_type with addr_format
Instead of setting the glsl types of the pointers for each resource,
set the nir_address_format, from which we can derive the glsl_type,
and in the future the bit pattern representing a NULL pointer.
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 4012a6d5a71..e04f1acab4a 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -134,8 +134,6 @@ anv_shader_compile_to_nir(struct anv_device *device, } } - nir_address_format ssbo_addr_format = - anv_nir_ssbo_addr_format(pdevice, device->robust_buffer_access); struct spirv_to_nir_options spirv_options = { .lower_workgroup_access_to_offsets = true, .caps = { @@ -172,11 +170,17 @@ anv_shader_compile_to_nir(struct anv_device *device, .transform_feedback = pdevice->info.gen >= 8, .variable_pointers = true, }, - .ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2), - .ssbo_ptr_type = nir_address_format_to_glsl_type(ssbo_addr_format), - .phys_ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT64, 1), - .push_const_ptr_type = glsl_uint_type(), - .shared_ptr_type = glsl_uint_type(), + .ubo_addr_format = nir_address_format_32bit_index_offset, + .ssbo_addr_format = + anv_nir_ssbo_addr_format(pdevice, device->robust_buffer_access), + .phys_ssbo_addr_format = nir_address_format_64bit_global, + .push_const_addr_format = nir_address_format_logical, + + /* TODO: Consider changing this to an address format that has the NULL + * pointer equals to 0. That might be a better format to play nice + * with certain code / code generators. + */ + .shared_addr_format = nir_address_format_32bit_offset, }; |