spirv: Add support for using derefs for UBO/SSBO access

For now, it's hidden behind a cap.  Hopefully, we can eventually drop
that along with all the manual offset code in spirv_to_nir.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Jason Ekstrand
2018-12-14 18:36:01 -06:00
committed by Jason Ekstrand
parent 3a7c5667c8
commit 63b9aa2e25
9 changed files with 273 additions and 68 deletions

View File

@@ -135,6 +135,7 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
struct spirv_to_nir_options spirv_options = {
.lower_workgroup_access_to_offsets = true,
.lower_ubo_ssbo_access_to_offsets = true,
.caps = {
.float64 = device->instance->physicalDevice.info.gen >= 8,
.int64 = device->instance->physicalDevice.info.gen >= 8,