summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-05-31 01:06:41 +0200
committerBas Nieuwenhuizen <[email protected]>2018-05-31 11:51:23 +0200
commit38933c11514696505e49fd8036ebd1d1e62fa6ec (patch)
tree829a3ff8410c47d48761ce20214e94a9e07b3cb3 /src/amd/vulkan/radv_shader.c
parent729f7373deaf98d860ef95be36ef8af267218bc3 (diff)
radv: Add option to print errors even in optimized builds.
Errors are not that common of a case so we can eat a slight perf hit in having to call a function and do a runtime check. In turn this makes debugging random errors happening for end users easier, because they don't have to have a debug build on hand. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r--src/amd/vulkan/radv_shader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 84ad215ccb3..68f2a55e810 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -89,7 +89,7 @@ VkResult radv_CreateShaderModule(
sizeof(*module) + pCreateInfo->codeSize, 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
if (module == NULL)
- return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
+ return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
module->nir = NULL;
module->size = pCreateInfo->codeSize;
@@ -710,7 +710,7 @@ radv_GetShaderInfoAMD(VkDevice _device,
/* Spec doesn't indicate what to do if the stage is invalid, so just
* return no info for this. */
if (!variant)
- return vk_error(VK_ERROR_FEATURE_NOT_PRESENT);
+ return vk_error(device->instance, VK_ERROR_FEATURE_NOT_PRESENT);
switch (infoType) {
case VK_SHADER_INFO_TYPE_STATISTICS_AMD: