[Mesa-dev] [PATCH 12/12] anv: Add support for the variablePointers feature
Jason Ekstrand
jason at jlekstrand.net
Thu Oct 19 18:04:14 UTC 2017
Not to be confused with variablePointersStorageBuffer which is the
subset of VK_KHR_variable_pointers required to enable the extension.
This means we now have "full" support for variable pointers.
---
src/intel/vulkan/anv_device.c | 2 +-
src/intel/vulkan/anv_pipeline.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index a305afe..256fc41 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -699,7 +699,7 @@ void anv_GetPhysicalDeviceFeatures2KHR(
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR: {
VkPhysicalDeviceVariablePointerFeaturesKHR *features = (void *)ext;
features->variablePointersStorageBuffer = true;
- features->variablePointers = false;
+ features->variablePointers = true;
break;
}
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 92995ee..a200fec 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -124,6 +124,7 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
}
struct spirv_to_nir_options spirv_options = {
+ .lower_workgroup_access_to_offsets = true,
.caps = {
.float64 = device->instance->physicalDevice.info.gen >= 8,
.int64 = device->instance->physicalDevice.info.gen >= 8,
@@ -388,10 +389,8 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
if (stage != MESA_SHADER_COMPUTE)
NIR_PASS_V(nir, anv_nir_lower_multiview, pipeline->subpass->view_mask);
- if (stage == MESA_SHADER_COMPUTE) {
- NIR_PASS_V(nir, brw_nir_lower_cs_shared);
+ if (stage == MESA_SHADER_COMPUTE)
prog_data->total_shared = nir->num_shared;
- }
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list