From: Timothy Arceri Date: Wed, 31 Jul 2019 03:57:16 +0000 (+1000) Subject: radv: for secure compile exit early from radv_shader_variant_create() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07692f703ffe70655f6b3dcb492894d73ce1e972;p=mesa.git 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 --- 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) {