mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-22 11:40:05 +00:00
Remove asserts around environment determination. (#2040)
This CL removes several asserts around determining the SPIR-V environment. In each case we already return a default value if assertions are compiled out, so just return the default value.
This commit is contained in:
parent
1e9fc1aac1
commit
75999d9b71
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/ext_inst.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
// DebugInfo extended instruction set.
|
||||
@ -85,7 +84,6 @@ spv_result_t spvExtInstTableGet(spv_ext_inst_table* pExtInstTable,
|
||||
*pExtInstTable = &kTable_1_0;
|
||||
return SPV_SUCCESS;
|
||||
default:
|
||||
assert(0 && "Unknown spv_target_env in spvExtInstTableGet()");
|
||||
return SPV_ERROR_INVALID_TABLE;
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/spirv_target_env.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
#include "source/spirv_constant.h"
|
||||
@ -63,7 +62,6 @@ const char* spvTargetEnvDescription(spv_target_env env) {
|
||||
case SPV_ENV_WEBGPU_0:
|
||||
return "SPIR-V 1.3 (under WIP WebGPU semantics)";
|
||||
}
|
||||
assert(0 && "Unhandled SPIR-V target environment");
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -94,7 +92,6 @@ uint32_t spvVersionForTargetEnv(spv_target_env env) {
|
||||
case SPV_ENV_WEBGPU_0:
|
||||
return SPV_SPIRV_VERSION_WORD(1, 3);
|
||||
}
|
||||
assert(0 && "Unhandled SPIR-V target environment");
|
||||
return SPV_SPIRV_VERSION_WORD(0, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user