mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-02 03:13:50 +00:00
spirv-reader: make valid SPIR-V for derivative tests
Bug: tint:765 Change-Id: I81a905e73d7435d85cffab4ff804934015de065b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50441 Reviewed-by: Alan Baker <alanbaker@google.com> Commit-Queue: David Neto <dneto@google.com>
This commit is contained in:
parent
799cecedb7
commit
1f68519dee
@ -28,7 +28,8 @@ std::string Preamble() {
|
|||||||
return R"(
|
return R"(
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical Simple
|
OpMemoryModel Logical Simple
|
||||||
OpEntryPoint Vertex %100 "main"
|
OpEntryPoint Fragment %100 "main"
|
||||||
|
OpExecutionMode %100 OriginUpperLeft
|
||||||
|
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%voidfn = OpTypeFunction %void
|
%voidfn = OpTypeFunction %void
|
||||||
@ -1539,7 +1540,9 @@ TEST_P(SpvBinaryDerivativeTest, Derivatives) {
|
|||||||
auto& intrinsic = std::get<0>(GetParam());
|
auto& intrinsic = std::get<0>(GetParam());
|
||||||
auto& arg = std::get<1>(GetParam());
|
auto& arg = std::get<1>(GetParam());
|
||||||
|
|
||||||
const auto assembly = Preamble() + R"(
|
const auto assembly = R"(
|
||||||
|
OpCapability DerivativeControl
|
||||||
|
)" + Preamble() + R"(
|
||||||
%100 = OpFunction %void None %voidfn
|
%100 = OpFunction %void None %voidfn
|
||||||
%entry = OpLabel
|
%entry = OpLabel
|
||||||
%1 = OpCopyObject %)" +
|
%1 = OpCopyObject %)" +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user