summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-07-31 13:57:16 +1000
committerTimothy Arceri <[email protected]>2019-10-26 13:04:12 +1100
commit07692f703ffe70655f6b3dcb492894d73ce1e972 (patch)
treef2a4b9f22865e153f5bee5d74e2680aa015dfb60 /src/amd/vulkan/radv_shader.c
parent5cd437b1ed96de1a5232cb3cc08c36517d3e8d51 (diff)
radv: for secure compile exit early from radv_shader_variant_create()
We don't have permission to be creating shared memory etc. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r--src/amd/vulkan/radv_shader.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 06e8edf9ea2..a5ad594207d 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -973,7 +973,14 @@ radv_shader_variant_create(struct radv_device *device,
variant->info = binary->info;
radv_postprocess_config(device->physical_device, &config, &binary->info,
binary->stage, &variant->config);
-
+
+ if (radv_device_use_secure_compile(device->instance)) {
+ if (binary->type == RADV_BINARY_TYPE_RTLD)
+ ac_rtld_close(&rtld_binary);
+
+ return variant;
+ }
+
void *dest_ptr = radv_alloc_shader_memory(device, variant);
if (binary->type == RADV_BINARY_TYPE_RTLD) {