mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-03 11:46:09 +00:00
Fix handling of .spvasm inputs
BUG=tint:207 Change-Id: Ic429a909d092423908409678b7256bd88de10a99 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26760 Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
5e7ef27ca7
commit
a532ac55d9
@ -389,10 +389,8 @@ int main(int argc, const char** argv) {
|
|||||||
if (!ReadFile<char>(options.input_filename, &text)) {
|
if (!ReadFile<char>(options.input_filename, &text)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// By default, use SPIR-V 1.3, the original proposal for SPIR-V binary
|
// Use Vulkan 1.1, since this is what Tint, internally, is expecting.
|
||||||
// input for WebGPU. This lines up with the SPIRV-Tools validation
|
spvtools::SpirvTools tools(SPV_ENV_VULKAN_1_1);
|
||||||
// for the SPV_ENV_WEBGPU0 environment.
|
|
||||||
spvtools::SpirvTools tools(SPV_ENV_UNIVERSAL_1_3);
|
|
||||||
tools.SetMessageConsumer([](spv_message_level_t, const char*,
|
tools.SetMessageConsumer([](spv_message_level_t, const char*,
|
||||||
const spv_position_t& pos, const char* msg) {
|
const spv_position_t& pos, const char* msg) {
|
||||||
std::cerr << (pos.line + 1) << ":" << (pos.column + 1) << ": " << msg
|
std::cerr << (pos.line + 1) << ":" << (pos.column + 1) << ": " << msg
|
||||||
|
@ -77,11 +77,11 @@ namespace spirv {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// Input SPIR-V needs only to conform to Vulkan 1.0 requirements.
|
// Input SPIR-V needs only to conform to Vulkan 1.1 requirements.
|
||||||
// The combination of the SPIR-V reader and the semantics of WGSL
|
// The combination of the SPIR-V reader and the semantics of WGSL
|
||||||
// tighten up the code so that the output of the SPIR-V *writer*
|
// tighten up the code so that the output of the SPIR-V *writer*
|
||||||
// will satisfy SPV_ENV_WEBGPU_0 validation.
|
// will satisfy SPV_ENV_WEBGPU_0 validation.
|
||||||
const spv_target_env kInputEnv = SPV_ENV_VULKAN_1_0;
|
const spv_target_env kInputEnv = SPV_ENV_VULKAN_1_1;
|
||||||
|
|
||||||
// A FunctionTraverser is used to compute an ordering of functions in the
|
// A FunctionTraverser is used to compute an ordering of functions in the
|
||||||
// module such that callees precede callers.
|
// module such that callees precede callers.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user