tint/test-runner: Split expectations for FXC and DXC
Change tint's `--fxc` flag to take the path of the FXC compiler DLL. Have tint attempt to validate with both FXC and DXC if `--validate` is passed. Fix the 'dirsWithNoPassExpectations' logic which looks like it got broken with the tint -> dawn merge. It also incorrectly applied filepath.FromSlash() on windows. Change-Id: I0f46aa5c21bc48a2abc48402c41f846aff4a8633 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96800 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
parent
0778d9a48f
commit
7d34de88f1
|
@ -142,20 +142,12 @@ tint_unittests.exe || goto :error
|
|||
call :status "Testing test/tint/test-all.sh"
|
||||
@echo on
|
||||
cd /d %SRC_DIR% || goto :error
|
||||
rem Run tests with DXC and Metal validation
|
||||
rem Run tests with DXC, FXC and Metal validation
|
||||
set OLD_PATH=%PATH%
|
||||
set PATH=C:\Program Files\Metal Developer Tools\macos\bin;%PATH%
|
||||
where metal.exe
|
||||
set PATH=%DXC_PATH%;%OLD_PATH%
|
||||
where dxc.exe dxil.dll
|
||||
set PATH=%DXC_PATH%;%D3DCOMPILER_PATH%;%OLD_PATH%
|
||||
call git bash -- ./test/tint/test-all.sh ../dawn-build/tint.exe --verbose || goto :error
|
||||
@echo on
|
||||
set PATH=%OLD_PATH%
|
||||
rem Run again to test with FXC validation
|
||||
set PATH=%D3DCOMPILER_PATH%;%OLD_PATH%
|
||||
where d3dcompiler_47.dll
|
||||
call git bash -- ./test/tint/test-all.sh ../dawn-build/tint.exe --verbose --format hlsl --fxc || goto :error
|
||||
@echo on
|
||||
set PATH=%OLD_PATH%
|
||||
@echo off
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ enum class Format {
|
|||
|
||||
struct Options {
|
||||
bool show_help = false;
|
||||
bool verbose = false;
|
||||
|
||||
std::string input_filename;
|
||||
std::string output_file = "-"; // Default to stdout
|
||||
|
@ -84,7 +85,7 @@ struct Options {
|
|||
|
||||
std::vector<std::string> transforms;
|
||||
|
||||
bool use_fxc = false;
|
||||
std::string fxc_path;
|
||||
std::string dxc_path;
|
||||
std::string xcrun_path;
|
||||
std::unordered_map<std::string, double> overrides;
|
||||
|
@ -120,13 +121,13 @@ ${transforms}
|
|||
used for num_workgroups in HLSL. If not specified, then
|
||||
default to binding 0 of the largest used group plus 1,
|
||||
or group 0 if no resource bound.
|
||||
--validate -- Validates the generated shader
|
||||
--fxc -- Ask to validate HLSL output using FXC instead of DXC.
|
||||
When specified, automatically enables --validate
|
||||
--validate -- Validates the generated shader with all available validators
|
||||
--fxc -- Path to FXC dll, used to validate HLSL output.
|
||||
When specified, automatically enables HLSL validation with FXC
|
||||
--dxc -- Path to DXC executable, used to validate HLSL output.
|
||||
When specified, automatically enables --validate
|
||||
When specified, automatically enables HLSL validation with DXC
|
||||
--xcrun -- Path to xcrun executable, used to validate MSL output.
|
||||
When specified, automatically enables --validate
|
||||
When specified, automatically enables MSL validation
|
||||
--overrides -- Override values as IDENTIFIER=VALUE, comma-separated.
|
||||
)";
|
||||
|
||||
|
@ -397,6 +398,8 @@ bool ParseArgs(const std::vector<std::string>& args, Options* opts) {
|
|||
|
||||
} else if (arg == "-h" || arg == "--help") {
|
||||
opts->show_help = true;
|
||||
} else if (arg == "-v" || arg == "--verbose") {
|
||||
opts->verbose = true;
|
||||
} else if (arg == "--transform") {
|
||||
++i;
|
||||
if (i >= args.size()) {
|
||||
|
@ -415,8 +418,12 @@ bool ParseArgs(const std::vector<std::string>& args, Options* opts) {
|
|||
} else if (arg == "--validate") {
|
||||
opts->validate = true;
|
||||
} else if (arg == "--fxc") {
|
||||
opts->validate = true;
|
||||
opts->use_fxc = true;
|
||||
++i;
|
||||
if (i >= args.size()) {
|
||||
std::cerr << "Missing value for " << arg << std::endl;
|
||||
return false;
|
||||
}
|
||||
opts->fxc_path = args[i];
|
||||
} else if (arg == "--dxc") {
|
||||
++i;
|
||||
if (i >= args.size()) {
|
||||
|
@ -424,7 +431,6 @@ bool ParseArgs(const std::vector<std::string>& args, Options* opts) {
|
|||
return false;
|
||||
}
|
||||
opts->dxc_path = args[i];
|
||||
opts->validate = true;
|
||||
} else if (arg == "--xcrun") {
|
||||
++i;
|
||||
if (i >= args.size()) {
|
||||
|
@ -801,29 +807,71 @@ bool GenerateHlsl(const tint::Program* program, const Options& options) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (options.validate) {
|
||||
tint::val::Result res;
|
||||
if (options.use_fxc) {
|
||||
#ifdef _WIN32
|
||||
res = tint::val::HlslUsingFXC(result.hlsl, result.entry_points);
|
||||
#else
|
||||
res.failed = true;
|
||||
res.output = "FXC can only be used on Windows. Sorry :X";
|
||||
#endif // _WIN32
|
||||
} else {
|
||||
// If --fxc or --dxc was passed, then we must explicitly find and validate with that respective
|
||||
// compiler.
|
||||
const bool must_validate_dxc = !options.dxc_path.empty();
|
||||
const bool must_validate_fxc = !options.fxc_path.empty();
|
||||
if (options.validate || must_validate_dxc || must_validate_fxc) {
|
||||
tint::val::Result dxc_res;
|
||||
bool dxc_found = false;
|
||||
if (options.validate || must_validate_dxc) {
|
||||
auto dxc =
|
||||
tint::utils::Command::LookPath(options.dxc_path.empty() ? "dxc" : options.dxc_path);
|
||||
if (dxc.Found()) {
|
||||
res = tint::val::HlslUsingDXC(dxc.Path(), result.hlsl, result.entry_points);
|
||||
} else {
|
||||
res.failed = true;
|
||||
res.output = "DXC executable not found. Cannot validate";
|
||||
dxc_found = true;
|
||||
dxc_res = tint::val::HlslUsingDXC(dxc.Path(), result.hlsl, result.entry_points);
|
||||
} else if (must_validate_dxc) {
|
||||
// DXC was explicitly requested. Error if it could not be found.
|
||||
dxc_res.failed = true;
|
||||
dxc_res.output =
|
||||
"DXC executable '" + options.dxc_path + "' not found. Cannot validate";
|
||||
}
|
||||
}
|
||||
if (res.failed) {
|
||||
std::cerr << res.output << std::endl;
|
||||
|
||||
tint::val::Result fxc_res;
|
||||
bool fxc_found = false;
|
||||
if (options.validate || must_validate_fxc) {
|
||||
auto fxc = tint::utils::Command::LookPath(
|
||||
options.fxc_path.empty() ? tint::val::kFxcDLLName : options.fxc_path);
|
||||
|
||||
#ifdef _WIN32
|
||||
if (fxc.Found()) {
|
||||
fxc_found = true;
|
||||
fxc_res = tint::val::HlslUsingFXC(fxc.Path(), result.hlsl, result.entry_points);
|
||||
} else if (must_validate_fxc) {
|
||||
// FXC was explicitly requested. Error if it could not be found.
|
||||
fxc_res.failed = true;
|
||||
fxc_res.output = "FXC DLL '" + options.fxc_path + "' not found. Cannot validate";
|
||||
}
|
||||
#else
|
||||
if (must_validate_dxc) {
|
||||
fxc_res.failed = true;
|
||||
fxc_res.output = "FXC can only be used on Windows.";
|
||||
}
|
||||
#endif // _WIN32
|
||||
}
|
||||
|
||||
if (fxc_res.failed) {
|
||||
std::cerr << "FXC validation failure:" << std::endl << fxc_res.output << std::endl;
|
||||
}
|
||||
if (dxc_res.failed) {
|
||||
std::cerr << "DXC validation failure:" << std::endl << dxc_res.output << std::endl;
|
||||
}
|
||||
if (fxc_res.failed || dxc_res.failed) {
|
||||
return false;
|
||||
}
|
||||
if (!fxc_found && !dxc_found) {
|
||||
std::cerr << "Couldn't find FXC or DXC. Cannot validate" << std::endl;
|
||||
return false;
|
||||
}
|
||||
if (options.verbose) {
|
||||
if (fxc_found && !fxc_res.failed) {
|
||||
std::cout << "Passed FXC validation" << std::endl;
|
||||
}
|
||||
if (dxc_found && !dxc_res.failed) {
|
||||
std::cout << "Passed DXC validation" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -16,9 +16,12 @@
|
|||
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <Windows.h>
|
||||
#include <dbghelp.h>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "src/tint/utils/defer.h"
|
||||
|
||||
namespace tint::utils {
|
||||
|
||||
namespace {
|
||||
|
@ -97,9 +100,34 @@ class Pipe {
|
|||
Handle write;
|
||||
};
|
||||
|
||||
/// Queries whether the file at the given path is an executable or DLL.
|
||||
bool ExecutableExists(const std::string& path) {
|
||||
DWORD type = 0;
|
||||
return GetBinaryTypeA(path.c_str(), &type);
|
||||
auto file = Handle(CreateFileA(path.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_READONLY, NULL));
|
||||
if (!file) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto map = Handle(CreateFileMappingA(file, NULL, PAGE_READONLY, 0, 0, NULL));
|
||||
if (map == INVALID_HANDLE_VALUE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void* addr_header = MapViewOfFileEx(map, FILE_MAP_READ, 0, 0, 0, NULL);
|
||||
|
||||
// Dynamically obtain the address of, and call ImageNtHeader. This is done to avoid tint.exe
|
||||
// needing to statically link Dbghelp.lib.
|
||||
static auto* dbg_help = LoadLibraryA("Dbghelp.dll"); // Leaks, but who cares?
|
||||
if (dbg_help) {
|
||||
if (FARPROC proc = GetProcAddress(dbg_help, "ImageNtHeader")) {
|
||||
using ImageNtHeaderPtr = decltype(&ImageNtHeader);
|
||||
auto* image_nt_header = reinterpret_cast<ImageNtHeaderPtr>(proc)(addr_header);
|
||||
return image_nt_header != nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// Couldn't call ImageNtHeader, assume it is executable
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string FindExecutable(const std::string& name) {
|
||||
|
@ -187,7 +215,8 @@ Command::Output Command::Exec(std::initializer_list<std::string> arguments) cons
|
|||
&si, // Pointer to STARTUPINFO structure
|
||||
&pi)) { // Pointer to PROCESS_INFORMATION structure
|
||||
Output out;
|
||||
out.err = "Command::Exec() CreateProcess() failed";
|
||||
out.err = "Command::Exec() CreateProcess('" + args.str() + "') failed";
|
||||
out.error_code = 1;
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,13 +95,15 @@ Result HlslUsingDXC(const std::string& dxc_path,
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
Result HlslUsingFXC(const std::string& source, const EntryPointList& entry_points) {
|
||||
Result HlslUsingFXC(const std::string& fxc_path,
|
||||
const std::string& source,
|
||||
const EntryPointList& entry_points) {
|
||||
Result result;
|
||||
|
||||
// This library leaks if an error happens in this function, but it is ok
|
||||
// because it is loaded at most once, and the executables using HlslUsingFXC
|
||||
// are short-lived.
|
||||
HMODULE fxcLib = LoadLibraryA("d3dcompiler_47.dll");
|
||||
HMODULE fxcLib = LoadLibraryA(fxc_path.c_str());
|
||||
if (fxcLib == nullptr) {
|
||||
result.output = "Couldn't load FXC";
|
||||
result.failed = true;
|
||||
|
|
|
@ -30,6 +30,9 @@ namespace tint::val {
|
|||
|
||||
using EntryPointList = std::vector<std::pair<std::string, ast::PipelineStage>>;
|
||||
|
||||
/// Name of the FXC compiler DLL
|
||||
static constexpr const char kFxcDLLName[] = "d3dcompiler_47.dll";
|
||||
|
||||
/// The return structure of Validate()
|
||||
struct Result {
|
||||
/// True if validation passed
|
||||
|
@ -51,10 +54,13 @@ Result HlslUsingDXC(const std::string& dxc_path,
|
|||
#ifdef _WIN32
|
||||
/// Hlsl attempts to compile the shader with FXC, verifying that the shader
|
||||
/// compiles successfully.
|
||||
/// @param fxc_path path to the FXC DLL
|
||||
/// @param source the generated HLSL source
|
||||
/// @param entry_points the list of entry points to validate
|
||||
/// @return the result of the compile
|
||||
Result HlslUsingFXC(const std::string& source, const EntryPointList& entry_points);
|
||||
Result HlslUsingFXC(const std::string& fxc_path,
|
||||
const std::string& source,
|
||||
const EntryPointList& entry_points);
|
||||
#endif // _WIN32
|
||||
|
||||
/// Msl attempts to compile the shader with the Metal Shader Compiler,
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
void main_1() {
|
||||
const float x_24 = 5.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float3x3 m = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
|
||||
const float3 v = m[1];
|
||||
const float f = v[1];
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
void main_1() {
|
||||
const float x_11 = 2.0f;
|
||||
const float2 x_13 = float2(1.0f, 3.0f);
|
||||
const float3 x_14 = float3(1.0f, 3.0f, 2.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float3 v = float3(1.0f, 2.0f, 3.0f);
|
||||
const float scalar = v.y;
|
||||
const float2 swizzle2 = v.xz;
|
||||
const float3 swizzle3 = v.xzy;
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
void main_1() {
|
||||
float3x3 m = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
|
||||
const float3 x_15 = m[1];
|
||||
const float x_16 = x_15.y;
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
float3x3 m = float3x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
const float3 v = m[1];
|
||||
const float f = v[1];
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
void main_1() {
|
||||
float3 v = (0.0f).xxx;
|
||||
const float x_14 = v.y;
|
||||
const float3 x_16 = v;
|
||||
const float2 x_17 = float2(x_16.x, x_16.z);
|
||||
const float3 x_18 = v;
|
||||
const float3 x_19 = float3(x_18.x, x_18.z, x_18.y);
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
float3 v = float3(0.0f, 0.0f, 0.0f);
|
||||
const float scalar = v.y;
|
||||
const float2 swizzle2 = v.xz;
|
||||
const float3 swizzle3 = v.xzy;
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int4 arr[4];
|
||||
};
|
||||
|
||||
static int4 src_private[4] = (int4[4])0;
|
||||
groupshared int4 src_workgroup[4];
|
||||
cbuffer cbuffer_src_uniform : register(b0, space0) {
|
||||
uint4 src_uniform[4];
|
||||
};
|
||||
RWByteAddressBuffer src_storage : register(u1, space0);
|
||||
|
||||
typedef int4 ret_arr_ret[4];
|
||||
ret_arr_ret ret_arr() {
|
||||
const int4 tint_symbol_6[4] = (int4[4])0;
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
S ret_struct_arr() {
|
||||
const S tint_symbol_7 = (S)0;
|
||||
return tint_symbol_7;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_2_ret[4];
|
||||
tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i * 16u))) / 4;
|
||||
arr_1[i] = asint(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_4_ret[4];
|
||||
tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_2[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void foo(int4 src_param[4]) {
|
||||
int4 src_function[4] = (int4[4])0;
|
||||
int4 tint_symbol[4] = (int4[4])0;
|
||||
const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
|
||||
tint_symbol = tint_symbol_8;
|
||||
tint_symbol = src_param;
|
||||
tint_symbol = ret_arr();
|
||||
const int4 src_let[4] = (int4[4])0;
|
||||
tint_symbol = src_let;
|
||||
tint_symbol = src_function;
|
||||
tint_symbol = src_private;
|
||||
tint_symbol = src_workgroup;
|
||||
const S tint_symbol_1 = ret_struct_arr();
|
||||
tint_symbol = tint_symbol_1.arr;
|
||||
tint_symbol = tint_symbol_2(src_uniform, 0u);
|
||||
tint_symbol = tint_symbol_4(src_storage, 0u);
|
||||
int dst_nested[4][3][2] = (int[4][3][2])0;
|
||||
int src_nested[4][3][2] = (int[4][3][2])0;
|
||||
dst_nested = src_nested;
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int4 arr[4];
|
||||
};
|
||||
|
||||
static int4 src_private[4] = (int4[4])0;
|
||||
groupshared int4 src_workgroup[4];
|
||||
cbuffer cbuffer_src_uniform : register(b0, space0) {
|
||||
uint4 src_uniform[4];
|
||||
};
|
||||
RWByteAddressBuffer src_storage : register(u1, space0);
|
||||
static int4 tint_symbol[4] = (int4[4])0;
|
||||
static int dst_nested[4][3][2] = (int[4][3][2])0;
|
||||
|
||||
typedef int4 ret_arr_ret[4];
|
||||
ret_arr_ret ret_arr() {
|
||||
const int4 tint_symbol_6[4] = (int4[4])0;
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
S ret_struct_arr() {
|
||||
const S tint_symbol_7 = (S)0;
|
||||
return tint_symbol_7;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_2_ret[4];
|
||||
tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i * 16u))) / 4;
|
||||
arr_1[i] = asint(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_4_ret[4];
|
||||
tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_2[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void foo(int4 src_param[4]) {
|
||||
int4 src_function[4] = (int4[4])0;
|
||||
const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
|
||||
tint_symbol = tint_symbol_8;
|
||||
tint_symbol = src_param;
|
||||
tint_symbol = ret_arr();
|
||||
const int4 src_let[4] = (int4[4])0;
|
||||
tint_symbol = src_let;
|
||||
tint_symbol = src_function;
|
||||
tint_symbol = src_private;
|
||||
tint_symbol = src_workgroup;
|
||||
const S tint_symbol_1 = ret_struct_arr();
|
||||
tint_symbol = tint_symbol_1.arr;
|
||||
tint_symbol = tint_symbol_2(src_uniform, 0u);
|
||||
tint_symbol = tint_symbol_4(src_storage, 0u);
|
||||
int src_nested[4][3][2] = (int[4][3][2])0;
|
||||
dst_nested = src_nested;
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int4 arr[4];
|
||||
};
|
||||
|
||||
static int4 src_private[4] = (int4[4])0;
|
||||
groupshared int4 src_workgroup[4];
|
||||
cbuffer cbuffer_src_uniform : register(b0, space0) {
|
||||
uint4 src_uniform[4];
|
||||
};
|
||||
RWByteAddressBuffer src_storage : register(u1, space0);
|
||||
RWByteAddressBuffer tint_symbol : register(u2, space0);
|
||||
RWByteAddressBuffer dst_nested : register(u3, space0);
|
||||
|
||||
typedef int4 ret_arr_ret[4];
|
||||
ret_arr_ret ret_arr() {
|
||||
const int4 tint_symbol_13[4] = (int4[4])0;
|
||||
return tint_symbol_13;
|
||||
}
|
||||
|
||||
S ret_struct_arr() {
|
||||
const S tint_symbol_14 = (S)0;
|
||||
return tint_symbol_14;
|
||||
}
|
||||
|
||||
void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, int4 value[4]) {
|
||||
int4 array[4] = value;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
buffer.Store4((offset + (i * 16u)), asuint(array[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_5_ret[4];
|
||||
tint_symbol_5_ret tint_symbol_5(uint4 buffer[4], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i_1 * 16u))) / 4;
|
||||
arr_1[i_1] = asint(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_7_ret[4];
|
||||
tint_symbol_7_ret tint_symbol_7(RWByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_2[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
|
||||
arr_2[i_2] = asint(buffer.Load4((offset + (i_2 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int value[2]) {
|
||||
int array_3[2] = value;
|
||||
{
|
||||
[loop] for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) {
|
||||
buffer.Store((offset + (i_3 * 4u)), asuint(array_3[i_3]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, int value[3][2]) {
|
||||
int array_2[3][2] = value;
|
||||
{
|
||||
[loop] for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) {
|
||||
tint_symbol_11(buffer, (offset + (i_4 * 8u)), array_2[i_4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, int value[4][3][2]) {
|
||||
int array_1[4][3][2] = value;
|
||||
{
|
||||
[loop] for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) {
|
||||
tint_symbol_10(buffer, (offset + (i_5 * 24u)), array_1[i_5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void foo(int4 src_param[4]) {
|
||||
int4 src_function[4] = (int4[4])0;
|
||||
const int4 tint_symbol_15[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_15);
|
||||
tint_symbol_3(tint_symbol, 0u, src_param);
|
||||
const int4 tint_symbol_1[4] = ret_arr();
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_1);
|
||||
const int4 src_let[4] = (int4[4])0;
|
||||
tint_symbol_3(tint_symbol, 0u, src_let);
|
||||
tint_symbol_3(tint_symbol, 0u, src_function);
|
||||
tint_symbol_3(tint_symbol, 0u, src_private);
|
||||
tint_symbol_3(tint_symbol, 0u, src_workgroup);
|
||||
const S tint_symbol_2 = ret_struct_arr();
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_2.arr);
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_5(src_uniform, 0u));
|
||||
tint_symbol_3(tint_symbol, 0u, tint_symbol_7(src_storage, 0u));
|
||||
int src_nested[4][3][2] = (int[4][3][2])0;
|
||||
tint_symbol_9(dst_nested, 0u, src_nested);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int arr[4];
|
||||
};
|
||||
|
||||
void foo() {
|
||||
const int src[4] = (int[4])0;
|
||||
int tint_symbol[4] = (int[4])0;
|
||||
S dst_struct = (S)0;
|
||||
int dst_array[2][4] = (int[2][4])0;
|
||||
dst_struct.arr = src;
|
||||
dst_array[1] = src;
|
||||
tint_symbol = src;
|
||||
dst_struct.arr = src;
|
||||
dst_array[0] = src;
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int4 arr[4];
|
||||
};
|
||||
|
||||
static int4 src_private[4] = (int4[4])0;
|
||||
groupshared int4 src_workgroup[4];
|
||||
cbuffer cbuffer_src_uniform : register(b0, space0) {
|
||||
uint4 src_uniform[4];
|
||||
};
|
||||
RWByteAddressBuffer src_storage : register(u1, space0);
|
||||
groupshared int4 tint_symbol[4];
|
||||
groupshared int dst_nested[4][3][2];
|
||||
|
||||
typedef int4 ret_arr_ret[4];
|
||||
ret_arr_ret ret_arr() {
|
||||
const int4 tint_symbol_6[4] = (int4[4])0;
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
S ret_struct_arr() {
|
||||
const S tint_symbol_7 = (S)0;
|
||||
return tint_symbol_7;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_2_ret[4];
|
||||
tint_symbol_2_ret tint_symbol_2(uint4 buffer[4], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i * 16u))) / 4;
|
||||
arr_1[i] = asint(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_4_ret[4];
|
||||
tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_2[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr_2[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void foo(int4 src_param[4]) {
|
||||
int4 src_function[4] = (int4[4])0;
|
||||
const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
|
||||
tint_symbol = tint_symbol_8;
|
||||
tint_symbol = src_param;
|
||||
tint_symbol = ret_arr();
|
||||
const int4 src_let[4] = (int4[4])0;
|
||||
tint_symbol = src_let;
|
||||
tint_symbol = src_function;
|
||||
tint_symbol = src_private;
|
||||
tint_symbol = src_workgroup;
|
||||
const S tint_symbol_1 = ret_struct_arr();
|
||||
tint_symbol = tint_symbol_1.arr;
|
||||
tint_symbol = tint_symbol_2(src_uniform, 0u);
|
||||
tint_symbol = tint_symbol_4(src_storage, 0u);
|
||||
int src_nested[4][3][2] = (int[4][3][2])0;
|
||||
dst_nested = src_nested;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
float f1(float a[4]) {
|
||||
return a[3];
|
||||
}
|
||||
|
||||
float f2(float a[3][4]) {
|
||||
return a[2][3];
|
||||
}
|
||||
|
||||
float f3(float a[2][3][4]) {
|
||||
return a[1][2][3];
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float a1[4] = (float[4])0;
|
||||
const float a2[3][4] = (float[3][4])0;
|
||||
const float a3[2][3][4] = (float[2][3][4])0;
|
||||
const float v1 = f1(a1);
|
||||
const float v2 = f2(a2);
|
||||
const float v3 = f3(a3);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
typedef float f1_ret[4];
|
||||
f1_ret f1() {
|
||||
const float tint_symbol_5[4] = (float[4])0;
|
||||
return tint_symbol_5;
|
||||
}
|
||||
|
||||
typedef float f2_ret[3][4];
|
||||
f2_ret f2() {
|
||||
const float tint_symbol[4] = f1();
|
||||
const float tint_symbol_1[4] = f1();
|
||||
const float tint_symbol_2[4] = f1();
|
||||
const float tint_symbol_6[3][4] = {tint_symbol, tint_symbol_1, tint_symbol_2};
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
typedef float f3_ret[2][3][4];
|
||||
f3_ret f3() {
|
||||
const float tint_symbol_3[3][4] = f2();
|
||||
const float tint_symbol_4[3][4] = f2();
|
||||
const float tint_symbol_7[2][3][4] = {tint_symbol_3, tint_symbol_4};
|
||||
return tint_symbol_7;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float a1[4] = f1();
|
||||
const float a2[3][4] = f2();
|
||||
const float a3[2][3][4] = f3();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
void main() {
|
||||
float signed_literal[4] = (float[4])0;
|
||||
float unsigned_literal[4] = (float[4])0;
|
||||
float signed_constant[4] = (float[4])0;
|
||||
float unsigned_constant[4] = (float[4])0;
|
||||
signed_literal = unsigned_constant;
|
||||
signed_constant = unsigned_literal;
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
struct strided_arr {
|
||||
float el;
|
||||
};
|
||||
struct strided_arr_1 {
|
||||
strided_arr el[3][2];
|
||||
};
|
||||
|
||||
RWByteAddressBuffer s : register(u0, space0);
|
||||
|
||||
strided_arr tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
|
||||
const strided_arr tint_symbol_12 = {asfloat(buffer.Load((offset + 0u)))};
|
||||
return tint_symbol_12;
|
||||
}
|
||||
|
||||
typedef strided_arr tint_symbol_3_ret[2];
|
||||
tint_symbol_3_ret tint_symbol_3(RWByteAddressBuffer buffer, uint offset) {
|
||||
strided_arr arr[2] = (strided_arr[2])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
arr[i] = tint_symbol_4(buffer, (offset + (i * 8u)));
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
typedef strided_arr tint_symbol_2_ret[3][2];
|
||||
tint_symbol_2_ret tint_symbol_2(RWByteAddressBuffer buffer, uint offset) {
|
||||
strided_arr arr_1[3][2] = (strided_arr[3][2])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 3u); i_1 = (i_1 + 1u)) {
|
||||
arr_1[i_1] = tint_symbol_3(buffer, (offset + (i_1 * 16u)));
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
strided_arr_1 tint_symbol_1(RWByteAddressBuffer buffer, uint offset) {
|
||||
const strided_arr_1 tint_symbol_13 = {tint_symbol_2(buffer, (offset + 0u))};
|
||||
return tint_symbol_13;
|
||||
}
|
||||
|
||||
typedef strided_arr_1 tint_symbol_ret[4];
|
||||
tint_symbol_ret tint_symbol(RWByteAddressBuffer buffer, uint offset) {
|
||||
strided_arr_1 arr_2[4] = (strided_arr_1[4])0;
|
||||
{
|
||||
[loop] for(uint i_2 = 0u; (i_2 < 4u); i_2 = (i_2 + 1u)) {
|
||||
arr_2[i_2] = tint_symbol_1(buffer, (offset + (i_2 * 128u)));
|
||||
}
|
||||
}
|
||||
return arr_2;
|
||||
}
|
||||
|
||||
void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, strided_arr value) {
|
||||
buffer.Store((offset + 0u), asuint(value.el));
|
||||
}
|
||||
|
||||
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, strided_arr value[2]) {
|
||||
strided_arr array_2[2] = value;
|
||||
{
|
||||
[loop] for(uint i_3 = 0u; (i_3 < 2u); i_3 = (i_3 + 1u)) {
|
||||
tint_symbol_10(buffer, (offset + (i_3 * 8u)), array_2[i_3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, strided_arr value[3][2]) {
|
||||
strided_arr array_1[3][2] = value;
|
||||
{
|
||||
[loop] for(uint i_4 = 0u; (i_4 < 3u); i_4 = (i_4 + 1u)) {
|
||||
tint_symbol_9(buffer, (offset + (i_4 * 16u)), array_1[i_4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, strided_arr_1 value) {
|
||||
tint_symbol_8(buffer, (offset + 0u), value.el);
|
||||
}
|
||||
|
||||
void tint_symbol_6(RWByteAddressBuffer buffer, uint offset, strided_arr_1 value[4]) {
|
||||
strided_arr_1 array[4] = value;
|
||||
{
|
||||
[loop] for(uint i_5 = 0u; (i_5 < 4u); i_5 = (i_5 + 1u)) {
|
||||
tint_symbol_7(buffer, (offset + (i_5 * 128u)), array[i_5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void f_1() {
|
||||
const strided_arr_1 x_19[4] = tint_symbol(s, 0u);
|
||||
const strided_arr x_24[3][2] = tint_symbol_2(s, 384u);
|
||||
const strided_arr x_28[2] = tint_symbol_3(s, 416u);
|
||||
const float x_32 = asfloat(s.Load(424u));
|
||||
const strided_arr_1 tint_symbol_14[4] = (strided_arr_1[4])0;
|
||||
tint_symbol_6(s, 0u, tint_symbol_14);
|
||||
s.Store(424u, asuint(5.0f));
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
f_1();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const int x = 42;
|
||||
const int empty[4] = (int[4])0;
|
||||
const int nonempty[4] = {1, 2, 3, 4};
|
||||
const int nonempty_with_expr[4] = {1, x, (x + 1), nonempty[3]};
|
||||
const int nested_empty[2][3][4] = (int[2][3][4])0;
|
||||
const int tint_symbol[4] = {1, 2, 3, 4};
|
||||
const int tint_symbol_1[4] = {5, 6, 7, 8};
|
||||
const int tint_symbol_2[4] = {9, 10, 11, 12};
|
||||
const int tint_symbol_3[3][4] = {tint_symbol, tint_symbol_1, tint_symbol_2};
|
||||
const int tint_symbol_4[4] = {13, 14, 15, 16};
|
||||
const int tint_symbol_5[4] = {17, 18, 19, 20};
|
||||
const int tint_symbol_6[4] = {21, 22, 23, 24};
|
||||
const int tint_symbol_7[3][4] = {tint_symbol_4, tint_symbol_5, tint_symbol_6};
|
||||
const int nested_nonempty[2][3][4] = {tint_symbol_3, tint_symbol_7};
|
||||
const int tint_symbol_8[4] = {1, 2, x, (x + 1)};
|
||||
const int tint_symbol_9[4] = {5, 6, nonempty[2], (nonempty[3] + 1)};
|
||||
const int tint_symbol_10[3][4] = {tint_symbol_8, tint_symbol_9, nonempty};
|
||||
const int nested_nonempty_with_expr[2][3][4] = {tint_symbol_10, nested_nonempty[1]};
|
||||
const int tint_symbol_11[4] = (int[4])0;
|
||||
const int subexpr_empty = tint_symbol_11[1];
|
||||
const int tint_symbol_12[4] = {1, 2, 3, 4};
|
||||
const int subexpr_nonempty = tint_symbol_12[2];
|
||||
const int tint_symbol_13[4] = {1, x, (x + 1), nonempty[3]};
|
||||
const int subexpr_nonempty_with_expr = tint_symbol_13[2];
|
||||
const int tint_symbol_14[2][4] = (int[2][4])0;
|
||||
const int subexpr_nested_empty[4] = tint_symbol_14[1];
|
||||
const int tint_symbol_15[4] = {1, 2, 3, 4};
|
||||
const int tint_symbol_16[4] = {5, 6, 7, 8};
|
||||
const int tint_symbol_17[2][4] = {tint_symbol_15, tint_symbol_16};
|
||||
const int subexpr_nested_nonempty[4] = tint_symbol_17[1];
|
||||
const int tint_symbol_18[4] = {1, x, (x + 1), nonempty[3]};
|
||||
const int tint_symbol_19[2][4] = {tint_symbol_18, nested_nonempty[1][2]};
|
||||
const int subexpr_nested_nonempty_with_expr[4] = tint_symbol_19[1];
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
ByteAddressBuffer s : register(t0, space0);
|
||||
|
||||
struct tint_symbol_1 {
|
||||
uint idx : SV_GroupIndex;
|
||||
};
|
||||
|
||||
float2x3 tint_symbol_8(ByteAddressBuffer buffer, uint offset) {
|
||||
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
|
||||
}
|
||||
|
||||
float3x2 tint_symbol_9(ByteAddressBuffer buffer, uint offset) {
|
||||
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_11_ret[4];
|
||||
tint_symbol_11_ret tint_symbol_11(ByteAddressBuffer buffer, uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr_1[i_1] = asint(buffer.Load4((offset + (i_1 * 16u))));
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
void main_inner(uint idx) {
|
||||
const int3 a = asint(s.Load3((176u * idx)));
|
||||
const int b = asint(s.Load(((176u * idx) + 12u)));
|
||||
const uint3 c = s.Load3(((176u * idx) + 16u));
|
||||
const uint d = s.Load(((176u * idx) + 28u));
|
||||
const float3 e = asfloat(s.Load3(((176u * idx) + 32u)));
|
||||
const float f = asfloat(s.Load(((176u * idx) + 44u)));
|
||||
const float2x3 g = tint_symbol_8(s, ((176u * idx) + 48u));
|
||||
const float3x2 h = tint_symbol_9(s, ((176u * idx) + 80u));
|
||||
const int4 i[4] = tint_symbol_11(s, ((176u * idx) + 112u));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main(tint_symbol_1 tint_symbol) {
|
||||
main_inner(tint_symbol.idx);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
RWByteAddressBuffer s : register(u0, space0);
|
||||
|
||||
struct tint_symbol_1 {
|
||||
uint idx : SV_GroupIndex;
|
||||
};
|
||||
|
||||
void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
|
||||
buffer.Store3((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store3((offset + 16u), asuint(value[1u]));
|
||||
}
|
||||
|
||||
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
|
||||
buffer.Store2((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store2((offset + 8u), asuint(value[1u]));
|
||||
buffer.Store2((offset + 16u), asuint(value[2u]));
|
||||
}
|
||||
|
||||
void tint_symbol_11(RWByteAddressBuffer buffer, uint offset, int4 value[4]) {
|
||||
int4 array[4] = value;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
buffer.Store4((offset + (i_1 * 16u)), asuint(array[i_1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void main_inner(uint idx) {
|
||||
s.Store3((176u * idx), asuint((0).xxx));
|
||||
s.Store(((176u * idx) + 12u), asuint(0));
|
||||
s.Store3(((176u * idx) + 16u), asuint((0u).xxx));
|
||||
s.Store(((176u * idx) + 28u), asuint(0u));
|
||||
s.Store3(((176u * idx) + 32u), asuint((0.0f).xxx));
|
||||
s.Store(((176u * idx) + 44u), asuint(0.0f));
|
||||
tint_symbol_8(s, ((176u * idx) + 48u), float2x3((0.0f).xxx, (0.0f).xxx));
|
||||
tint_symbol_9(s, ((176u * idx) + 80u), float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
|
||||
const int4 tint_symbol_13[4] = (int4[4])0;
|
||||
tint_symbol_11(s, ((176u * idx) + 112u), tint_symbol_13);
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main(tint_symbol_1 tint_symbol) {
|
||||
main_inner(tint_symbol.idx);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
struct Inner {
|
||||
int x;
|
||||
};
|
||||
|
||||
ByteAddressBuffer s : register(t0, space0);
|
||||
|
||||
float2x3 tint_symbol_6(ByteAddressBuffer buffer, uint offset) {
|
||||
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
|
||||
}
|
||||
|
||||
float3x2 tint_symbol_7(ByteAddressBuffer buffer, uint offset) {
|
||||
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
|
||||
}
|
||||
|
||||
Inner tint_symbol_9(ByteAddressBuffer buffer, uint offset) {
|
||||
const Inner tint_symbol_11 = {asint(buffer.Load((offset + 0u)))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
typedef Inner tint_symbol_10_ret[4];
|
||||
tint_symbol_10_ret tint_symbol_10(ByteAddressBuffer buffer, uint offset) {
|
||||
Inner arr[4] = (Inner[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr[i_1] = tint_symbol_9(buffer, (offset + (i_1 * 4u)));
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const int3 a = asint(s.Load3(0u));
|
||||
const int b = asint(s.Load(12u));
|
||||
const uint3 c = s.Load3(16u);
|
||||
const uint d = s.Load(28u);
|
||||
const float3 e = asfloat(s.Load3(32u));
|
||||
const float f = asfloat(s.Load(44u));
|
||||
const float2x3 g = tint_symbol_6(s, 48u);
|
||||
const float3x2 h = tint_symbol_7(s, 80u);
|
||||
const Inner i = tint_symbol_9(s, 104u);
|
||||
const Inner j[4] = tint_symbol_10(s, 108u);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
struct Inner {
|
||||
int x;
|
||||
};
|
||||
|
||||
RWByteAddressBuffer s : register(u0, space0);
|
||||
|
||||
void tint_symbol_6(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
|
||||
buffer.Store3((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store3((offset + 16u), asuint(value[1u]));
|
||||
}
|
||||
|
||||
void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
|
||||
buffer.Store2((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store2((offset + 8u), asuint(value[1u]));
|
||||
buffer.Store2((offset + 16u), asuint(value[2u]));
|
||||
}
|
||||
|
||||
void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, Inner value) {
|
||||
buffer.Store((offset + 0u), asuint(value.x));
|
||||
}
|
||||
|
||||
void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, Inner value[4]) {
|
||||
Inner array[4] = value;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
tint_symbol_9(buffer, (offset + (i_1 * 4u)), array[i_1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
s.Store3(0u, asuint((0).xxx));
|
||||
s.Store(12u, asuint(0));
|
||||
s.Store3(16u, asuint((0u).xxx));
|
||||
s.Store(28u, asuint(0u));
|
||||
s.Store3(32u, asuint((0.0f).xxx));
|
||||
s.Store(44u, asuint(0.0f));
|
||||
tint_symbol_6(s, 48u, float2x3((0.0f).xxx, (0.0f).xxx));
|
||||
tint_symbol_7(s, 80u, float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx));
|
||||
const Inner tint_symbol_11 = (Inner)0;
|
||||
tint_symbol_9(s, 104u, tint_symbol_11);
|
||||
const Inner tint_symbol_12[4] = (Inner[4])0;
|
||||
tint_symbol_10(s, 108u, tint_symbol_12);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float value[4]) {
|
||||
float array[4] = value;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
buffer.Store((offset + (i * 4u)), asuint(array[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef float tint_symbol_4_ret[4];
|
||||
tint_symbol_4_ret tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
|
||||
float arr[4] = (float[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr[i_1] = asfloat(buffer.Load((offset + (i_1 * 4u))));
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_1.Store(0u, asuint(asfloat(tint_symbol.Load(0u))));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_1.Store(0u, asuint(asint(tint_symbol.Load(0u))));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x2 value) {
|
||||
buffer.Store2((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store2((offset + 8u), asuint(value[1u]));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
|
||||
return float2x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
|
||||
buffer.Store3((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store3((offset + 16u), asuint(value[1u]));
|
||||
}
|
||||
|
||||
float2x3 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
|
||||
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
|
||||
buffer.Store2((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store2((offset + 8u), asuint(value[1u]));
|
||||
buffer.Store2((offset + 16u), asuint(value[2u]));
|
||||
}
|
||||
|
||||
float3x2 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
|
||||
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, float4x4 value) {
|
||||
buffer.Store4((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store4((offset + 16u), asuint(value[1u]));
|
||||
buffer.Store4((offset + 32u), asuint(value[2u]));
|
||||
buffer.Store4((offset + 48u), asuint(value[3u]));
|
||||
}
|
||||
|
||||
float4x4 tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
|
||||
return float4x4(asfloat(buffer.Load4((offset + 0u))), asfloat(buffer.Load4((offset + 16u))), asfloat(buffer.Load4((offset + 32u))), asfloat(buffer.Load4((offset + 48u))));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_4(tint_symbol, 0u));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
struct S {
|
||||
float f;
|
||||
};
|
||||
|
||||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) {
|
||||
buffer.Store((offset + 0u), asuint(value.f));
|
||||
}
|
||||
|
||||
S tint_symbol_4(ByteAddressBuffer buffer, uint offset) {
|
||||
const S tint_symbol_6 = {asfloat(buffer.Load((offset + 0u)))};
|
||||
return tint_symbol_6;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_2(tint_symbol_1, (4u * 0u), tint_symbol_4(tint_symbol, (4u * 0u)));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
struct Inner {
|
||||
float f;
|
||||
};
|
||||
struct S {
|
||||
Inner inner;
|
||||
};
|
||||
|
||||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
void tint_symbol_3(RWByteAddressBuffer buffer, uint offset, Inner value) {
|
||||
buffer.Store((offset + 0u), asuint(value.f));
|
||||
}
|
||||
|
||||
void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) {
|
||||
tint_symbol_3(buffer, (offset + 0u), value.inner);
|
||||
}
|
||||
|
||||
Inner tint_symbol_6(ByteAddressBuffer buffer, uint offset) {
|
||||
const Inner tint_symbol_8 = {asfloat(buffer.Load((offset + 0u)))};
|
||||
return tint_symbol_8;
|
||||
}
|
||||
|
||||
S tint_symbol_5(ByteAddressBuffer buffer, uint offset) {
|
||||
const S tint_symbol_9 = {tint_symbol_6(buffer, (offset + 0u))};
|
||||
return tint_symbol_9;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_2(tint_symbol_1, 0u, tint_symbol_5(tint_symbol, 0u));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_1.Store(0u, asuint(tint_symbol.Load(0u)));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_1.Store2(0u, asuint(asint(tint_symbol.Load2(0u))));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_1.Store3(0u, asuint(tint_symbol.Load3(0u)));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
ByteAddressBuffer tint_symbol : register(t0, space0);
|
||||
RWByteAddressBuffer tint_symbol_1 : register(u1, space0);
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
tint_symbol_1.Store4(0u, asuint(asfloat(tint_symbol.Load4(0u))));
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
cbuffer cbuffer_s : register(b0, space0) {
|
||||
uint4 s[96];
|
||||
};
|
||||
|
||||
struct tint_symbol_1 {
|
||||
uint idx : SV_GroupIndex;
|
||||
};
|
||||
|
||||
float2x3 tint_symbol_9(uint4 buffer[96], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
|
||||
}
|
||||
|
||||
float3x2 tint_symbol_10(uint4 buffer[96], uint offset) {
|
||||
const uint scalar_offset_2 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_2 / 4];
|
||||
const uint scalar_offset_3 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_3 / 4];
|
||||
const uint scalar_offset_4 = ((offset + 16u)) / 4;
|
||||
uint4 ubo_load_2 = buffer[scalar_offset_4 / 4];
|
||||
return float3x2(asfloat(((scalar_offset_2 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_4 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||
}
|
||||
|
||||
typedef int4 tint_symbol_12_ret[4];
|
||||
tint_symbol_12_ret tint_symbol_12(uint4 buffer[96], uint offset) {
|
||||
int4 arr_1[4] = (int4[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
const uint scalar_offset_5 = ((offset + (i_1 * 16u))) / 4;
|
||||
arr_1[i_1] = asint(buffer[scalar_offset_5 / 4]);
|
||||
}
|
||||
}
|
||||
return arr_1;
|
||||
}
|
||||
|
||||
void main_inner(uint idx) {
|
||||
const uint scalar_offset_6 = ((192u * idx)) / 4;
|
||||
const int3 a = asint(s[scalar_offset_6 / 4].xyz);
|
||||
const uint scalar_offset_7 = (((192u * idx) + 12u)) / 4;
|
||||
const int b = asint(s[scalar_offset_7 / 4][scalar_offset_7 % 4]);
|
||||
const uint scalar_offset_8 = (((192u * idx) + 16u)) / 4;
|
||||
const uint3 c = s[scalar_offset_8 / 4].xyz;
|
||||
const uint scalar_offset_9 = (((192u * idx) + 28u)) / 4;
|
||||
const uint d = s[scalar_offset_9 / 4][scalar_offset_9 % 4];
|
||||
const uint scalar_offset_10 = (((192u * idx) + 32u)) / 4;
|
||||
const float3 e = asfloat(s[scalar_offset_10 / 4].xyz);
|
||||
const uint scalar_offset_11 = (((192u * idx) + 44u)) / 4;
|
||||
const float f = asfloat(s[scalar_offset_11 / 4][scalar_offset_11 % 4]);
|
||||
const uint scalar_offset_12 = (((192u * idx) + 48u)) / 4;
|
||||
uint4 ubo_load_3 = s[scalar_offset_12 / 4];
|
||||
const int2 g = asint(((scalar_offset_12 & 2) ? ubo_load_3.zw : ubo_load_3.xy));
|
||||
const uint scalar_offset_13 = (((192u * idx) + 56u)) / 4;
|
||||
uint4 ubo_load_4 = s[scalar_offset_13 / 4];
|
||||
const int2 h = asint(((scalar_offset_13 & 2) ? ubo_load_4.zw : ubo_load_4.xy));
|
||||
const float2x3 i = tint_symbol_9(s, ((192u * idx) + 64u));
|
||||
const float3x2 j = tint_symbol_10(s, ((192u * idx) + 96u));
|
||||
const int4 k[4] = tint_symbol_12(s, ((192u * idx) + 128u));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main(tint_symbol_1 tint_symbol) {
|
||||
main_inner(tint_symbol.idx);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
struct Inner {
|
||||
int x;
|
||||
};
|
||||
|
||||
cbuffer cbuffer_s : register(b0, space0) {
|
||||
uint4 s[13];
|
||||
};
|
||||
|
||||
float2x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
|
||||
}
|
||||
|
||||
float3x2 tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_2 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_2 / 4];
|
||||
const uint scalar_offset_3 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_3 / 4];
|
||||
const uint scalar_offset_4 = ((offset + 16u)) / 4;
|
||||
uint4 ubo_load_2 = buffer[scalar_offset_4 / 4];
|
||||
return float3x2(asfloat(((scalar_offset_2 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_3 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_4 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||
}
|
||||
|
||||
Inner tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_5 = ((offset + 0u)) / 4;
|
||||
const Inner tint_symbol_12 = {asint(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4])};
|
||||
return tint_symbol_12;
|
||||
}
|
||||
|
||||
typedef Inner tint_symbol_11_ret[4];
|
||||
tint_symbol_11_ret tint_symbol_11(uint4 buffer[13], uint offset) {
|
||||
Inner arr[4] = (Inner[4])0;
|
||||
{
|
||||
[loop] for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr[i_1] = tint_symbol_10(buffer, (offset + (i_1 * 16u)));
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const int3 a = asint(s[0].xyz);
|
||||
const int b = asint(s[0].w);
|
||||
const uint3 c = s[1].xyz;
|
||||
const uint d = s[1].w;
|
||||
const float3 e = asfloat(s[2].xyz);
|
||||
const float f = asfloat(s[2].w);
|
||||
const int2 g = asint(s[3].xy);
|
||||
const int2 h = asint(s[3].zw);
|
||||
const float2x3 i = tint_symbol_7(s, 64u);
|
||||
const float3x2 j = tint_symbol_8(s, 96u);
|
||||
const Inner k = tint_symbol_10(s, 128u);
|
||||
const Inner l[4] = tint_symbol_11(s, 144u);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[4];
|
||||
};
|
||||
|
||||
typedef float4 tint_symbol_ret[4];
|
||||
tint_symbol_ret tint_symbol(uint4 buffer[4], uint offset) {
|
||||
float4 arr[4] = (float4[4])0;
|
||||
{
|
||||
[loop] for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
const uint scalar_offset = ((offset + (i * 16u))) / 4;
|
||||
arr[i] = asfloat(buffer[scalar_offset / 4]);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float4 x[4] = tint_symbol(u, 0u);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[1];
|
||||
};
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float x = asfloat(u[0].x);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[1];
|
||||
};
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const int x = asint(u[0].x);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[1];
|
||||
};
|
||||
|
||||
float2x2 tint_symbol(uint4 buffer[1], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset / 4];
|
||||
const uint scalar_offset_1 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
|
||||
return float2x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float2x2 x = tint_symbol(u, 0u);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[2];
|
||||
};
|
||||
|
||||
float2x3 tint_symbol(uint4 buffer[2], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset / 4].xyz), asfloat(buffer[scalar_offset_1 / 4].xyz));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float2x3 x = tint_symbol(u, 0u);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[2];
|
||||
};
|
||||
|
||||
float3x2 tint_symbol(uint4 buffer[2], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset / 4];
|
||||
const uint scalar_offset_1 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_1 / 4];
|
||||
const uint scalar_offset_2 = ((offset + 16u)) / 4;
|
||||
uint4 ubo_load_2 = buffer[scalar_offset_2 / 4];
|
||||
return float3x2(asfloat(((scalar_offset & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_1 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_2 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float3x2 x = tint_symbol(u, 0u);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[4];
|
||||
};
|
||||
|
||||
float4x4 tint_symbol(uint4 buffer[4], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
const uint scalar_offset_3 = ((offset + 48u)) / 4;
|
||||
return float4x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]), asfloat(buffer[scalar_offset_3 / 4]));
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const float4x4 x = tint_symbol(u, 0u);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
struct Inner {
|
||||
float f;
|
||||
};
|
||||
struct S {
|
||||
Inner inner;
|
||||
};
|
||||
|
||||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[1];
|
||||
};
|
||||
|
||||
Inner tint_symbol_1(uint4 buffer[1], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const Inner tint_symbol_3 = {asfloat(buffer[scalar_offset / 4][scalar_offset % 4])};
|
||||
return tint_symbol_3;
|
||||
}
|
||||
|
||||
S tint_symbol(uint4 buffer[1], uint offset) {
|
||||
const S tint_symbol_4 = {tint_symbol_1(buffer, (offset + 0u))};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const S x = tint_symbol(u, 0u);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[1];
|
||||
};
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const uint x = u[0].x;
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
cbuffer cbuffer_u : register(b0, space0) {
|
||||
uint4 u[1];
|
||||
};
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
const int2 x = asint(u[0].xy);
|
||||
return;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue