spirv: Add explicit pointer types

Instead of baking in uvec2 for UBO and SSBO pointers and uint for push
constant and shared memory pointers, make it configurable.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
Jason Ekstrand
2018-11-28 15:20:03 -06:00
committed by Jason Ekstrand
parent be039cb467
commit adc155a815
4 changed files with 36 additions and 20 deletions

View File

@@ -158,6 +158,10 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
.storage_8bit = device->instance->physicalDevice.info.gen >= 8,
.post_depth_coverage = device->instance->physicalDevice.info.gen >= 9,
},
.ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
.ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
.push_const_ptr_type = glsl_uint_type(),
.shared_ptr_type = glsl_uint_type(),
};
nir_function *entry_point =