diff options
Diffstat (limited to 'src/amd/vulkan/radv_pipeline_cache.c')
-rw-r--r-- | src/amd/vulkan/radv_pipeline_cache.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c index 8ec1d66e9f1..bbddbbc2579 100644 --- a/src/amd/vulkan/radv_pipeline_cache.c +++ b/src/amd/vulkan/radv_pipeline_cache.c @@ -260,17 +260,21 @@ radv_sc_read_from_disk_cache(struct radv_device *device, uint8_t *disk_sha1) disk_sha1, sizeof(uint8_t) * 20); uint8_t found_cache_entry; - read(device->sc_state->secure_compile_processes[process].fd_secure_input, - &found_cache_entry, sizeof(uint8_t)); + if (!radv_sc_read(device->sc_state->secure_compile_processes[process].fd_secure_input, + &found_cache_entry, sizeof(uint8_t), true)) + return NULL; if (found_cache_entry) { size_t entry_size; - read(device->sc_state->secure_compile_processes[process].fd_secure_input, - &entry_size, sizeof(size_t)); + if (!radv_sc_read(device->sc_state->secure_compile_processes[process].fd_secure_input, + &entry_size, sizeof(size_t), true)) + return NULL; entry = malloc(entry_size); - read(device->sc_state->secure_compile_processes[process].fd_secure_input, - entry, entry_size); + if (!radv_sc_read(device->sc_state->secure_compile_processes[process].fd_secure_input, + entry, entry_size, true)) + return NULL; + return entry; } |