hlsl/writer: Validate texture intrinsics with DXC
Change-Id: I4cb8f9a700842e43facbd83cd9af24a00a74658f Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/42023 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
53d057c572
commit
3bb3116bdf
|
@ -15,7 +15,9 @@
|
|||
#include <memory>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "src/ast/call_statement.h"
|
||||
#include "src/ast/intrinsic_texture_helper_test.h"
|
||||
#include "src/ast/stage_decoration.h"
|
||||
#include "src/type/depth_texture_type.h"
|
||||
#include "src/type/multisampled_texture_type.h"
|
||||
#include "src/type/sampled_texture_type.h"
|
||||
|
@ -439,7 +441,14 @@ TEST_P(HlslGeneratorIntrinsicTextureTest, Call) {
|
|||
param.buildSamplerVariable(this);
|
||||
|
||||
auto* call = Call(param.function, param.args(this));
|
||||
WrapInFunction(call);
|
||||
|
||||
Func("main", ast::VariableList{}, ty.void_(),
|
||||
ast::StatementList{
|
||||
create<ast::CallStatement>(call),
|
||||
},
|
||||
ast::FunctionDecorationList{
|
||||
create<ast::StageDecoration>(ast::PipelineStage::kFragment),
|
||||
});
|
||||
|
||||
GeneratorImpl& gen = Build();
|
||||
|
||||
|
@ -449,6 +458,8 @@ TEST_P(HlslGeneratorIntrinsicTextureTest, Call) {
|
|||
|
||||
EXPECT_EQ(expected.pre, pre_result());
|
||||
EXPECT_EQ(expected.out, result());
|
||||
|
||||
Validate();
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
|
|
Loading…
Reference in New Issue