Implement External Texture Crop Functionality

Adds to the External Texture shader transform to allow cropping. Tests
included.

Bug: chromium:1316671
Change-Id: Id0ec9acac22a0968ba6847d6ead9cf5084eaca88
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113281
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Brandon Jones 2022-12-16 05:41:06 +00:00 committed by Dawn LUCI CQ
parent 0be08d8b88
commit 183df9d24e
99 changed files with 3364 additions and 2133 deletions

View File

@ -1377,6 +1377,16 @@
{"value": 3, "name": "rotate 270 degrees"}
]
},
"external texture visible rect" :{
"category": "structure",
"tags": ["dawn"],
"members": [
{"name": "x", "type": "float", "default": "0.0"},
{"name": "y", "type": "float", "default": "0.0"},
{"name": "width", "type": "float", "default": "1.0"},
{"name": "height", "type": "float", "default": "1.0"}
]
},
"external texture descriptor": {
"category": "structure",
"extensible": "in",
@ -1397,7 +1407,8 @@
{"name": "gamut conversion matrix", "type": "float", "annotation": "const*",
"length": 9},
{"name": "flip y", "type": "bool", "default": "false"},
{"name": "rotation", "type": "external texture rotation", "default": "rotate 0 degrees"}
{"name": "rotation", "type": "external texture rotation", "default": "rotate 0 degrees"},
{"name": "visible rect", "type": "external texture visible rect"}
]
},
"feature name": {

View File

@ -209,25 +209,64 @@ MaybeError ExternalTextureBase::Initialize(DeviceBase* device,
const float* dstFn = descriptor->dstTransferFunctionParameters;
std::copy(dstFn, dstFn + 7, params.gammaEncodingParams.begin());
// These scale factors perform part of the cropping operation. These default to 1, so we can use
// them directly for performing rotation in the matrix later.
float xScale = descriptor->visibleRect.width;
float yScale = descriptor->visibleRect.height;
// In the shader, we must convert UV coordinates from the {0, 1} space to the {-0.5, 0.5} space
// to do rotation. Ideally, we want to combine the rotate, flip-Y operations in a single matrix
// operation - but this is complicated because scaling most easily occurs in the {0, 1} space.
// We can work around this and perform scaling in the {-0.5, 0.5} space by multiplying the
// needed conversion constant "+ 0.5" by the scale factor. We then can do this all within a
// single matrix operation by calculating and adding this value to the offset specified in the
// matrix. For reference, this is the entire operation needed is:
//
// newCoords = vec3<f32>((coord - 0.5f), 1.0f) * coordTransformationMatrix) + (scaleFactor *
// 0.5)
//
// Because we combine the ending (scaleFactor * 0.5) into the crop offset within the matrix, the
// shader is actually:
//
// newCoords = vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix;
//
// TODO(dawn:1614): Incorporate the "- 0.5f" into the matrix.
float xOffset = descriptor->visibleRect.x + 0.5f * xScale;
float yOffset = descriptor->visibleRect.y + 0.5f * yScale;
// Flip-Y can be done by simply negating the scaling factor in the y-plane. The position of the
// y-plane scaling factor in the matrix can be different depending on the rotation.
float flipY = 1;
if (descriptor->flipY) {
flipY = -1;
}
// We can perform the flip-Y operation by multiplying the y-component portion of the matrix by
// -1.
// This block creates a 2x3 matrix which when multiplied by UV coordinates in a shader performs
// rotation, flip-Y and cropping operations.
switch (descriptor->rotation) {
case wgpu::ExternalTextureRotation::Rotate0Degrees:
params.coordTransformMatrix = {1.0, 0.0, 0.0, 1.0f * flipY};
params.coordTransformMatrix = {xScale, 0.0, //
xOffset, 0.0, //
0.0, flipY * yScale, //
yOffset, 0.0};
break;
case wgpu::ExternalTextureRotation::Rotate90Degrees:
params.coordTransformMatrix = {0.0, 1.0f * flipY, -1.0, 0.0};
params.coordTransformMatrix = {0.0, flipY * yScale, //
xOffset, 0.0, //
-xScale, 0.0, //
yOffset, 0.0};
break;
case wgpu::ExternalTextureRotation::Rotate180Degrees:
params.coordTransformMatrix = {-1.0, 0.0, 0.0, -1.0f * flipY};
params.coordTransformMatrix = {-xScale, 0.0, //
xOffset, 0.0, //
0.0, flipY * -yScale, //
yOffset, 0.0};
break;
case wgpu::ExternalTextureRotation::Rotate270Degrees:
params.coordTransformMatrix = {0.0, -1.0f * flipY, 1.0, 0.0};
params.coordTransformMatrix = {0.0, flipY * -yScale, //
xOffset, 0.0, //
xScale, 0.0, //
yOffset, 0.0};
break;
}

View File

@ -35,7 +35,7 @@ struct ExternalTextureParams {
std::array<float, 8> gammaDecodingParams = {};
std::array<float, 8> gammaEncodingParams = {};
std::array<float, 12> gamutConversionMatrix = {};
std::array<float, 4> coordTransformMatrix = {};
std::array<float, 8> coordTransformMatrix = {};
};
MaybeError ValidateExternalTextureDescriptor(const DeviceBase* device,

View File

@ -625,6 +625,341 @@ TEST_P(ExternalTextureTests, RotateAndOrFlipMultiplanar) {
}
}
// This test draws a 2x2 multi-colored square surrounded by a 1px black border. We test the external
// texture crop functionality by cropping to specific ranges inside the texture.
TEST_P(ExternalTextureTests, CropSinglePlane) {
// TODO(crbug.com/tint/1774): Tint has an issue compiling shaders that use external textures on
// OpenGL/OpenGLES.
DAWN_SUPPRESS_TEST_IF(IsOpenGL() || IsOpenGLES());
const wgpu::ShaderModule sourceTextureFsModule = utils::CreateShaderModule(device, R"(
@fragment fn main(@builtin(position) FragCoord : vec4<f32>)
-> @location(0) vec4<f32> {
if(FragCoord.x >= 1.0 && FragCoord.x < 3.0 && FragCoord.y >= 1.0 && FragCoord.y < 3.0) {
if(FragCoord.y < 2.0 && FragCoord.x < 2.0) {
return vec4<f32>(0.0, 1.0, 0.0, 1.0);
}
if(FragCoord.y < 2.0 && FragCoord.x >= 2.0) {
return vec4<f32>(1.0, 1.0, 1.0, 1.0);
}
if(FragCoord.y >= 2.0 && FragCoord.x < 2.0) {
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
}
if(FragCoord.y >= 2.0 && FragCoord.x >= 2.0) {
return vec4<f32>(0.0, 0.0, 1.0, 1.0);
}
}
return vec4<f32>(0.0, 0.0, 0.0, 1.0);
})");
wgpu::Texture sourceTexture =
Create2DTexture(device, kWidth, kHeight, kFormat,
wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::RenderAttachment);
RenderToSourceTexture(sourceTextureFsModule, sourceTexture);
wgpu::Texture renderTexture =
Create2DTexture(device, kWidth, kHeight, kFormat,
wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::RenderAttachment);
struct CropExpectation {
wgpu::ExternalTextureVisibleRect visibleRect;
wgpu::ExternalTextureRotation rotation;
utils::RGBA8 upperLeftColor;
utils::RGBA8 upperRightColor;
utils::RGBA8 lowerLeftColor;
utils::RGBA8 lowerRightColor;
};
std::array<CropExpectation, 9> expectations = {{
{{0.0, 0.0, 1.0, 1.0},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kBlack,
utils::RGBA8::kBlack,
utils::RGBA8::kBlack,
utils::RGBA8::kBlack},
{{0.25, 0.25, 0.25, 0.25},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kGreen,
utils::RGBA8::kGreen,
utils::RGBA8::kGreen,
utils::RGBA8::kGreen},
{{0.5, 0.25, 0.25, 0.25},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kWhite,
utils::RGBA8::kWhite,
utils::RGBA8::kWhite,
utils::RGBA8::kWhite},
{{0.25, 0.5, 0.25, 0.25},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kRed,
utils::RGBA8::kRed,
utils::RGBA8::kRed,
utils::RGBA8::kRed},
{{0.5, 0.5, 0.25, 0.25},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kBlue,
utils::RGBA8::kBlue,
utils::RGBA8::kBlue,
utils::RGBA8::kBlue},
{{0.25, 0.25, 0.5, 0.5},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kGreen,
utils::RGBA8::kWhite,
utils::RGBA8::kRed,
utils::RGBA8::kBlue},
{{0.25, 0.25, 0.5, 0.5},
wgpu::ExternalTextureRotation::Rotate90Degrees,
utils::RGBA8::kRed,
utils::RGBA8::kGreen,
utils::RGBA8::kBlue,
utils::RGBA8::kWhite},
{{0.25, 0.25, 0.5, 0.5},
wgpu::ExternalTextureRotation::Rotate180Degrees,
utils::RGBA8::kBlue,
utils::RGBA8::kRed,
utils::RGBA8::kWhite,
utils::RGBA8::kGreen},
{{0.25, 0.25, 0.5, 0.5},
wgpu::ExternalTextureRotation::Rotate270Degrees,
utils::RGBA8::kWhite,
utils::RGBA8::kBlue,
utils::RGBA8::kGreen,
utils::RGBA8::kRed},
}};
for (const CropExpectation& exp : expectations) {
// Pipeline Creation
utils::ComboRenderPipelineDescriptor descriptor;
descriptor.vertex.module = vsModule;
descriptor.cFragment.module = fsSampleExternalTextureModule;
descriptor.cTargets[0].format = kFormat;
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
// Create an ExternalTextureDescriptor from the texture view
wgpu::ExternalTextureDescriptor externalDesc = CreateDefaultExternalTextureDescriptor();
externalDesc.plane0 = sourceTexture.CreateView();
externalDesc.visibleRect = exp.visibleRect;
externalDesc.rotation = exp.rotation;
// Import the external texture
wgpu::ExternalTexture externalTexture = device.CreateExternalTexture(&externalDesc);
// Create a sampler and bind group
wgpu::Sampler sampler = device.CreateSampler();
wgpu::BindGroup bindGroup = utils::MakeBindGroup(device, pipeline.GetBindGroupLayout(0),
{{0, sampler}, {1, externalTexture}});
// Run the shader, which should sample from the external texture and draw a triangle into
// the upper left corner of the render texture.
wgpu::TextureView renderView = renderTexture.CreateView();
utils::ComboRenderPassDescriptor renderPass({renderView}, nullptr);
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass);
{
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup);
pass.Draw(6);
pass.End();
}
wgpu::CommandBuffer commands = encoder.Finish();
queue.Submit(1, &commands);
EXPECT_PIXEL_RGBA8_EQ(exp.upperLeftColor, renderTexture, 0, 0);
EXPECT_PIXEL_RGBA8_EQ(exp.upperRightColor, renderTexture, 3, 0);
EXPECT_PIXEL_RGBA8_EQ(exp.lowerLeftColor, renderTexture, 0, 3);
EXPECT_PIXEL_RGBA8_EQ(exp.lowerRightColor, renderTexture, 3, 3);
}
}
// This test draws a 2x2 multi-colored square surrounded by a 1px black border. We test the external
// texture crop functionality by cropping to specific ranges inside the texture.
TEST_P(ExternalTextureTests, CropMultiplanar) {
// TODO(crbug.com/tint/1774): Tint has an issue compiling shaders that use external textures on
// OpenGL/OpenGLES.
DAWN_SUPPRESS_TEST_IF(IsOpenGL() || IsOpenGLES());
const wgpu::ShaderModule sourceTexturePlane0FsModule = utils::CreateShaderModule(device, R"(
@fragment fn main(@builtin(position) FragCoord : vec4<f32>)
-> @location(0) vec4<f32> {
if(FragCoord.x >= 1.0 && FragCoord.x < 3.0 && FragCoord.y >= 1.0 && FragCoord.y < 3.0) {
if(FragCoord.y < 2.0 && FragCoord.x < 2.0) {
return vec4<f32>(0.7152, 0.0, 0.0, 0.0);
}
if(FragCoord.y < 2.0 && FragCoord.x >= 2.0) {
return vec4<f32>(1.0, 0.0, 0.0, 0.0);
}
if(FragCoord.y >= 2.0 && FragCoord.x < 2.0) {
return vec4<f32>(0.2126, 0.0, 0.0, 0.0);
}
if(FragCoord.y >= 2.0 && FragCoord.x >= 2.0) {
return vec4<f32>(0.0722, 0.0, 1.0, 1.0);
}
}
return vec4<f32>(0.0, 0.0, 0.0, 0.0);
})");
const wgpu::ShaderModule sourceTexturePlane1FsModule = utils::CreateShaderModule(device, R"(
@fragment fn main(@builtin(position) FragCoord : vec4<f32>)
-> @location(0) vec4<f32> {
if(FragCoord.x >= 1.0 && FragCoord.x < 3.0 && FragCoord.y >= 1.0 && FragCoord.y < 3.0) {
if(FragCoord.y < 2.0 && FragCoord.x < 2.0) {
return vec4<f32>(0.1402, 0.0175, 0.0, 0.0);
}
if(FragCoord.y < 2.0 && FragCoord.x >= 2.0) {
return vec4<f32>(0.5, 0.5, 0.0, 0.0);
}
if(FragCoord.y >= 2.0 && FragCoord.x < 2.0) {
return vec4<f32>(0.4172, 1.0, 0.0, 0.0);
}
if(FragCoord.y >= 2.0 && FragCoord.x >= 2.0) {
return vec4<f32>(1.0, 0.4937, 0.0, 0.0);
}
}
return vec4<f32>(0.5, 0.5, 0.0, 0.0);
})");
wgpu::Texture sourceTexturePlane0 =
Create2DTexture(device, kWidth, kHeight, wgpu::TextureFormat::R8Unorm,
wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::RenderAttachment);
wgpu::Texture sourceTexturePlane1 =
Create2DTexture(device, kWidth, kHeight, wgpu::TextureFormat::RG8Unorm,
wgpu::TextureUsage::TextureBinding | wgpu::TextureUsage::RenderAttachment);
RenderToSourceTexture(sourceTexturePlane0FsModule, sourceTexturePlane0);
RenderToSourceTexture(sourceTexturePlane1FsModule, sourceTexturePlane1);
wgpu::Texture renderTexture =
Create2DTexture(device, kWidth, kHeight, kFormat,
wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::RenderAttachment);
struct CropExpectation {
wgpu::ExternalTextureVisibleRect visibleRect;
wgpu::ExternalTextureRotation rotation;
utils::RGBA8 upperLeftColor;
utils::RGBA8 upperRightColor;
utils::RGBA8 lowerLeftColor;
utils::RGBA8 lowerRightColor;
};
std::array<CropExpectation, 9> expectations = {{
{{0.0, 0.0, 1.0, 1.0},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kBlack,
utils::RGBA8::kBlack,
utils::RGBA8::kBlack,
utils::RGBA8::kBlack},
{{0.25, 0.25, 0.25, 0.25},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kGreen,
utils::RGBA8::kGreen,
utils::RGBA8::kGreen,
utils::RGBA8::kGreen},
{{0.5, 0.25, 0.25, 0.25},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kWhite,
utils::RGBA8::kWhite,
utils::RGBA8::kWhite,
utils::RGBA8::kWhite},
{{0.25, 0.5, 0.25, 0.25},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kRed,
utils::RGBA8::kRed,
utils::RGBA8::kRed,
utils::RGBA8::kRed},
{{0.5, 0.5, 0.25, 0.25},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kBlue,
utils::RGBA8::kBlue,
utils::RGBA8::kBlue,
utils::RGBA8::kBlue},
{{0.25, 0.25, 0.5, 0.5},
wgpu::ExternalTextureRotation::Rotate0Degrees,
utils::RGBA8::kGreen,
utils::RGBA8::kWhite,
utils::RGBA8::kRed,
utils::RGBA8::kBlue},
{{0.25, 0.25, 0.5, 0.5},
wgpu::ExternalTextureRotation::Rotate90Degrees,
utils::RGBA8::kRed,
utils::RGBA8::kGreen,
utils::RGBA8::kBlue,
utils::RGBA8::kWhite},
{{0.25, 0.25, 0.5, 0.5},
wgpu::ExternalTextureRotation::Rotate180Degrees,
utils::RGBA8::kBlue,
utils::RGBA8::kRed,
utils::RGBA8::kWhite,
utils::RGBA8::kGreen},
{{0.25, 0.25, 0.5, 0.5},
wgpu::ExternalTextureRotation::Rotate270Degrees,
utils::RGBA8::kWhite,
utils::RGBA8::kBlue,
utils::RGBA8::kGreen,
utils::RGBA8::kRed},
}};
for (const CropExpectation& exp : expectations) {
// Pipeline Creation
utils::ComboRenderPipelineDescriptor descriptor;
descriptor.vertex.module = vsModule;
descriptor.cFragment.module = fsSampleExternalTextureModule;
descriptor.cTargets[0].format = kFormat;
wgpu::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
// Create an ExternalTextureDescriptor from the texture view
wgpu::ExternalTextureDescriptor externalDesc = CreateDefaultExternalTextureDescriptor();
externalDesc.plane0 = sourceTexturePlane0.CreateView();
externalDesc.plane1 = sourceTexturePlane1.CreateView();
externalDesc.rotation = exp.rotation;
externalDesc.visibleRect = exp.visibleRect;
// Import the external texture
wgpu::ExternalTexture externalTexture = device.CreateExternalTexture(&externalDesc);
// Create a sampler and bind group
wgpu::Sampler sampler = device.CreateSampler();
wgpu::BindGroup bindGroup = utils::MakeBindGroup(device, pipeline.GetBindGroupLayout(0),
{{0, sampler}, {1, externalTexture}});
// Run the shader, which should sample from the external texture and draw a triangle into
// the upper left corner of the render texture.
wgpu::TextureView renderView = renderTexture.CreateView();
utils::ComboRenderPassDescriptor renderPass({renderView}, nullptr);
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass);
{
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup);
pass.Draw(6);
pass.End();
}
wgpu::CommandBuffer commands = encoder.Finish();
queue.Submit(1, &commands);
EXPECT_PIXEL_RGBA8_EQ(exp.upperLeftColor, renderTexture, 0, 0);
EXPECT_PIXEL_RGBA8_EQ(exp.upperRightColor, renderTexture, 3, 0);
EXPECT_PIXEL_RGBA8_EQ(exp.lowerLeftColor, renderTexture, 0, 3);
EXPECT_PIXEL_RGBA8_EQ(exp.lowerRightColor, renderTexture, 3, 3);
}
}
DAWN_INSTANTIATE_TEST(ExternalTextureTests,
D3D12Backend(),
MetalBackend(),

View File

@ -262,7 +262,7 @@ struct MultiplanarExternalTexture::State {
b.Member("gammaDecodeParams", b.ty.type_name("GammaTransferParams")),
b.Member("gammaEncodeParams", b.ty.type_name("GammaTransferParams")),
b.Member("gamutConversionMatrix", b.ty.mat3x3<f32>()),
b.Member("rotationMatrix", b.ty.mat2x2<f32>())};
b.Member("coordTransformationMatrix", b.ty.mat2x3<f32>())};
params_struct_sym = b.Symbols().New("ExternalTextureParams");
@ -315,10 +315,12 @@ struct MultiplanarExternalTexture::State {
const ast::CallExpression* plane_1_call = nullptr;
switch (call_type) {
case sem::BuiltinType::kTextureSampleBaseClampToEdge:
stmts.Push(b.Decl(b.Let("modifiedCoords",
b.Add(b.Mul(b.Sub("coord", f32(0.5)),
b.MemberAccessor("params", "rotationMatrix")),
f32(0.5)))));
// TODO(dawn:1614): Change this statement to incorporate the "- 0.5" into the
// matrix.
stmts.Push(
b.Decl(b.Let("modifiedCoords",
b.Mul(b.vec3<f32>(b.Sub("coord", f32(0.5)), f32(1.0f)),
b.MemberAccessor("params", "coordTransformationMatrix")))));
stmts.Push(b.Decl(b.Let(
"plane0_dims",

View File

@ -138,7 +138,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
@ -194,7 +194,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
@ -249,7 +249,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -268,7 +268,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -333,7 +333,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -348,7 +348,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -418,7 +418,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
@ -511,7 +511,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
@ -603,7 +603,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -622,7 +622,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -702,7 +702,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -717,7 +717,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -807,7 +807,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(4) var ext_tex_plane_1 : texture_2d<f32>;
@ -844,7 +844,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -918,7 +918,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -933,7 +933,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -1011,7 +1011,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -1031,7 +1031,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -1104,7 +1104,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -1119,7 +1119,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -1199,7 +1199,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(3) var ext_tex_plane_1 : texture_2d<f32>;
@ -1218,7 +1218,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -1303,7 +1303,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(3) var ext_tex_plane_1 : texture_2d<f32>;
@ -1327,7 +1327,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -1408,7 +1408,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -1423,7 +1423,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -1509,7 +1509,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -1524,7 +1524,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -1598,7 +1598,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
fn f(ext_tex : texture_2d<f32>, ext_tex_plane_1 : texture_2d<f32>, ext_tex_params : ExternalTextureParams) -> vec2<u32> {
@ -1650,7 +1650,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -1667,7 +1667,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
@ -1746,7 +1746,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
@ -1766,7 +1766,7 @@ fn gammaCorrection(v : vec3<f32>, params : GammaTransferParams) -> vec3<f32> {
}
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
let modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));

View File

@ -19,12 +19,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t2, space0);
cbuffer cbuffer_ext_tex_params : register(b3, space0) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> t : register(t0, space0);
RWTexture2D<float4> outImage : register(u1, space0);
@ -51,14 +51,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
return float4(color, 1.0f);
}
float3x4 tint_symbol_6(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_6(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_8(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_8(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -67,30 +67,28 @@ GammaTransferParams tint_symbol_8(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_14 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_14;
const GammaTransferParams tint_symbol_13 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_13;
}
float3x3 tint_symbol_10(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_12(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_12(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_4(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_4(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_15 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_6(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 64u)), tint_symbol_8(buffer, (offset + 96u)), tint_symbol_10(buffer, (offset + 128u)), tint_symbol_12(buffer, (offset + 176u))};
return tint_symbol_15;
const ExternalTextureParams tint_symbol_14 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_6(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 64u)), tint_symbol_8(buffer, (offset + 96u)), tint_symbol_10(buffer, (offset + 128u)), tint_symbol_12(buffer, (offset + 176u))};
return tint_symbol_14;
}
[numthreads(1, 1, 1)]

View File

@ -19,12 +19,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t2, space0);
cbuffer cbuffer_ext_tex_params : register(b3, space0) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> t : register(t0, space0);
RWTexture2D<float4> outImage : register(u1, space0);
@ -51,14 +51,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
return float4(color, 1.0f);
}
float3x4 tint_symbol_6(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_6(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_8(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_8(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -67,30 +67,28 @@ GammaTransferParams tint_symbol_8(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_14 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_14;
const GammaTransferParams tint_symbol_13 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_13;
}
float3x3 tint_symbol_10(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_12(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_12(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_4(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_4(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_15 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_6(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 64u)), tint_symbol_8(buffer, (offset + 96u)), tint_symbol_10(buffer, (offset + 128u)), tint_symbol_12(buffer, (offset + 176u))};
return tint_symbol_15;
const ExternalTextureParams tint_symbol_14 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_6(buffer, (offset + 16u)), tint_symbol_8(buffer, (offset + 64u)), tint_symbol_8(buffer, (offset + 96u)), tint_symbol_10(buffer, (offset + 128u)), tint_symbol_12(buffer, (offset + 176u))};
return tint_symbol_14;
}
[numthreads(1, 1, 1)]

View File

@ -20,24 +20,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
uint pad;
uint pad_1;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
layout(rgba8) uniform highp writeonly image2D outImage;
@ -65,14 +52,10 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
uniform highp sampler2D t_2;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.pad, val.pad_1, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void tint_symbol() {
vec4 red = textureLoadExternal(t_2, ext_tex_plane_1_1, clamp(ivec2(10), ivec2(0), ivec2((uvec2(uvec2(textureSize(t_2, 0))) - uvec2(1u)))), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 red = textureLoadExternal(t_2, ext_tex_plane_1_1, clamp(ivec2(10), ivec2(0), ivec2((uvec2(uvec2(textureSize(t_2, 0))) - uvec2(1u)))), ext_tex_params.inner);
imageStore(outImage, clamp(ivec2(0), ivec2(0), ivec2((uvec2(uvec2(imageSize(outImage))) - uvec2(1u)))), red);
vec4 green = textureLoadExternal(t_2, ext_tex_plane_1_1, clamp(ivec2(70, 118), ivec2(0), ivec2((uvec2(uvec2(textureSize(t_2, 0))) - uvec2(1u)))), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 green = textureLoadExternal(t_2, ext_tex_plane_1_1, clamp(ivec2(70, 118), ivec2(0), ivec2((uvec2(uvec2(textureSize(t_2, 0))) - uvec2(1u)))), ext_tex_params.inner);
imageStore(outImage, clamp(ivec2(1, 0), ivec2(0), ivec2((uvec2(uvec2(imageSize(outImage))) - uvec2(1u)))), green);
return;
}

View File

@ -37,7 +37,7 @@ struct ExternalTextureParams {
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
/* 0x0080 */ float3x3 gamutConversionMatrix;
/* 0x00b0 */ float2x2 rotationMatrix;
/* 0x00b0 */ float2x3 coordTransformationMatrix;
};
float3 gammaCorrection(float3 v, GammaTransferParams params) {

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 195
; Bound: 178
; Schema: 0
OpCapability Shader
OpCapability ImageQuery
@ -10,13 +10,13 @@
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -26,10 +26,9 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %t "t"
OpName %outImage "outImage"
@ -40,35 +39,25 @@
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
OpName %textureLoadExternal "textureLoadExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
OpName %val "val"
OpName %main "main"
OpName %red "red"
OpName %green "green"
OpDecorate %ext_tex_plane_1 DescriptorSet 0
OpDecorate %ext_tex_plane_1 Binding 2
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -77,12 +66,13 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 0
OpDecorate %ext_tex_params Binding 3
@ -91,19 +81,6 @@
OpDecorate %outImage NonReadable
OpDecorate %outImage DescriptorSet 0
OpDecorate %outImage Binding 1
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
%float = OpTypeFloat 32
%3 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
@ -114,11 +91,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%t = OpVariable %_ptr_UniformConstant_3 UniformConstant
%19 = OpTypeImage %float 2D 0 0 0 2 Rgba8
%_ptr_UniformConstant_19 = OpTypePointer UniformConstant %19
@ -131,31 +108,29 @@
%v3bool = OpTypeVector %bool 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%50 = OpConstantNull %v3float
%mat2v2float = OpTypeMatrix %v2float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
%70 = OpTypeFunction %v4float %3 %3 %v2int %ExternalTextureParams
%uint_1 = OpConstant %uint 1
%87 = OpConstantNull %int
%85 = OpConstantNull %int
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%100 = OpConstantNull %uint
%118 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
%99 = OpConstantNull %uint
%void = OpTypeVoid
%132 = OpTypeFunction %void
%117 = OpTypeFunction %void
%int_10 = OpConstant %int 10
%138 = OpConstantComposite %v2int %int_10 %int_10
%139 = OpConstantNull %v2int
%123 = OpConstantComposite %v2int %int_10 %int_10
%124 = OpConstantNull %v2int
%v2uint = OpTypeVector %uint 2
%int_0 = OpConstant %int 0
%146 = OpConstantComposite %v2uint %uint_1 %uint_1
%131 = OpConstantComposite %v2uint %uint_1 %uint_1
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%158 = OpConstantNull %v4float
%142 = OpConstantNull %v4float
%int_70 = OpConstant %int 70
%int_118 = OpConstant %int 118
%171 = OpConstantComposite %v2int %int_70 %int_118
%155 = OpConstantComposite %v2int %int_70 %int_118
%int_1 = OpConstant %int 1
%186 = OpConstantComposite %v2int %int_1 %87
%169 = OpConstantComposite %v2int %int_1 %85
%tint_clamp = OpFunction %v2int None %20
%e = OpFunctionParameter %v2int
%low = OpFunctionParameter %v2int
@ -206,114 +181,97 @@
%plane1 = OpFunctionParameter %3
%coord = OpFunctionParameter %v2int
%params_0 = OpFunctionParameter %ExternalTextureParams
%78 = OpLabel
%76 = OpLabel
%color = OpVariable %_ptr_Function_v3float Function %50
%80 = OpCompositeExtract %uint %params_0 0
%82 = OpIEqual %bool %80 %uint_1
OpSelectionMerge %83 None
OpBranchConditional %82 %84 %85
%84 = OpLabel
%86 = OpImageFetch %v4float %plane0 %coord Lod %87
%88 = OpVectorShuffle %v3float %86 %86 0 1 2
OpStore %color %88
OpBranch %83
%85 = OpLabel
%89 = OpImageFetch %v4float %plane0 %coord Lod %87
%90 = OpCompositeExtract %float %89 0
%91 = OpImageFetch %v4float %plane1 %coord Lod %87
%92 = OpVectorShuffle %v2float %91 %91 0 1
%93 = OpCompositeExtract %float %92 0
%94 = OpCompositeExtract %float %92 1
%96 = OpCompositeConstruct %v4float %90 %93 %94 %float_1
%97 = OpCompositeExtract %mat3v4float %params_0 2
%98 = OpVectorTimesMatrix %v3float %96 %97
OpStore %color %98
OpBranch %83
%78 = OpCompositeExtract %uint %params_0 0
%80 = OpIEqual %bool %78 %uint_1
OpSelectionMerge %81 None
OpBranchConditional %80 %82 %83
%82 = OpLabel
%84 = OpImageFetch %v4float %plane0 %coord Lod %85
%86 = OpVectorShuffle %v3float %84 %84 0 1 2
OpStore %color %86
OpBranch %81
%83 = OpLabel
%99 = OpCompositeExtract %uint %params_0 1
%101 = OpIEqual %bool %99 %100
OpSelectionMerge %102 None
OpBranchConditional %101 %103 %102
%103 = OpLabel
%105 = OpLoad %v3float %color
%106 = OpCompositeExtract %GammaTransferParams %params_0 3
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
OpStore %color %104
%107 = OpCompositeExtract %mat3v3float %params_0 5
%108 = OpLoad %v3float %color
%109 = OpMatrixTimesVector %v3float %107 %108
OpStore %color %109
%111 = OpLoad %v3float %color
%112 = OpCompositeExtract %GammaTransferParams %params_0 4
%110 = OpFunctionCall %v3float %gammaCorrection %111 %112
OpStore %color %110
OpBranch %102
%87 = OpImageFetch %v4float %plane0 %coord Lod %85
%88 = OpCompositeExtract %float %87 0
%89 = OpImageFetch %v4float %plane1 %coord Lod %85
%91 = OpVectorShuffle %v2float %89 %89 0 1
%92 = OpCompositeExtract %float %91 0
%93 = OpCompositeExtract %float %91 1
%95 = OpCompositeConstruct %v4float %88 %92 %93 %float_1
%96 = OpCompositeExtract %mat3v4float %params_0 2
%97 = OpVectorTimesMatrix %v3float %95 %96
OpStore %color %97
OpBranch %81
%81 = OpLabel
%98 = OpCompositeExtract %uint %params_0 1
%100 = OpIEqual %bool %98 %99
OpSelectionMerge %101 None
OpBranchConditional %100 %102 %101
%102 = OpLabel
%113 = OpLoad %v3float %color
%114 = OpCompositeExtract %float %113 0
%115 = OpCompositeExtract %float %113 1
%116 = OpCompositeExtract %float %113 2
%117 = OpCompositeConstruct %v4float %114 %115 %116 %float_1
OpReturnValue %117
%104 = OpLoad %v3float %color
%105 = OpCompositeExtract %GammaTransferParams %params_0 3
%103 = OpFunctionCall %v3float %gammaCorrection %104 %105
OpStore %color %103
%106 = OpCompositeExtract %mat3v3float %params_0 5
%107 = OpLoad %v3float %color
%108 = OpMatrixTimesVector %v3float %106 %107
OpStore %color %108
%110 = OpLoad %v3float %color
%111 = OpCompositeExtract %GammaTransferParams %params_0 4
%109 = OpFunctionCall %v3float %gammaCorrection %110 %111
OpStore %color %109
OpBranch %101
%101 = OpLabel
%112 = OpLoad %v3float %color
%113 = OpCompositeExtract %float %112 0
%114 = OpCompositeExtract %float %112 1
%115 = OpCompositeExtract %float %112 2
%116 = OpCompositeConstruct %v4float %113 %114 %115 %float_1
OpReturnValue %116
OpFunctionEnd
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %118
%val = OpFunctionParameter %ExternalTextureParams_std140
%121 = OpLabel
%122 = OpCompositeExtract %uint %val 0
%123 = OpCompositeExtract %uint %val 1
%124 = OpCompositeExtract %mat3v4float %val 2
%125 = OpCompositeExtract %GammaTransferParams %val 3
%126 = OpCompositeExtract %GammaTransferParams %val 4
%127 = OpCompositeExtract %mat3v3float %val 5
%128 = OpCompositeExtract %v2float %val 6
%129 = OpCompositeExtract %v2float %val 7
%130 = OpCompositeConstruct %mat2v2float %128 %129
%131 = OpCompositeConstruct %ExternalTextureParams %122 %123 %124 %125 %126 %127 %130
OpReturnValue %131
OpFunctionEnd
%main = OpFunction %void None %132
%135 = OpLabel
%red = OpVariable %_ptr_Function_v4float Function %158
%green = OpVariable %_ptr_Function_v4float Function %158
%144 = OpLoad %3 %t
%143 = OpImageQuerySizeLod %v2uint %144 %int_0
%147 = OpISub %v2uint %143 %146
%140 = OpBitcast %v2int %147
%136 = OpFunctionCall %v2int %tint_clamp %138 %139 %140
%149 = OpLoad %3 %t
%150 = OpLoad %3 %ext_tex_plane_1
%154 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%155 = OpLoad %ExternalTextureParams_std140 %154
%151 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %155
%148 = OpFunctionCall %v4float %textureLoadExternal %149 %150 %136 %151
OpStore %red %148
%163 = OpLoad %19 %outImage
%162 = OpImageQuerySize %v2uint %163
%164 = OpISub %v2uint %162 %146
%160 = OpBitcast %v2int %164
%159 = OpFunctionCall %v2int %tint_clamp %139 %139 %160
%166 = OpLoad %19 %outImage
%167 = OpLoad %v4float %red
OpImageWrite %166 %159 %167
%175 = OpLoad %3 %t
%174 = OpImageQuerySizeLod %v2uint %175 %int_0
%176 = OpISub %v2uint %174 %146
%172 = OpBitcast %v2int %176
%168 = OpFunctionCall %v2int %tint_clamp %171 %139 %172
%178 = OpLoad %3 %t
%179 = OpLoad %3 %ext_tex_plane_1
%181 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%182 = OpLoad %ExternalTextureParams_std140 %181
%180 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %182
%177 = OpFunctionCall %v4float %textureLoadExternal %178 %179 %168 %180
OpStore %green %177
%190 = OpLoad %19 %outImage
%189 = OpImageQuerySize %v2uint %190
%191 = OpISub %v2uint %189 %146
%187 = OpBitcast %v2int %191
%184 = OpFunctionCall %v2int %tint_clamp %186 %139 %187
%193 = OpLoad %19 %outImage
%194 = OpLoad %v4float %green
OpImageWrite %193 %184 %194
%main = OpFunction %void None %117
%120 = OpLabel
%red = OpVariable %_ptr_Function_v4float Function %142
%green = OpVariable %_ptr_Function_v4float Function %142
%129 = OpLoad %3 %t
%128 = OpImageQuerySizeLod %v2uint %129 %int_0
%132 = OpISub %v2uint %128 %131
%125 = OpBitcast %v2int %132
%121 = OpFunctionCall %v2int %tint_clamp %123 %124 %125
%134 = OpLoad %3 %t
%135 = OpLoad %3 %ext_tex_plane_1
%138 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%139 = OpLoad %ExternalTextureParams %138
%133 = OpFunctionCall %v4float %textureLoadExternal %134 %135 %121 %139
OpStore %red %133
%147 = OpLoad %19 %outImage
%146 = OpImageQuerySize %v2uint %147
%148 = OpISub %v2uint %146 %131
%144 = OpBitcast %v2int %148
%143 = OpFunctionCall %v2int %tint_clamp %124 %124 %144
%150 = OpLoad %19 %outImage
%151 = OpLoad %v4float %red
OpImageWrite %150 %143 %151
%159 = OpLoad %3 %t
%158 = OpImageQuerySizeLod %v2uint %159 %int_0
%160 = OpISub %v2uint %158 %131
%156 = OpBitcast %v2int %160
%152 = OpFunctionCall %v2int %tint_clamp %155 %124 %156
%162 = OpLoad %3 %t
%163 = OpLoad %3 %ext_tex_plane_1
%164 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%165 = OpLoad %ExternalTextureParams %164
%161 = OpFunctionCall %v4float %textureLoadExternal %162 %163 %152 %165
OpStore %green %161
%173 = OpLoad %19 %outImage
%172 = OpImageQuerySize %v2uint %173
%174 = OpISub %v2uint %172 %131
%170 = OpBitcast %v2int %174
%167 = OpFunctionCall %v2int %tint_clamp %169 %124 %170
%176 = OpLoad %19 %outImage
%177 = OpLoad %v4float %green
OpImageWrite %176 %167 %177
OpReturn
OpFunctionEnd

View File

@ -16,7 +16,7 @@ struct ExternalTextureParams {
gammaDecodeParams : GammaTransferParams,
gammaEncodeParams : GammaTransferParams,
gamutConversionMatrix : mat3x3<f32>,
rotationMatrix : mat2x2<f32>,
coordTransformationMatrix : mat2x3<f32>,
}
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;

View File

@ -1,6 +1,6 @@
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);

View File

@ -1,6 +1,6 @@
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
uniform highp sampler2D arg_0_1;
@ -75,22 +64,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
uniform highp sampler2D arg_0_1;
@ -126,22 +104,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
uniform highp sampler2D arg_0_1;

View File

@ -19,7 +19,7 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {

View File

@ -14,13 +14,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -30,10 +30,9 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
@ -46,14 +45,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 1
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -62,12 +61,13 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
@ -89,11 +89,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%void = OpTypeVoid
%23 = OpTypeFunction %void

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, u
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureLoad_1bfdfb() {

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, u
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureLoad_1bfdfb() {

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -60,12 +49,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_1bfdfb() {
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
}
vec4 vertex_main() {
@ -102,22 +87,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -144,12 +118,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_1bfdfb() {
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
}
void fragment_main() {
@ -180,22 +150,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -222,12 +181,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_1bfdfb() {
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
}
void compute_main() {

View File

@ -33,7 +33,7 @@ struct ExternalTextureParams {
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
/* 0x0080 */ float3x3 gamutConversionMatrix;
/* 0x00b0 */ float2x2 rotationMatrix;
/* 0x00b0 */ float2x3 coordTransformationMatrix;
};
float3 gammaCorrection(float3 v, GammaTransferParams params) {

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 155
; Bound: 139
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
@ -14,13 +14,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -30,31 +30,20 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
OpName %textureLoadExternal "textureLoadExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
OpName %val "val"
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -65,14 +54,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 1
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -81,30 +70,18 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
@ -121,11 +98,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
%bool = OpTypeBool
@ -133,22 +110,20 @@
%_ptr_Function_v3float = OpTypePointer Function %v3float
%43 = OpConstantNull %v3float
%v2uint = OpTypeVector %uint 2
%mat2v2float = OpTypeMatrix %v2float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
%uint_1 = OpConstant %uint 1
%int = OpTypeInt 32 1
%82 = OpConstantNull %int
%80 = OpConstantNull %int
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%95 = OpConstantNull %uint
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
%94 = OpConstantNull %uint
%void = OpTypeVoid
%127 = OpTypeFunction %void
%134 = OpConstantComposite %v2uint %uint_1 %uint_1
%112 = OpTypeFunction %void
%119 = OpConstantComposite %v2uint %uint_1 %uint_1
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%142 = OpTypeFunction %v4float
%126 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %23
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@ -190,102 +165,86 @@
%plane1 = OpFunctionParameter %11
%coord = OpFunctionParameter %v2uint
%params_0 = OpFunctionParameter %ExternalTextureParams
%72 = OpLabel
%70 = OpLabel
%color = OpVariable %_ptr_Function_v3float Function %43
%74 = OpCompositeExtract %uint %params_0 0
%76 = OpIEqual %bool %74 %uint_1
OpSelectionMerge %77 None
OpBranchConditional %76 %78 %79
%78 = OpLabel
%80 = OpImageFetch %v4float %plane0 %coord Lod %82
%83 = OpVectorShuffle %v3float %80 %80 0 1 2
OpStore %color %83
OpBranch %77
%79 = OpLabel
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
%85 = OpCompositeExtract %float %84 0
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
%87 = OpVectorShuffle %v2float %86 %86 0 1
%88 = OpCompositeExtract %float %87 0
%89 = OpCompositeExtract %float %87 1
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
%92 = OpCompositeExtract %mat3v4float %params_0 2
%93 = OpVectorTimesMatrix %v3float %91 %92
OpStore %color %93
OpBranch %77
%72 = OpCompositeExtract %uint %params_0 0
%74 = OpIEqual %bool %72 %uint_1
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %77
%76 = OpLabel
%78 = OpImageFetch %v4float %plane0 %coord Lod %80
%81 = OpVectorShuffle %v3float %78 %78 0 1 2
OpStore %color %81
OpBranch %75
%77 = OpLabel
%94 = OpCompositeExtract %uint %params_0 1
%96 = OpIEqual %bool %94 %95
OpSelectionMerge %97 None
OpBranchConditional %96 %98 %97
%98 = OpLabel
%100 = OpLoad %v3float %color
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
OpStore %color %99
%102 = OpCompositeExtract %mat3v3float %params_0 5
%103 = OpLoad %v3float %color
%104 = OpMatrixTimesVector %v3float %102 %103
OpStore %color %104
%106 = OpLoad %v3float %color
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
OpStore %color %105
OpBranch %97
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
%83 = OpCompositeExtract %float %82 0
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
%86 = OpVectorShuffle %v2float %84 %84 0 1
%87 = OpCompositeExtract %float %86 0
%88 = OpCompositeExtract %float %86 1
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
%91 = OpCompositeExtract %mat3v4float %params_0 2
%92 = OpVectorTimesMatrix %v3float %90 %91
OpStore %color %92
OpBranch %75
%75 = OpLabel
%93 = OpCompositeExtract %uint %params_0 1
%95 = OpIEqual %bool %93 %94
OpSelectionMerge %96 None
OpBranchConditional %95 %97 %96
%97 = OpLabel
%108 = OpLoad %v3float %color
%109 = OpCompositeExtract %float %108 0
%110 = OpCompositeExtract %float %108 1
%111 = OpCompositeExtract %float %108 2
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
OpReturnValue %112
%99 = OpLoad %v3float %color
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
OpStore %color %98
%101 = OpCompositeExtract %mat3v3float %params_0 5
%102 = OpLoad %v3float %color
%103 = OpMatrixTimesVector %v3float %101 %102
OpStore %color %103
%105 = OpLoad %v3float %color
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
OpStore %color %104
OpBranch %96
%96 = OpLabel
%107 = OpLoad %v3float %color
%108 = OpCompositeExtract %float %107 0
%109 = OpCompositeExtract %float %107 1
%110 = OpCompositeExtract %float %107 2
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
OpReturnValue %111
OpFunctionEnd
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
%val = OpFunctionParameter %ExternalTextureParams_std140
%116 = OpLabel
%117 = OpCompositeExtract %uint %val 0
%118 = OpCompositeExtract %uint %val 1
%119 = OpCompositeExtract %mat3v4float %val 2
%120 = OpCompositeExtract %GammaTransferParams %val 3
%121 = OpCompositeExtract %GammaTransferParams %val 4
%122 = OpCompositeExtract %mat3v3float %val 5
%123 = OpCompositeExtract %v2float %val 6
%124 = OpCompositeExtract %v2float %val 7
%125 = OpCompositeConstruct %mat2v2float %123 %124
%126 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %125
OpReturnValue %126
OpFunctionEnd
%textureLoad_1bfdfb = OpFunction %void None %127
%130 = OpLabel
%textureLoad_1bfdfb = OpFunction %void None %112
%115 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%132 = OpLoad %11 %arg_0
%133 = OpLoad %11 %ext_tex_plane_1
%138 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%139 = OpLoad %ExternalTextureParams_std140 %138
%135 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %139
%131 = OpFunctionCall %v4float %textureLoadExternal %132 %133 %134 %135
OpStore %res %131
%117 = OpLoad %11 %arg_0
%118 = OpLoad %11 %ext_tex_plane_1
%122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%123 = OpLoad %ExternalTextureParams %122
%116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %119 %123
OpStore %res %116
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %142
%144 = OpLabel
%145 = OpFunctionCall %void %textureLoad_1bfdfb
%vertex_main_inner = OpFunction %v4float None %126
%128 = OpLabel
%129 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %127
%147 = OpLabel
%148 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %148
%vertex_main = OpFunction %void None %112
%131 = OpLabel
%132 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %132
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %127
%150 = OpLabel
%151 = OpFunctionCall %void %textureLoad_1bfdfb
%fragment_main = OpFunction %void None %112
%134 = OpLabel
%135 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %127
%153 = OpLabel
%154 = OpFunctionCall %void %textureLoad_1bfdfb
%compute_main = OpFunction %void None %112
%137 = OpLabel
%138 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturn
OpFunctionEnd

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureLoad_8acf41() {

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureLoad_8acf41() {

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -60,12 +49,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_8acf41() {
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
}
vec4 vertex_main() {
@ -102,22 +87,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -144,12 +118,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_8acf41() {
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
}
void fragment_main() {
@ -180,22 +150,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -222,12 +181,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_8acf41() {
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
}
void compute_main() {

View File

@ -33,7 +33,7 @@ struct ExternalTextureParams {
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
/* 0x0080 */ float3x3 gamutConversionMatrix;
/* 0x00b0 */ float2x2 rotationMatrix;
/* 0x00b0 */ float2x3 coordTransformationMatrix;
};
float3 gammaCorrection(float3 v, GammaTransferParams params) {

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 156
; Bound: 140
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
@ -14,13 +14,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -30,31 +30,20 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
OpName %textureLoadExternal "textureLoadExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
OpName %val "val"
OpName %textureLoad_8acf41 "textureLoad_8acf41"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -65,14 +54,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 1
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -81,30 +70,18 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
@ -121,11 +98,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
%bool = OpTypeBool
@ -134,22 +111,20 @@
%43 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%mat2v2float = OpTypeMatrix %v2float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
%uint_1 = OpConstant %uint 1
%82 = OpConstantNull %int
%80 = OpConstantNull %int
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%95 = OpConstantNull %uint
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
%94 = OpConstantNull %uint
%void = OpTypeVoid
%127 = OpTypeFunction %void
%112 = OpTypeFunction %void
%int_1 = OpConstant %int 1
%135 = OpConstantComposite %v2int %int_1 %int_1
%120 = OpConstantComposite %v2int %int_1 %int_1
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%143 = OpTypeFunction %v4float
%127 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %23
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@ -191,102 +166,86 @@
%plane1 = OpFunctionParameter %11
%coord = OpFunctionParameter %v2int
%params_0 = OpFunctionParameter %ExternalTextureParams
%73 = OpLabel
%71 = OpLabel
%color = OpVariable %_ptr_Function_v3float Function %43
%75 = OpCompositeExtract %uint %params_0 0
%77 = OpIEqual %bool %75 %uint_1
OpSelectionMerge %78 None
OpBranchConditional %77 %79 %80
%79 = OpLabel
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
OpStore %color %83
OpBranch %78
%80 = OpLabel
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
%85 = OpCompositeExtract %float %84 0
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
%87 = OpVectorShuffle %v2float %86 %86 0 1
%88 = OpCompositeExtract %float %87 0
%89 = OpCompositeExtract %float %87 1
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
%92 = OpCompositeExtract %mat3v4float %params_0 2
%93 = OpVectorTimesMatrix %v3float %91 %92
OpStore %color %93
OpBranch %78
%73 = OpCompositeExtract %uint %params_0 0
%75 = OpIEqual %bool %73 %uint_1
OpSelectionMerge %76 None
OpBranchConditional %75 %77 %78
%77 = OpLabel
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
OpStore %color %81
OpBranch %76
%78 = OpLabel
%94 = OpCompositeExtract %uint %params_0 1
%96 = OpIEqual %bool %94 %95
OpSelectionMerge %97 None
OpBranchConditional %96 %98 %97
%98 = OpLabel
%100 = OpLoad %v3float %color
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
OpStore %color %99
%102 = OpCompositeExtract %mat3v3float %params_0 5
%103 = OpLoad %v3float %color
%104 = OpMatrixTimesVector %v3float %102 %103
OpStore %color %104
%106 = OpLoad %v3float %color
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
OpStore %color %105
OpBranch %97
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
%83 = OpCompositeExtract %float %82 0
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
%86 = OpVectorShuffle %v2float %84 %84 0 1
%87 = OpCompositeExtract %float %86 0
%88 = OpCompositeExtract %float %86 1
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
%91 = OpCompositeExtract %mat3v4float %params_0 2
%92 = OpVectorTimesMatrix %v3float %90 %91
OpStore %color %92
OpBranch %76
%76 = OpLabel
%93 = OpCompositeExtract %uint %params_0 1
%95 = OpIEqual %bool %93 %94
OpSelectionMerge %96 None
OpBranchConditional %95 %97 %96
%97 = OpLabel
%108 = OpLoad %v3float %color
%109 = OpCompositeExtract %float %108 0
%110 = OpCompositeExtract %float %108 1
%111 = OpCompositeExtract %float %108 2
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
OpReturnValue %112
%99 = OpLoad %v3float %color
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
OpStore %color %98
%101 = OpCompositeExtract %mat3v3float %params_0 5
%102 = OpLoad %v3float %color
%103 = OpMatrixTimesVector %v3float %101 %102
OpStore %color %103
%105 = OpLoad %v3float %color
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
OpStore %color %104
OpBranch %96
%96 = OpLabel
%107 = OpLoad %v3float %color
%108 = OpCompositeExtract %float %107 0
%109 = OpCompositeExtract %float %107 1
%110 = OpCompositeExtract %float %107 2
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
OpReturnValue %111
OpFunctionEnd
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
%val = OpFunctionParameter %ExternalTextureParams_std140
%116 = OpLabel
%117 = OpCompositeExtract %uint %val 0
%118 = OpCompositeExtract %uint %val 1
%119 = OpCompositeExtract %mat3v4float %val 2
%120 = OpCompositeExtract %GammaTransferParams %val 3
%121 = OpCompositeExtract %GammaTransferParams %val 4
%122 = OpCompositeExtract %mat3v3float %val 5
%123 = OpCompositeExtract %v2float %val 6
%124 = OpCompositeExtract %v2float %val 7
%125 = OpCompositeConstruct %mat2v2float %123 %124
%126 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %125
OpReturnValue %126
OpFunctionEnd
%textureLoad_8acf41 = OpFunction %void None %127
%130 = OpLabel
%textureLoad_8acf41 = OpFunction %void None %112
%115 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%132 = OpLoad %11 %arg_0
%133 = OpLoad %11 %ext_tex_plane_1
%139 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%140 = OpLoad %ExternalTextureParams_std140 %139
%136 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %140
%131 = OpFunctionCall %v4float %textureLoadExternal %132 %133 %135 %136
OpStore %res %131
%117 = OpLoad %11 %arg_0
%118 = OpLoad %11 %ext_tex_plane_1
%123 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%124 = OpLoad %ExternalTextureParams %123
%116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %120 %124
OpStore %res %116
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %143
%145 = OpLabel
%146 = OpFunctionCall %void %textureLoad_8acf41
%vertex_main_inner = OpFunction %v4float None %127
%129 = OpLabel
%130 = OpFunctionCall %void %textureLoad_8acf41
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %127
%148 = OpLabel
%149 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %149
%vertex_main = OpFunction %void None %112
%132 = OpLabel
%133 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %133
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %127
%151 = OpLabel
%152 = OpFunctionCall %void %textureLoad_8acf41
%fragment_main = OpFunction %void None %112
%135 = OpLabel
%136 = OpFunctionCall %void %textureLoad_8acf41
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %127
%154 = OpLabel
%155 = OpFunctionCall %void %textureLoad_8acf41
%compute_main = OpFunction %void None %112
%138 = OpLabel
%139 = OpFunctionCall %void %textureLoad_8acf41
OpReturn
OpFunctionEnd

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
cbuffer cbuffer_ext_tex_params : register(b3, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
@ -33,7 +33,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
}
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
const float2 modifiedCoords = (mul(params.rotationMatrix, (coord - 0.5f)) + 0.5f);
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
int3 tint_tmp;
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
const float2 plane0_dims = float2(tint_tmp.xy);
@ -58,14 +58,14 @@ float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1,
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -74,30 +74,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureSampleBaseClampToEdge_7c04e6() {

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
cbuffer cbuffer_ext_tex_params : register(b3, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
@ -33,7 +33,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
}
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
const float2 modifiedCoords = (mul(params.rotationMatrix, (coord - 0.5f)) + 0.5f);
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
int3 tint_tmp;
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
const float2 plane0_dims = float2(tint_tmp.xy);
@ -58,14 +58,14 @@ float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1,
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -74,30 +74,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureSampleBaseClampToEdge_7c04e6() {

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -45,7 +34,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
@ -70,12 +59,8 @@ uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureSampleBaseClampToEdge_7c04e6() {
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner);
}
vec4 vertex_main() {
@ -112,22 +97,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -139,7 +113,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
@ -164,12 +138,8 @@ uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureSampleBaseClampToEdge_7c04e6() {
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner);
}
void fragment_main() {
@ -200,22 +170,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -227,7 +186,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
@ -252,12 +211,8 @@ uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureSampleBaseClampToEdge_7c04e6() {
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner);
}
void compute_main() {

View File

@ -33,7 +33,7 @@ struct ExternalTextureParams {
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
/* 0x0080 */ float3x3 gamutConversionMatrix;
/* 0x00b0 */ float2x2 rotationMatrix;
/* 0x00b0 */ float2x3 coordTransformationMatrix;
};
float3 gammaCorrection(float3 v, GammaTransferParams params) {
@ -44,7 +44,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
}
float4 textureSampleExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, sampler smp, float2 coord, ExternalTextureParams params) {
float2 const modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
float2 const modifiedCoords = (float3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
float2 const plane0_dims = float2(uint2(plane0.get_width(0), plane0.get_height(0)));
float2 const plane0_half_texel = (float2(0.5f) / plane0_dims);
float2 const plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 190
; Bound: 174
; Schema: 0
OpCapability Shader
OpCapability ImageQuery
@ -15,13 +15,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -31,24 +31,15 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %arg_1 "arg_1"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
OpName %textureSampleExternal "textureSampleExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
@ -56,8 +47,6 @@
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
OpName %val "val"
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -68,14 +57,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 2
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -84,12 +73,13 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 3
@ -97,19 +87,6 @@
OpDecorate %arg_0 Binding 0
OpDecorate %arg_1 DescriptorSet 1
OpDecorate %arg_1 Binding 1
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
@ -126,11 +103,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%25 = OpTypeSampler
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
@ -140,28 +117,26 @@
%v3bool = OpTypeVector %bool 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%46 = OpConstantNull %v3float
%mat2v2float = OpTypeMatrix %v2float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
%v2float = OpTypeVector %float 2
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
%float_0_5 = OpConstant %float 0.5
%_ptr_Function_v2float = OpTypePointer Function %v2float
%80 = OpConstantNull %v2float
%79 = OpConstantNull %v2float
%float_1 = OpConstant %float 1
%v2uint = OpTypeVector %uint 2
%int = OpTypeInt 32 1
%91 = OpConstantNull %int
%92 = OpConstantComposite %v2float %float_0_5 %float_0_5
%float_1 = OpConstant %float 1
%uint_1 = OpConstant %uint 1
%114 = OpTypeSampledImage %11
%129 = OpConstantNull %uint
%147 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
%113 = OpTypeSampledImage %11
%128 = OpConstantNull %uint
%void = OpTypeVoid
%161 = OpTypeFunction %void
%169 = OpConstantComposite %v2float %float_1 %float_1
%146 = OpTypeFunction %void
%154 = OpConstantComposite %v2float %float_1 %float_1
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%177 = OpTypeFunction %v4float
%161 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %26
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@ -204,128 +179,112 @@
%smp = OpFunctionParameter %25
%coord = OpFunctionParameter %v2float
%params_0 = OpFunctionParameter %ExternalTextureParams
%75 = OpLabel
%78 = OpVariable %_ptr_Function_v2float Function %80
%85 = OpVariable %_ptr_Function_v2float Function %80
%97 = OpVariable %_ptr_Function_v2float Function %80
%104 = OpVariable %_ptr_Function_v2float Function %80
%74 = OpLabel
%77 = OpVariable %_ptr_Function_v2float Function %79
%96 = OpVariable %_ptr_Function_v2float Function %79
%103 = OpVariable %_ptr_Function_v2float Function %79
%color = OpVariable %_ptr_Function_v3float Function %46
%81 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
%77 = OpFSub %v2float %coord %81
%82 = OpCompositeExtract %mat2v2float %params_0 6
%83 = OpVectorTimesMatrix %v2float %77 %82
%86 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
%84 = OpFAdd %v2float %83 %86
%80 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
%76 = OpFSub %v2float %coord %80
%81 = OpCompositeExtract %float %76 0
%82 = OpCompositeExtract %float %76 1
%84 = OpCompositeConstruct %v3float %81 %82 %float_1
%85 = OpCompositeExtract %mat2v3float %params_0 6
%86 = OpVectorTimesMatrix %v2float %84 %85
%88 = OpImageQuerySizeLod %v2uint %plane0 %91
%87 = OpConvertUToF %v2float %88
%93 = OpFDiv %v2float %92 %87
%98 = OpCompositeConstruct %v2float %float_1 %float_1
%96 = OpFSub %v2float %98 %93
%94 = OpExtInst %v2float %32 NClamp %84 %93 %96
%100 = OpImageQuerySizeLod %v2uint %plane1 %91
%99 = OpConvertUToF %v2float %100
%101 = OpFDiv %v2float %92 %99
%105 = OpCompositeConstruct %v2float %float_1 %float_1
%103 = OpFSub %v2float %105 %101
%102 = OpExtInst %v2float %32 NClamp %84 %101 %103
%107 = OpCompositeExtract %uint %params_0 0
%109 = OpIEqual %bool %107 %uint_1
OpSelectionMerge %110 None
OpBranchConditional %109 %111 %112
%111 = OpLabel
%115 = OpSampledImage %114 %plane0 %smp
%113 = OpImageSampleExplicitLod %v4float %115 %94 Lod %8
%116 = OpVectorShuffle %v3float %113 %113 0 1 2
OpStore %color %116
OpBranch %110
%112 = OpLabel
%118 = OpSampledImage %114 %plane0 %smp
%117 = OpImageSampleExplicitLod %v4float %118 %94 Lod %8
%119 = OpCompositeExtract %float %117 0
%121 = OpSampledImage %114 %plane1 %smp
%120 = OpImageSampleExplicitLod %v4float %121 %102 Lod %8
%122 = OpVectorShuffle %v2float %120 %120 0 1
%123 = OpCompositeExtract %float %122 0
%124 = OpCompositeExtract %float %122 1
%125 = OpCompositeConstruct %v4float %119 %123 %124 %float_1
%126 = OpCompositeExtract %mat3v4float %params_0 2
%127 = OpVectorTimesMatrix %v3float %125 %126
OpStore %color %127
OpBranch %110
%97 = OpCompositeConstruct %v2float %float_1 %float_1
%95 = OpFSub %v2float %97 %93
%94 = OpExtInst %v2float %32 NClamp %86 %93 %95
%99 = OpImageQuerySizeLod %v2uint %plane1 %91
%98 = OpConvertUToF %v2float %99
%100 = OpFDiv %v2float %92 %98
%104 = OpCompositeConstruct %v2float %float_1 %float_1
%102 = OpFSub %v2float %104 %100
%101 = OpExtInst %v2float %32 NClamp %86 %100 %102
%106 = OpCompositeExtract %uint %params_0 0
%108 = OpIEqual %bool %106 %uint_1
OpSelectionMerge %109 None
OpBranchConditional %108 %110 %111
%110 = OpLabel
%128 = OpCompositeExtract %uint %params_0 1
%130 = OpIEqual %bool %128 %129
OpSelectionMerge %131 None
OpBranchConditional %130 %132 %131
%132 = OpLabel
%134 = OpLoad %v3float %color
%135 = OpCompositeExtract %GammaTransferParams %params_0 3
%133 = OpFunctionCall %v3float %gammaCorrection %134 %135
OpStore %color %133
%136 = OpCompositeExtract %mat3v3float %params_0 5
%137 = OpLoad %v3float %color
%138 = OpMatrixTimesVector %v3float %136 %137
OpStore %color %138
%140 = OpLoad %v3float %color
%141 = OpCompositeExtract %GammaTransferParams %params_0 4
%139 = OpFunctionCall %v3float %gammaCorrection %140 %141
OpStore %color %139
OpBranch %131
%114 = OpSampledImage %113 %plane0 %smp
%112 = OpImageSampleExplicitLod %v4float %114 %94 Lod %8
%115 = OpVectorShuffle %v3float %112 %112 0 1 2
OpStore %color %115
OpBranch %109
%111 = OpLabel
%117 = OpSampledImage %113 %plane0 %smp
%116 = OpImageSampleExplicitLod %v4float %117 %94 Lod %8
%118 = OpCompositeExtract %float %116 0
%120 = OpSampledImage %113 %plane1 %smp
%119 = OpImageSampleExplicitLod %v4float %120 %101 Lod %8
%121 = OpVectorShuffle %v2float %119 %119 0 1
%122 = OpCompositeExtract %float %121 0
%123 = OpCompositeExtract %float %121 1
%124 = OpCompositeConstruct %v4float %118 %122 %123 %float_1
%125 = OpCompositeExtract %mat3v4float %params_0 2
%126 = OpVectorTimesMatrix %v3float %124 %125
OpStore %color %126
OpBranch %109
%109 = OpLabel
%127 = OpCompositeExtract %uint %params_0 1
%129 = OpIEqual %bool %127 %128
OpSelectionMerge %130 None
OpBranchConditional %129 %131 %130
%131 = OpLabel
%142 = OpLoad %v3float %color
%143 = OpCompositeExtract %float %142 0
%144 = OpCompositeExtract %float %142 1
%145 = OpCompositeExtract %float %142 2
%146 = OpCompositeConstruct %v4float %143 %144 %145 %float_1
OpReturnValue %146
%133 = OpLoad %v3float %color
%134 = OpCompositeExtract %GammaTransferParams %params_0 3
%132 = OpFunctionCall %v3float %gammaCorrection %133 %134
OpStore %color %132
%135 = OpCompositeExtract %mat3v3float %params_0 5
%136 = OpLoad %v3float %color
%137 = OpMatrixTimesVector %v3float %135 %136
OpStore %color %137
%139 = OpLoad %v3float %color
%140 = OpCompositeExtract %GammaTransferParams %params_0 4
%138 = OpFunctionCall %v3float %gammaCorrection %139 %140
OpStore %color %138
OpBranch %130
%130 = OpLabel
%141 = OpLoad %v3float %color
%142 = OpCompositeExtract %float %141 0
%143 = OpCompositeExtract %float %141 1
%144 = OpCompositeExtract %float %141 2
%145 = OpCompositeConstruct %v4float %142 %143 %144 %float_1
OpReturnValue %145
OpFunctionEnd
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %147
%val = OpFunctionParameter %ExternalTextureParams_std140
%150 = OpLabel
%151 = OpCompositeExtract %uint %val 0
%152 = OpCompositeExtract %uint %val 1
%153 = OpCompositeExtract %mat3v4float %val 2
%154 = OpCompositeExtract %GammaTransferParams %val 3
%155 = OpCompositeExtract %GammaTransferParams %val 4
%156 = OpCompositeExtract %mat3v3float %val 5
%157 = OpCompositeExtract %v2float %val 6
%158 = OpCompositeExtract %v2float %val 7
%159 = OpCompositeConstruct %mat2v2float %157 %158
%160 = OpCompositeConstruct %ExternalTextureParams %151 %152 %153 %154 %155 %156 %159
OpReturnValue %160
OpFunctionEnd
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %161
%164 = OpLabel
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %146
%149 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%166 = OpLoad %11 %arg_0
%167 = OpLoad %11 %ext_tex_plane_1
%168 = OpLoad %25 %arg_1
%173 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%174 = OpLoad %ExternalTextureParams_std140 %173
%170 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %174
%165 = OpFunctionCall %v4float %textureSampleExternal %166 %167 %168 %169 %170
OpStore %res %165
%151 = OpLoad %11 %arg_0
%152 = OpLoad %11 %ext_tex_plane_1
%153 = OpLoad %25 %arg_1
%157 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%158 = OpLoad %ExternalTextureParams %157
%150 = OpFunctionCall %v4float %textureSampleExternal %151 %152 %153 %154 %158
OpStore %res %150
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %177
%179 = OpLabel
%180 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
%vertex_main_inner = OpFunction %v4float None %161
%163 = OpLabel
%164 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %161
%182 = OpLabel
%183 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %183
%vertex_main = OpFunction %void None %146
%166 = OpLabel
%167 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %167
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %161
%185 = OpLabel
%186 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
%fragment_main = OpFunction %void None %146
%169 = OpLabel
%170 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %161
%188 = OpLabel
%189 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
%compute_main = OpFunction %void None %146
%172 = OpLabel
%173 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,30 @@
void mix_275cac() {
float4 res = (1.0f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_275cac();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_275cac();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_275cac();
return;
}

View File

@ -0,0 +1,30 @@
void mix_275cac() {
float4 res = (1.0f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_275cac();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_275cac();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_275cac();
return;
}

View File

@ -0,0 +1,49 @@
#version 310 es
void mix_275cac() {
vec4 res = vec4(1.0f);
}
vec4 vertex_main() {
mix_275cac();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void mix_275cac() {
vec4 res = vec4(1.0f);
}
void fragment_main() {
mix_275cac();
}
void main() {
fragment_main();
return;
}
#version 310 es
void mix_275cac() {
vec4 res = vec4(1.0f);
}
void compute_main() {
mix_275cac();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void mix_275cac() {
float4 res = float4(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
mix_275cac();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
mix_275cac();
return;
}
kernel void compute_main() {
mix_275cac();
return;
}

View File

@ -0,0 +1,64 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 30
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %mix_275cac "mix_275cac"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%17 = OpTypeFunction %v4float
%mix_275cac = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %mix_275cac
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%22 = OpLabel
%23 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %23
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %void %mix_275cac
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %mix_275cac
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,22 @@
fn mix_275cac() {
const arg_0 = vec4(1.0);
const arg_1 = vec4(1.0);
const arg_2 = 1.0;
var res = mix(arg_0, arg_1, arg_2);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
mix_275cac();
return vec4<f32>();
}
@fragment
fn fragment_main() {
mix_275cac();
}
@compute @workgroup_size(1)
fn compute_main() {
mix_275cac();
}

View File

@ -0,0 +1,30 @@
void mix_30de36() {
float res = 1.0f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_30de36();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_30de36();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_30de36();
return;
}

View File

@ -0,0 +1,30 @@
void mix_30de36() {
float res = 1.0f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_30de36();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_30de36();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_30de36();
return;
}

View File

@ -0,0 +1,49 @@
#version 310 es
void mix_30de36() {
float res = 1.0f;
}
vec4 vertex_main() {
mix_30de36();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void mix_30de36() {
float res = 1.0f;
}
void fragment_main() {
mix_30de36();
}
void main() {
fragment_main();
return;
}
#version 310 es
void mix_30de36() {
float res = 1.0f;
}
void compute_main() {
mix_30de36();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void mix_30de36() {
float res = 1.0f;
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
mix_30de36();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
mix_30de36();
return;
}
kernel void compute_main() {
mix_30de36();
return;
}

View File

@ -0,0 +1,63 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %mix_30de36 "mix_30de36"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%_ptr_Function_float = OpTypePointer Function %float
%16 = OpTypeFunction %v4float
%mix_30de36 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
OpStore %res %float_1
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %16
%18 = OpLabel
%19 = OpFunctionCall %void %mix_30de36
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%21 = OpLabel
%22 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %22
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %void %mix_30de36
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %mix_30de36
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,22 @@
fn mix_30de36() {
const arg_0 = 1.0;
const arg_1 = 1.0;
const arg_2 = 1.0;
var res = mix(arg_0, arg_1, arg_2);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
mix_30de36();
return vec4<f32>();
}
@fragment
fn fragment_main() {
mix_30de36();
}
@compute @workgroup_size(1)
fn compute_main() {
mix_30de36();
}

View File

@ -0,0 +1,30 @@
void mix_343c49() {
float3 res = (1.0f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_343c49();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_343c49();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_343c49();
return;
}

View File

@ -0,0 +1,30 @@
void mix_343c49() {
float3 res = (1.0f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_343c49();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_343c49();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_343c49();
return;
}

View File

@ -0,0 +1,49 @@
#version 310 es
void mix_343c49() {
vec3 res = vec3(1.0f);
}
vec4 vertex_main() {
mix_343c49();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void mix_343c49() {
vec3 res = vec3(1.0f);
}
void fragment_main() {
mix_343c49();
}
void main() {
fragment_main();
return;
}
#version 310 es
void mix_343c49() {
vec3 res = vec3(1.0f);
}
void compute_main() {
mix_343c49();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void mix_343c49() {
float3 res = float3(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
mix_343c49();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
mix_343c49();
return;
}
kernel void compute_main() {
mix_343c49();
return;
}

View File

@ -0,0 +1,66 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %mix_343c49 "mix_343c49"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%mix_343c49 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %mix_343c49
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %mix_343c49
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %mix_343c49
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,22 @@
fn mix_343c49() {
const arg_0 = vec3(1.0);
const arg_1 = vec3(1.0);
const arg_2 = vec3(1.0);
var res = mix(arg_0, arg_1, arg_2);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
mix_343c49();
return vec4<f32>();
}
@fragment
fn fragment_main() {
mix_343c49();
}
@compute @workgroup_size(1)
fn compute_main() {
mix_343c49();
}

View File

@ -0,0 +1,30 @@
void mix_42d11d() {
float2 res = (1.0f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_42d11d();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_42d11d();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_42d11d();
return;
}

View File

@ -0,0 +1,30 @@
void mix_42d11d() {
float2 res = (1.0f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_42d11d();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_42d11d();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_42d11d();
return;
}

View File

@ -0,0 +1,49 @@
#version 310 es
void mix_42d11d() {
vec2 res = vec2(1.0f);
}
vec4 vertex_main() {
mix_42d11d();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void mix_42d11d() {
vec2 res = vec2(1.0f);
}
void fragment_main() {
mix_42d11d();
}
void main() {
fragment_main();
return;
}
#version 310 es
void mix_42d11d() {
vec2 res = vec2(1.0f);
}
void compute_main() {
mix_42d11d();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void mix_42d11d() {
float2 res = float2(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
mix_42d11d();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
mix_42d11d();
return;
}
kernel void compute_main() {
mix_42d11d();
return;
}

View File

@ -0,0 +1,66 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %mix_42d11d "mix_42d11d"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%mix_42d11d = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %mix_42d11d
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %mix_42d11d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %mix_42d11d
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,22 @@
fn mix_42d11d() {
const arg_0 = vec2(1.0);
const arg_1 = vec2(1.0);
const arg_2 = 1.0;
var res = mix(arg_0, arg_1, arg_2);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
mix_42d11d();
return vec4<f32>();
}
@fragment
fn fragment_main() {
mix_42d11d();
}
@compute @workgroup_size(1)
fn compute_main() {
mix_42d11d();
}

View File

@ -0,0 +1,30 @@
void mix_98007a() {
float4 res = (1.0f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_98007a();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_98007a();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_98007a();
return;
}

View File

@ -0,0 +1,30 @@
void mix_98007a() {
float4 res = (1.0f).xxxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_98007a();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_98007a();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_98007a();
return;
}

View File

@ -0,0 +1,49 @@
#version 310 es
void mix_98007a() {
vec4 res = vec4(1.0f);
}
vec4 vertex_main() {
mix_98007a();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void mix_98007a() {
vec4 res = vec4(1.0f);
}
void fragment_main() {
mix_98007a();
}
void main() {
fragment_main();
return;
}
#version 310 es
void mix_98007a() {
vec4 res = vec4(1.0f);
}
void compute_main() {
mix_98007a();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void mix_98007a() {
float4 res = float4(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
mix_98007a();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
mix_98007a();
return;
}
kernel void compute_main() {
mix_98007a();
return;
}

View File

@ -0,0 +1,64 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 30
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %mix_98007a "mix_98007a"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%17 = OpTypeFunction %v4float
%mix_98007a = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %mix_98007a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%22 = OpLabel
%23 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %23
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %void %mix_98007a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %mix_98007a
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,22 @@
fn mix_98007a() {
const arg_0 = vec4(1.0);
const arg_1 = vec4(1.0);
const arg_2 = vec4(1.0);
var res = mix(arg_0, arg_1, arg_2);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
mix_98007a();
return vec4<f32>();
}
@fragment
fn fragment_main() {
mix_98007a();
}
@compute @workgroup_size(1)
fn compute_main() {
mix_98007a();
}

View File

@ -0,0 +1,30 @@
void mix_9c2681() {
float3 res = (1.0f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_9c2681();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_9c2681();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_9c2681();
return;
}

View File

@ -0,0 +1,30 @@
void mix_9c2681() {
float3 res = (1.0f).xxx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_9c2681();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_9c2681();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_9c2681();
return;
}

View File

@ -0,0 +1,49 @@
#version 310 es
void mix_9c2681() {
vec3 res = vec3(1.0f);
}
vec4 vertex_main() {
mix_9c2681();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void mix_9c2681() {
vec3 res = vec3(1.0f);
}
void fragment_main() {
mix_9c2681();
}
void main() {
fragment_main();
return;
}
#version 310 es
void mix_9c2681() {
vec3 res = vec3(1.0f);
}
void compute_main() {
mix_9c2681();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void mix_9c2681() {
float3 res = float3(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
mix_9c2681();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
mix_9c2681();
return;
}
kernel void compute_main() {
mix_9c2681();
return;
}

View File

@ -0,0 +1,66 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %mix_9c2681 "mix_9c2681"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%mix_9c2681 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %mix_9c2681
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %mix_9c2681
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %mix_9c2681
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,22 @@
fn mix_9c2681() {
const arg_0 = vec3(1.0);
const arg_1 = vec3(1.0);
const arg_2 = 1.0;
var res = mix(arg_0, arg_1, arg_2);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
mix_9c2681();
return vec4<f32>();
}
@fragment
fn fragment_main() {
mix_9c2681();
}
@compute @workgroup_size(1)
fn compute_main() {
mix_9c2681();
}

View File

@ -0,0 +1,30 @@
void mix_ef3575() {
float2 res = (1.0f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_ef3575();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_ef3575();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_ef3575();
return;
}

View File

@ -0,0 +1,30 @@
void mix_ef3575() {
float2 res = (1.0f).xx;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
mix_ef3575();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
mix_ef3575();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
mix_ef3575();
return;
}

View File

@ -0,0 +1,49 @@
#version 310 es
void mix_ef3575() {
vec2 res = vec2(1.0f);
}
vec4 vertex_main() {
mix_ef3575();
return vec4(0.0f);
}
void main() {
gl_PointSize = 1.0;
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
void mix_ef3575() {
vec2 res = vec2(1.0f);
}
void fragment_main() {
mix_ef3575();
}
void main() {
fragment_main();
return;
}
#version 310 es
void mix_ef3575() {
vec2 res = vec2(1.0f);
}
void compute_main() {
mix_ef3575();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}

View File

@ -0,0 +1,33 @@
#include <metal_stdlib>
using namespace metal;
void mix_ef3575() {
float2 res = float2(1.0f);
}
struct tint_symbol {
float4 value [[position]];
};
float4 vertex_main_inner() {
mix_ef3575();
return float4(0.0f);
}
vertex tint_symbol vertex_main() {
float4 const inner_result = vertex_main_inner();
tint_symbol wrapper_result = {};
wrapper_result.value = inner_result;
return wrapper_result;
}
fragment void fragment_main() {
mix_ef3575();
return;
}
kernel void compute_main() {
mix_ef3575();
return;
}

View File

@ -0,0 +1,66 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %mix_ef3575 "mix_ef3575"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%mix_ef3575 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %mix_ef3575
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %mix_ef3575
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %mix_ef3575
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,22 @@
fn mix_ef3575() {
const arg_0 = vec2(1.0);
const arg_1 = vec2(1.0);
const arg_2 = vec2(1.0);
var res = mix(arg_0, arg_1, arg_2);
}
@vertex
fn vertex_main() -> @builtin(position) vec4<f32> {
mix_ef3575();
return vec4<f32>();
}
@fragment
fn fragment_main() {
mix_ef3575();
}
@compute @workgroup_size(1)
fn compute_main() {
mix_ef3575();
}

View File

@ -1,6 +1,6 @@
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);

View File

@ -1,6 +1,6 @@
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
uniform highp sampler2D arg_0_1;
@ -75,22 +64,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
uniform highp sampler2D arg_0_1;
@ -126,22 +104,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
uniform highp sampler2D arg_0_1;

View File

@ -19,7 +19,7 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {

View File

@ -14,13 +14,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -30,10 +30,9 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
@ -46,14 +45,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 1
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -62,12 +61,13 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
@ -89,11 +89,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%void = OpTypeVoid
%23 = OpTypeFunction %void

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, u
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureLoad_1bfdfb() {

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, u
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureLoad_1bfdfb() {

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -60,13 +49,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_1bfdfb() {
uvec2 arg_1 = uvec2(1u);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
vec4 vertex_main() {
@ -103,22 +88,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -145,13 +119,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_1bfdfb() {
uvec2 arg_1 = uvec2(1u);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
void fragment_main() {
@ -182,22 +152,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -224,13 +183,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_1bfdfb() {
uvec2 arg_1 = uvec2(1u);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
void compute_main() {

View File

@ -33,7 +33,7 @@ struct ExternalTextureParams {
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
/* 0x0080 */ float3x3 gamutConversionMatrix;
/* 0x00b0 */ float2x2 rotationMatrix;
/* 0x00b0 */ float2x3 coordTransformationMatrix;
};
float3 gammaCorrection(float3 v, GammaTransferParams params) {

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 159
; Bound: 143
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
@ -14,13 +14,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -30,31 +30,20 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
OpName %textureLoadExternal "textureLoadExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
OpName %val "val"
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
OpName %arg_1 "arg_1"
OpName %res "res"
@ -66,14 +55,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 1
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -82,30 +71,18 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
@ -122,11 +99,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
%bool = OpTypeBool
@ -134,24 +111,22 @@
%_ptr_Function_v3float = OpTypePointer Function %v3float
%43 = OpConstantNull %v3float
%v2uint = OpTypeVector %uint 2
%mat2v2float = OpTypeMatrix %v2float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
%uint_1 = OpConstant %uint 1
%int = OpTypeInt 32 1
%82 = OpConstantNull %int
%80 = OpConstantNull %int
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%95 = OpConstantNull %uint
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
%94 = OpConstantNull %uint
%void = OpTypeVoid
%127 = OpTypeFunction %void
%131 = OpConstantComposite %v2uint %uint_1 %uint_1
%112 = OpTypeFunction %void
%116 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%134 = OpConstantNull %v2uint
%119 = OpConstantNull %v2uint
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%146 = OpTypeFunction %v4float
%130 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %23
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@ -193,105 +168,89 @@
%plane1 = OpFunctionParameter %11
%coord = OpFunctionParameter %v2uint
%params_0 = OpFunctionParameter %ExternalTextureParams
%72 = OpLabel
%70 = OpLabel
%color = OpVariable %_ptr_Function_v3float Function %43
%74 = OpCompositeExtract %uint %params_0 0
%76 = OpIEqual %bool %74 %uint_1
OpSelectionMerge %77 None
OpBranchConditional %76 %78 %79
%78 = OpLabel
%80 = OpImageFetch %v4float %plane0 %coord Lod %82
%83 = OpVectorShuffle %v3float %80 %80 0 1 2
OpStore %color %83
OpBranch %77
%79 = OpLabel
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
%85 = OpCompositeExtract %float %84 0
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
%87 = OpVectorShuffle %v2float %86 %86 0 1
%88 = OpCompositeExtract %float %87 0
%89 = OpCompositeExtract %float %87 1
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
%92 = OpCompositeExtract %mat3v4float %params_0 2
%93 = OpVectorTimesMatrix %v3float %91 %92
OpStore %color %93
OpBranch %77
%72 = OpCompositeExtract %uint %params_0 0
%74 = OpIEqual %bool %72 %uint_1
OpSelectionMerge %75 None
OpBranchConditional %74 %76 %77
%76 = OpLabel
%78 = OpImageFetch %v4float %plane0 %coord Lod %80
%81 = OpVectorShuffle %v3float %78 %78 0 1 2
OpStore %color %81
OpBranch %75
%77 = OpLabel
%94 = OpCompositeExtract %uint %params_0 1
%96 = OpIEqual %bool %94 %95
OpSelectionMerge %97 None
OpBranchConditional %96 %98 %97
%98 = OpLabel
%100 = OpLoad %v3float %color
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
OpStore %color %99
%102 = OpCompositeExtract %mat3v3float %params_0 5
%103 = OpLoad %v3float %color
%104 = OpMatrixTimesVector %v3float %102 %103
OpStore %color %104
%106 = OpLoad %v3float %color
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
OpStore %color %105
OpBranch %97
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
%83 = OpCompositeExtract %float %82 0
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
%86 = OpVectorShuffle %v2float %84 %84 0 1
%87 = OpCompositeExtract %float %86 0
%88 = OpCompositeExtract %float %86 1
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
%91 = OpCompositeExtract %mat3v4float %params_0 2
%92 = OpVectorTimesMatrix %v3float %90 %91
OpStore %color %92
OpBranch %75
%75 = OpLabel
%93 = OpCompositeExtract %uint %params_0 1
%95 = OpIEqual %bool %93 %94
OpSelectionMerge %96 None
OpBranchConditional %95 %97 %96
%97 = OpLabel
%108 = OpLoad %v3float %color
%109 = OpCompositeExtract %float %108 0
%110 = OpCompositeExtract %float %108 1
%111 = OpCompositeExtract %float %108 2
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
OpReturnValue %112
%99 = OpLoad %v3float %color
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
OpStore %color %98
%101 = OpCompositeExtract %mat3v3float %params_0 5
%102 = OpLoad %v3float %color
%103 = OpMatrixTimesVector %v3float %101 %102
OpStore %color %103
%105 = OpLoad %v3float %color
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
OpStore %color %104
OpBranch %96
%96 = OpLabel
%107 = OpLoad %v3float %color
%108 = OpCompositeExtract %float %107 0
%109 = OpCompositeExtract %float %107 1
%110 = OpCompositeExtract %float %107 2
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
OpReturnValue %111
OpFunctionEnd
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
%val = OpFunctionParameter %ExternalTextureParams_std140
%116 = OpLabel
%117 = OpCompositeExtract %uint %val 0
%118 = OpCompositeExtract %uint %val 1
%119 = OpCompositeExtract %mat3v4float %val 2
%120 = OpCompositeExtract %GammaTransferParams %val 3
%121 = OpCompositeExtract %GammaTransferParams %val 4
%122 = OpCompositeExtract %mat3v3float %val 5
%123 = OpCompositeExtract %v2float %val 6
%124 = OpCompositeExtract %v2float %val 7
%125 = OpCompositeConstruct %mat2v2float %123 %124
%126 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %125
OpReturnValue %126
OpFunctionEnd
%textureLoad_1bfdfb = OpFunction %void None %127
%130 = OpLabel
%arg_1 = OpVariable %_ptr_Function_v2uint Function %134
%textureLoad_1bfdfb = OpFunction %void None %112
%115 = OpLabel
%arg_1 = OpVariable %_ptr_Function_v2uint Function %119
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %131
%136 = OpLoad %11 %arg_0
%137 = OpLoad %11 %ext_tex_plane_1
%138 = OpLoad %v2uint %arg_1
%142 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%143 = OpLoad %ExternalTextureParams_std140 %142
%139 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %143
%135 = OpFunctionCall %v4float %textureLoadExternal %136 %137 %138 %139
OpStore %res %135
OpStore %arg_1 %116
%121 = OpLoad %11 %arg_0
%122 = OpLoad %11 %ext_tex_plane_1
%123 = OpLoad %v2uint %arg_1
%126 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%127 = OpLoad %ExternalTextureParams %126
%120 = OpFunctionCall %v4float %textureLoadExternal %121 %122 %123 %127
OpStore %res %120
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %146
%148 = OpLabel
%149 = OpFunctionCall %void %textureLoad_1bfdfb
%vertex_main_inner = OpFunction %v4float None %130
%132 = OpLabel
%133 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %127
%151 = OpLabel
%152 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %152
%vertex_main = OpFunction %void None %112
%135 = OpLabel
%136 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %136
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %127
%154 = OpLabel
%155 = OpFunctionCall %void %textureLoad_1bfdfb
%fragment_main = OpFunction %void None %112
%138 = OpLabel
%139 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %127
%157 = OpLabel
%158 = OpFunctionCall %void %textureLoad_1bfdfb
%compute_main = OpFunction %void None %112
%141 = OpLabel
%142 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturn
OpFunctionEnd

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureLoad_8acf41() {

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureLoad_8acf41() {

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -60,13 +49,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_8acf41() {
ivec2 arg_1 = ivec2(1);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
vec4 vertex_main() {
@ -103,22 +88,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -145,13 +119,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_8acf41() {
ivec2 arg_1 = ivec2(1);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
void fragment_main() {
@ -182,22 +152,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -224,13 +183,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureLoad_8acf41() {
ivec2 arg_1 = ivec2(1);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
void compute_main() {

View File

@ -33,7 +33,7 @@ struct ExternalTextureParams {
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
/* 0x0080 */ float3x3 gamutConversionMatrix;
/* 0x00b0 */ float2x2 rotationMatrix;
/* 0x00b0 */ float2x3 coordTransformationMatrix;
};
float3 gammaCorrection(float3 v, GammaTransferParams params) {

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 160
; Bound: 144
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
@ -14,13 +14,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -30,31 +30,20 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
OpName %textureLoadExternal "textureLoadExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
OpName %val "val"
OpName %textureLoad_8acf41 "textureLoad_8acf41"
OpName %arg_1 "arg_1"
OpName %res "res"
@ -66,14 +55,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 1
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -82,30 +71,18 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
@ -122,11 +99,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
%bool = OpTypeBool
@ -135,24 +112,22 @@
%43 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%mat2v2float = OpTypeMatrix %v2float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
%uint_1 = OpConstant %uint 1
%82 = OpConstantNull %int
%80 = OpConstantNull %int
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%95 = OpConstantNull %uint
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
%94 = OpConstantNull %uint
%void = OpTypeVoid
%127 = OpTypeFunction %void
%112 = OpTypeFunction %void
%int_1 = OpConstant %int 1
%132 = OpConstantComposite %v2int %int_1 %int_1
%117 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
%135 = OpConstantNull %v2int
%120 = OpConstantNull %v2int
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%147 = OpTypeFunction %v4float
%131 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %23
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@ -194,105 +169,89 @@
%plane1 = OpFunctionParameter %11
%coord = OpFunctionParameter %v2int
%params_0 = OpFunctionParameter %ExternalTextureParams
%73 = OpLabel
%71 = OpLabel
%color = OpVariable %_ptr_Function_v3float Function %43
%75 = OpCompositeExtract %uint %params_0 0
%77 = OpIEqual %bool %75 %uint_1
OpSelectionMerge %78 None
OpBranchConditional %77 %79 %80
%79 = OpLabel
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
OpStore %color %83
OpBranch %78
%80 = OpLabel
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
%85 = OpCompositeExtract %float %84 0
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
%87 = OpVectorShuffle %v2float %86 %86 0 1
%88 = OpCompositeExtract %float %87 0
%89 = OpCompositeExtract %float %87 1
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
%92 = OpCompositeExtract %mat3v4float %params_0 2
%93 = OpVectorTimesMatrix %v3float %91 %92
OpStore %color %93
OpBranch %78
%73 = OpCompositeExtract %uint %params_0 0
%75 = OpIEqual %bool %73 %uint_1
OpSelectionMerge %76 None
OpBranchConditional %75 %77 %78
%77 = OpLabel
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
OpStore %color %81
OpBranch %76
%78 = OpLabel
%94 = OpCompositeExtract %uint %params_0 1
%96 = OpIEqual %bool %94 %95
OpSelectionMerge %97 None
OpBranchConditional %96 %98 %97
%98 = OpLabel
%100 = OpLoad %v3float %color
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
OpStore %color %99
%102 = OpCompositeExtract %mat3v3float %params_0 5
%103 = OpLoad %v3float %color
%104 = OpMatrixTimesVector %v3float %102 %103
OpStore %color %104
%106 = OpLoad %v3float %color
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
OpStore %color %105
OpBranch %97
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
%83 = OpCompositeExtract %float %82 0
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
%86 = OpVectorShuffle %v2float %84 %84 0 1
%87 = OpCompositeExtract %float %86 0
%88 = OpCompositeExtract %float %86 1
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
%91 = OpCompositeExtract %mat3v4float %params_0 2
%92 = OpVectorTimesMatrix %v3float %90 %91
OpStore %color %92
OpBranch %76
%76 = OpLabel
%93 = OpCompositeExtract %uint %params_0 1
%95 = OpIEqual %bool %93 %94
OpSelectionMerge %96 None
OpBranchConditional %95 %97 %96
%97 = OpLabel
%108 = OpLoad %v3float %color
%109 = OpCompositeExtract %float %108 0
%110 = OpCompositeExtract %float %108 1
%111 = OpCompositeExtract %float %108 2
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
OpReturnValue %112
%99 = OpLoad %v3float %color
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
OpStore %color %98
%101 = OpCompositeExtract %mat3v3float %params_0 5
%102 = OpLoad %v3float %color
%103 = OpMatrixTimesVector %v3float %101 %102
OpStore %color %103
%105 = OpLoad %v3float %color
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
OpStore %color %104
OpBranch %96
%96 = OpLabel
%107 = OpLoad %v3float %color
%108 = OpCompositeExtract %float %107 0
%109 = OpCompositeExtract %float %107 1
%110 = OpCompositeExtract %float %107 2
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
OpReturnValue %111
OpFunctionEnd
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
%val = OpFunctionParameter %ExternalTextureParams_std140
%116 = OpLabel
%117 = OpCompositeExtract %uint %val 0
%118 = OpCompositeExtract %uint %val 1
%119 = OpCompositeExtract %mat3v4float %val 2
%120 = OpCompositeExtract %GammaTransferParams %val 3
%121 = OpCompositeExtract %GammaTransferParams %val 4
%122 = OpCompositeExtract %mat3v3float %val 5
%123 = OpCompositeExtract %v2float %val 6
%124 = OpCompositeExtract %v2float %val 7
%125 = OpCompositeConstruct %mat2v2float %123 %124
%126 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %125
OpReturnValue %126
OpFunctionEnd
%textureLoad_8acf41 = OpFunction %void None %127
%130 = OpLabel
%arg_1 = OpVariable %_ptr_Function_v2int Function %135
%textureLoad_8acf41 = OpFunction %void None %112
%115 = OpLabel
%arg_1 = OpVariable %_ptr_Function_v2int Function %120
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %132
%137 = OpLoad %11 %arg_0
%138 = OpLoad %11 %ext_tex_plane_1
%139 = OpLoad %v2int %arg_1
%143 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%144 = OpLoad %ExternalTextureParams_std140 %143
%140 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %144
%136 = OpFunctionCall %v4float %textureLoadExternal %137 %138 %139 %140
OpStore %res %136
OpStore %arg_1 %117
%122 = OpLoad %11 %arg_0
%123 = OpLoad %11 %ext_tex_plane_1
%124 = OpLoad %v2int %arg_1
%127 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%128 = OpLoad %ExternalTextureParams %127
%121 = OpFunctionCall %v4float %textureLoadExternal %122 %123 %124 %128
OpStore %res %121
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %147
%149 = OpLabel
%150 = OpFunctionCall %void %textureLoad_8acf41
%vertex_main_inner = OpFunction %v4float None %131
%133 = OpLabel
%134 = OpFunctionCall %void %textureLoad_8acf41
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %127
%152 = OpLabel
%153 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %153
%vertex_main = OpFunction %void None %112
%136 = OpLabel
%137 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %137
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %127
%155 = OpLabel
%156 = OpFunctionCall %void %textureLoad_8acf41
%fragment_main = OpFunction %void None %112
%139 = OpLabel
%140 = OpFunctionCall %void %textureLoad_8acf41
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %127
%158 = OpLabel
%159 = OpFunctionCall %void %textureLoad_8acf41
%compute_main = OpFunction %void None %112
%142 = OpLabel
%143 = OpFunctionCall %void %textureLoad_8acf41
OpReturn
OpFunctionEnd

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
cbuffer cbuffer_ext_tex_params : register(b3, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
@ -33,7 +33,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
}
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
const float2 modifiedCoords = (mul(params.rotationMatrix, (coord - 0.5f)) + 0.5f);
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
int3 tint_tmp;
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
const float2 plane0_dims = float2(tint_tmp.xy);
@ -58,14 +58,14 @@ float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1,
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -74,30 +74,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureSampleBaseClampToEdge_7c04e6() {

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
cbuffer cbuffer_ext_tex_params : register(b3, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
@ -33,7 +33,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
}
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
const float2 modifiedCoords = (mul(params.rotationMatrix, (coord - 0.5f)) + 0.5f);
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
int3 tint_tmp;
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
const float2 plane0_dims = float2(tint_tmp.xy);
@ -58,14 +58,14 @@ float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1,
return float4(color, 1.0f);
}
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_3(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -74,30 +74,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_10;
}
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_12;
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
return tint_symbol_11;
}
void textureSampleBaseClampToEdge_7c04e6() {

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -45,7 +34,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
@ -70,13 +59,9 @@ uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureSampleBaseClampToEdge_7c04e6() {
vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
vec4 vertex_main() {
@ -113,22 +98,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -140,7 +114,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
@ -165,13 +139,9 @@ uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureSampleBaseClampToEdge_7c04e6() {
vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
void fragment_main() {
@ -202,22 +172,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -229,7 +188,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
@ -254,13 +213,9 @@ uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void textureSampleBaseClampToEdge_7c04e6() {
vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, conv_ExternalTextureParams(ext_tex_params.inner));
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
void compute_main() {

View File

@ -33,7 +33,7 @@ struct ExternalTextureParams {
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
/* 0x0080 */ float3x3 gamutConversionMatrix;
/* 0x00b0 */ float2x2 rotationMatrix;
/* 0x00b0 */ float2x3 coordTransformationMatrix;
};
float3 gammaCorrection(float3 v, GammaTransferParams params) {
@ -44,7 +44,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
}
float4 textureSampleExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, sampler smp, float2 coord, ExternalTextureParams params) {
float2 const modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
float2 const modifiedCoords = (float3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
float2 const plane0_dims = float2(uint2(plane0.get_width(0), plane0.get_height(0)));
float2 const plane0_half_texel = (float2(0.5f) / plane0_dims);
float2 const plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 192
; Bound: 176
; Schema: 0
OpCapability Shader
OpCapability ImageQuery
@ -15,13 +15,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -31,24 +31,15 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %arg_1 "arg_1"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
OpName %textureSampleExternal "textureSampleExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
@ -56,8 +47,6 @@
OpName %coord "coord"
OpName %params_0 "params"
OpName %color "color"
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
OpName %val "val"
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
OpName %arg_2 "arg_2"
OpName %res "res"
@ -69,14 +58,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 2
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -85,12 +74,13 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 3
@ -98,19 +88,6 @@
OpDecorate %arg_0 Binding 0
OpDecorate %arg_1 DescriptorSet 1
OpDecorate %arg_1 Binding 1
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
@ -127,11 +104,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%25 = OpTypeSampler
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
@ -141,28 +118,26 @@
%v3bool = OpTypeVector %bool 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%46 = OpConstantNull %v3float
%mat2v2float = OpTypeMatrix %v2float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
%v2float = OpTypeVector %float 2
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
%float_0_5 = OpConstant %float 0.5
%_ptr_Function_v2float = OpTypePointer Function %v2float
%80 = OpConstantNull %v2float
%79 = OpConstantNull %v2float
%float_1 = OpConstant %float 1
%v2uint = OpTypeVector %uint 2
%int = OpTypeInt 32 1
%91 = OpConstantNull %int
%92 = OpConstantComposite %v2float %float_0_5 %float_0_5
%float_1 = OpConstant %float 1
%uint_1 = OpConstant %uint 1
%114 = OpTypeSampledImage %11
%129 = OpConstantNull %uint
%147 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
%113 = OpTypeSampledImage %11
%128 = OpConstantNull %uint
%void = OpTypeVoid
%161 = OpTypeFunction %void
%165 = OpConstantComposite %v2float %float_1 %float_1
%146 = OpTypeFunction %void
%150 = OpConstantComposite %v2float %float_1 %float_1
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
%179 = OpTypeFunction %v4float
%163 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %26
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@ -205,131 +180,115 @@
%smp = OpFunctionParameter %25
%coord = OpFunctionParameter %v2float
%params_0 = OpFunctionParameter %ExternalTextureParams
%75 = OpLabel
%78 = OpVariable %_ptr_Function_v2float Function %80
%85 = OpVariable %_ptr_Function_v2float Function %80
%97 = OpVariable %_ptr_Function_v2float Function %80
%104 = OpVariable %_ptr_Function_v2float Function %80
%74 = OpLabel
%77 = OpVariable %_ptr_Function_v2float Function %79
%96 = OpVariable %_ptr_Function_v2float Function %79
%103 = OpVariable %_ptr_Function_v2float Function %79
%color = OpVariable %_ptr_Function_v3float Function %46
%81 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
%77 = OpFSub %v2float %coord %81
%82 = OpCompositeExtract %mat2v2float %params_0 6
%83 = OpVectorTimesMatrix %v2float %77 %82
%86 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
%84 = OpFAdd %v2float %83 %86
%80 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
%76 = OpFSub %v2float %coord %80
%81 = OpCompositeExtract %float %76 0
%82 = OpCompositeExtract %float %76 1
%84 = OpCompositeConstruct %v3float %81 %82 %float_1
%85 = OpCompositeExtract %mat2v3float %params_0 6
%86 = OpVectorTimesMatrix %v2float %84 %85
%88 = OpImageQuerySizeLod %v2uint %plane0 %91
%87 = OpConvertUToF %v2float %88
%93 = OpFDiv %v2float %92 %87
%98 = OpCompositeConstruct %v2float %float_1 %float_1
%96 = OpFSub %v2float %98 %93
%94 = OpExtInst %v2float %32 NClamp %84 %93 %96
%100 = OpImageQuerySizeLod %v2uint %plane1 %91
%99 = OpConvertUToF %v2float %100
%101 = OpFDiv %v2float %92 %99
%105 = OpCompositeConstruct %v2float %float_1 %float_1
%103 = OpFSub %v2float %105 %101
%102 = OpExtInst %v2float %32 NClamp %84 %101 %103
%107 = OpCompositeExtract %uint %params_0 0
%109 = OpIEqual %bool %107 %uint_1
OpSelectionMerge %110 None
OpBranchConditional %109 %111 %112
%111 = OpLabel
%115 = OpSampledImage %114 %plane0 %smp
%113 = OpImageSampleExplicitLod %v4float %115 %94 Lod %8
%116 = OpVectorShuffle %v3float %113 %113 0 1 2
OpStore %color %116
OpBranch %110
%112 = OpLabel
%118 = OpSampledImage %114 %plane0 %smp
%117 = OpImageSampleExplicitLod %v4float %118 %94 Lod %8
%119 = OpCompositeExtract %float %117 0
%121 = OpSampledImage %114 %plane1 %smp
%120 = OpImageSampleExplicitLod %v4float %121 %102 Lod %8
%122 = OpVectorShuffle %v2float %120 %120 0 1
%123 = OpCompositeExtract %float %122 0
%124 = OpCompositeExtract %float %122 1
%125 = OpCompositeConstruct %v4float %119 %123 %124 %float_1
%126 = OpCompositeExtract %mat3v4float %params_0 2
%127 = OpVectorTimesMatrix %v3float %125 %126
OpStore %color %127
OpBranch %110
%97 = OpCompositeConstruct %v2float %float_1 %float_1
%95 = OpFSub %v2float %97 %93
%94 = OpExtInst %v2float %32 NClamp %86 %93 %95
%99 = OpImageQuerySizeLod %v2uint %plane1 %91
%98 = OpConvertUToF %v2float %99
%100 = OpFDiv %v2float %92 %98
%104 = OpCompositeConstruct %v2float %float_1 %float_1
%102 = OpFSub %v2float %104 %100
%101 = OpExtInst %v2float %32 NClamp %86 %100 %102
%106 = OpCompositeExtract %uint %params_0 0
%108 = OpIEqual %bool %106 %uint_1
OpSelectionMerge %109 None
OpBranchConditional %108 %110 %111
%110 = OpLabel
%128 = OpCompositeExtract %uint %params_0 1
%130 = OpIEqual %bool %128 %129
OpSelectionMerge %131 None
OpBranchConditional %130 %132 %131
%132 = OpLabel
%134 = OpLoad %v3float %color
%135 = OpCompositeExtract %GammaTransferParams %params_0 3
%133 = OpFunctionCall %v3float %gammaCorrection %134 %135
OpStore %color %133
%136 = OpCompositeExtract %mat3v3float %params_0 5
%137 = OpLoad %v3float %color
%138 = OpMatrixTimesVector %v3float %136 %137
OpStore %color %138
%140 = OpLoad %v3float %color
%141 = OpCompositeExtract %GammaTransferParams %params_0 4
%139 = OpFunctionCall %v3float %gammaCorrection %140 %141
OpStore %color %139
OpBranch %131
%114 = OpSampledImage %113 %plane0 %smp
%112 = OpImageSampleExplicitLod %v4float %114 %94 Lod %8
%115 = OpVectorShuffle %v3float %112 %112 0 1 2
OpStore %color %115
OpBranch %109
%111 = OpLabel
%117 = OpSampledImage %113 %plane0 %smp
%116 = OpImageSampleExplicitLod %v4float %117 %94 Lod %8
%118 = OpCompositeExtract %float %116 0
%120 = OpSampledImage %113 %plane1 %smp
%119 = OpImageSampleExplicitLod %v4float %120 %101 Lod %8
%121 = OpVectorShuffle %v2float %119 %119 0 1
%122 = OpCompositeExtract %float %121 0
%123 = OpCompositeExtract %float %121 1
%124 = OpCompositeConstruct %v4float %118 %122 %123 %float_1
%125 = OpCompositeExtract %mat3v4float %params_0 2
%126 = OpVectorTimesMatrix %v3float %124 %125
OpStore %color %126
OpBranch %109
%109 = OpLabel
%127 = OpCompositeExtract %uint %params_0 1
%129 = OpIEqual %bool %127 %128
OpSelectionMerge %130 None
OpBranchConditional %129 %131 %130
%131 = OpLabel
%142 = OpLoad %v3float %color
%143 = OpCompositeExtract %float %142 0
%144 = OpCompositeExtract %float %142 1
%145 = OpCompositeExtract %float %142 2
%146 = OpCompositeConstruct %v4float %143 %144 %145 %float_1
OpReturnValue %146
%133 = OpLoad %v3float %color
%134 = OpCompositeExtract %GammaTransferParams %params_0 3
%132 = OpFunctionCall %v3float %gammaCorrection %133 %134
OpStore %color %132
%135 = OpCompositeExtract %mat3v3float %params_0 5
%136 = OpLoad %v3float %color
%137 = OpMatrixTimesVector %v3float %135 %136
OpStore %color %137
%139 = OpLoad %v3float %color
%140 = OpCompositeExtract %GammaTransferParams %params_0 4
%138 = OpFunctionCall %v3float %gammaCorrection %139 %140
OpStore %color %138
OpBranch %130
%130 = OpLabel
%141 = OpLoad %v3float %color
%142 = OpCompositeExtract %float %141 0
%143 = OpCompositeExtract %float %141 1
%144 = OpCompositeExtract %float %141 2
%145 = OpCompositeConstruct %v4float %142 %143 %144 %float_1
OpReturnValue %145
OpFunctionEnd
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %147
%val = OpFunctionParameter %ExternalTextureParams_std140
%150 = OpLabel
%151 = OpCompositeExtract %uint %val 0
%152 = OpCompositeExtract %uint %val 1
%153 = OpCompositeExtract %mat3v4float %val 2
%154 = OpCompositeExtract %GammaTransferParams %val 3
%155 = OpCompositeExtract %GammaTransferParams %val 4
%156 = OpCompositeExtract %mat3v3float %val 5
%157 = OpCompositeExtract %v2float %val 6
%158 = OpCompositeExtract %v2float %val 7
%159 = OpCompositeConstruct %mat2v2float %157 %158
%160 = OpCompositeConstruct %ExternalTextureParams %151 %152 %153 %154 %155 %156 %159
OpReturnValue %160
OpFunctionEnd
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %161
%164 = OpLabel
%arg_2 = OpVariable %_ptr_Function_v2float Function %80
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %146
%149 = OpLabel
%arg_2 = OpVariable %_ptr_Function_v2float Function %79
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_2 %165
%168 = OpLoad %11 %arg_0
%169 = OpLoad %11 %ext_tex_plane_1
%170 = OpLoad %25 %arg_1
%171 = OpLoad %v2float %arg_2
%175 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%176 = OpLoad %ExternalTextureParams_std140 %175
%172 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %176
%167 = OpFunctionCall %v4float %textureSampleExternal %168 %169 %170 %171 %172
OpStore %res %167
OpStore %arg_2 %150
%153 = OpLoad %11 %arg_0
%154 = OpLoad %11 %ext_tex_plane_1
%155 = OpLoad %25 %arg_1
%156 = OpLoad %v2float %arg_2
%159 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%160 = OpLoad %ExternalTextureParams %159
%152 = OpFunctionCall %v4float %textureSampleExternal %153 %154 %155 %156 %160
OpStore %res %152
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %179
%181 = OpLabel
%182 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
%vertex_main_inner = OpFunction %v4float None %163
%165 = OpLabel
%166 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %161
%184 = OpLabel
%185 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %185
%vertex_main = OpFunction %void None %146
%168 = OpLabel
%169 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %169
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %161
%187 = OpLabel
%188 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
%fragment_main = OpFunction %void None %146
%171 = OpLabel
%172 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %161
%190 = OpLabel
%191 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
%compute_main = OpFunction %void None %146
%174 = OpLabel
%175 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturn
OpFunctionEnd

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -50,14 +50,14 @@ float4 textureLoad2d(Texture2D<float4> tint_symbol, Texture2D<float4> ext_tex_pl
return textureLoadExternal(tint_symbol, ext_tex_plane_1_1, coords, ext_tex_params_1);
}
float3x4 tint_symbol_4(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_4(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_6(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_6(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -66,30 +66,28 @@ GammaTransferParams tint_symbol_6(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_12 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_12;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
}
float3x3 tint_symbol_8(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_10(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_10(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_2(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_2(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_13 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
return tint_symbol_13;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
return tint_symbol_12;
}
void doTextureLoad() {

View File

@ -15,12 +15,12 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
float3x3 gamutConversionMatrix;
float2x2 rotationMatrix;
float2x3 coordTransformationMatrix;
};
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
uint4 ext_tex_params[12];
uint4 ext_tex_params[13];
};
Texture2D<float4> arg_0 : register(t0, space1);
@ -50,14 +50,14 @@ float4 textureLoad2d(Texture2D<float4> tint_symbol, Texture2D<float4> ext_tex_pl
return textureLoadExternal(tint_symbol, ext_tex_plane_1_1, coords, ext_tex_params_1);
}
float3x4 tint_symbol_4(uint4 buffer[12], uint offset) {
float3x4 tint_symbol_4(uint4 buffer[13], 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;
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
}
GammaTransferParams tint_symbol_6(uint4 buffer[12], uint offset) {
GammaTransferParams tint_symbol_6(uint4 buffer[13], uint offset) {
const uint scalar_offset_3 = ((offset + 0u)) / 4;
const uint scalar_offset_4 = ((offset + 4u)) / 4;
const uint scalar_offset_5 = ((offset + 8u)) / 4;
@ -66,30 +66,28 @@ GammaTransferParams tint_symbol_6(uint4 buffer[12], uint offset) {
const uint scalar_offset_8 = ((offset + 20u)) / 4;
const uint scalar_offset_9 = ((offset + 24u)) / 4;
const uint scalar_offset_10 = ((offset + 28u)) / 4;
const GammaTransferParams tint_symbol_12 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_12;
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
return tint_symbol_11;
}
float3x3 tint_symbol_8(uint4 buffer[12], uint offset) {
float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
const uint scalar_offset_11 = ((offset + 0u)) / 4;
const uint scalar_offset_12 = ((offset + 16u)) / 4;
const uint scalar_offset_13 = ((offset + 32u)) / 4;
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
}
float2x2 tint_symbol_10(uint4 buffer[12], uint offset) {
float2x3 tint_symbol_10(uint4 buffer[13], uint offset) {
const uint scalar_offset_14 = ((offset + 0u)) / 4;
uint4 ubo_load = buffer[scalar_offset_14 / 4];
const uint scalar_offset_15 = ((offset + 8u)) / 4;
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
const uint scalar_offset_15 = ((offset + 16u)) / 4;
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
}
ExternalTextureParams tint_symbol_2(uint4 buffer[12], uint offset) {
ExternalTextureParams tint_symbol_2(uint4 buffer[13], uint offset) {
const uint scalar_offset_16 = ((offset + 0u)) / 4;
const uint scalar_offset_17 = ((offset + 4u)) / 4;
const ExternalTextureParams tint_symbol_13 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
return tint_symbol_13;
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
return tint_symbol_12;
}
void doTextureLoad() {

View File

@ -18,22 +18,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -64,12 +53,8 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_2;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void doTextureLoad() {
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
}
vec4 vertex_main() {
@ -106,22 +91,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -152,12 +126,8 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_2;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void doTextureLoad() {
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
}
void fragment_main() {
@ -188,22 +158,11 @@ struct ExternalTextureParams {
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
mat2 rotationMatrix;
mat2x3 coordTransformationMatrix;
};
struct ExternalTextureParams_std140 {
uint numPlanes;
uint doYuvToRgbConversionOnly;
mat3x4 yuvToRgbConversionMatrix;
GammaTransferParams gammaDecodeParams;
GammaTransferParams gammaEncodeParams;
mat3 gamutConversionMatrix;
vec2 rotationMatrix_0;
vec2 rotationMatrix_1;
};
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
ExternalTextureParams_std140 inner;
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
ExternalTextureParams inner;
} ext_tex_params;
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
@ -234,12 +193,8 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_2;
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
}
void doTextureLoad() {
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
}
void compute_main() {

View File

@ -33,7 +33,7 @@ struct ExternalTextureParams {
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
/* 0x0080 */ float3x3 gamutConversionMatrix;
/* 0x00b0 */ float2x2 rotationMatrix;
/* 0x00b0 */ float2x3 coordTransformationMatrix;
};
float3 gammaCorrection(float3 v, GammaTransferParams params) {

View File

@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 163
; Bound: 147
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
@ -14,13 +14,13 @@
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %ext_tex_plane_1 "ext_tex_plane_1"
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
OpMemberName %ext_tex_params_block_std140 0 "inner"
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
OpName %ext_tex_params_block "ext_tex_params_block"
OpMemberName %ext_tex_params_block 0 "inner"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpName %GammaTransferParams "GammaTransferParams"
OpMemberName %GammaTransferParams 0 "G"
OpMemberName %GammaTransferParams 1 "A"
@ -30,23 +30,14 @@
OpMemberName %GammaTransferParams 5 "E"
OpMemberName %GammaTransferParams 6 "F"
OpMemberName %GammaTransferParams 7 "padding"
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
OpName %ext_tex_params "ext_tex_params"
OpName %arg_0 "arg_0"
OpName %gammaCorrection "gammaCorrection"
OpName %v "v"
OpName %params "params"
OpName %ExternalTextureParams "ExternalTextureParams"
OpMemberName %ExternalTextureParams 0 "numPlanes"
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
OpName %textureLoadExternal "textureLoadExternal"
OpName %plane0 "plane0"
OpName %plane1 "plane1"
@ -58,8 +49,6 @@
OpName %ext_tex_plane_1_1 "ext_tex_plane_1_1"
OpName %ext_tex_params_1 "ext_tex_params_1"
OpName %coords "coords"
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
OpName %val "val"
OpName %doTextureLoad "doTextureLoad"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -70,14 +59,14 @@
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %ext_tex_plane_1 DescriptorSet 1
OpDecorate %ext_tex_plane_1 Binding 1
OpDecorate %ext_tex_params_block_std140 Block
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
OpDecorate %ext_tex_params_block Block
OpMemberDecorate %ext_tex_params_block 0 Offset 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %GammaTransferParams 0 Offset 0
OpMemberDecorate %GammaTransferParams 1 Offset 4
OpMemberDecorate %GammaTransferParams 2 Offset 8
@ -86,30 +75,18 @@
OpMemberDecorate %GammaTransferParams 5 Offset 20
OpMemberDecorate %GammaTransferParams 6 Offset 24
OpMemberDecorate %GammaTransferParams 7 Offset 28
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
OpMemberDecorate %ExternalTextureParams 0 Offset 0
OpMemberDecorate %ExternalTextureParams 1 Offset 4
OpMemberDecorate %ExternalTextureParams 2 Offset 16
OpMemberDecorate %ExternalTextureParams 2 ColMajor
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 3 Offset 64
OpMemberDecorate %ExternalTextureParams 4 Offset 96
OpMemberDecorate %ExternalTextureParams 5 Offset 128
OpMemberDecorate %ExternalTextureParams 5 ColMajor
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
OpMemberDecorate %ExternalTextureParams 6 Offset 176
OpMemberDecorate %ExternalTextureParams 6 ColMajor
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
OpDecorate %ext_tex_params NonWritable
OpDecorate %ext_tex_params DescriptorSet 1
OpDecorate %ext_tex_params Binding 2
OpDecorate %arg_0 DescriptorSet 1
OpDecorate %arg_0 Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
@ -126,11 +103,11 @@
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%v2float = OpTypeVector %float 2
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
%mat2v3float = OpTypeMatrix %v3float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
%bool = OpTypeBool
@ -139,22 +116,20 @@
%43 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%mat2v2float = OpTypeMatrix %v2float 2
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
%uint_1 = OpConstant %uint 1
%82 = OpConstantNull %int
%80 = OpConstantNull %int
%v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%95 = OpConstantNull %uint
%113 = OpTypeFunction %v4float %11 %11 %ExternalTextureParams %v2int
%121 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
%94 = OpConstantNull %uint
%112 = OpTypeFunction %v4float %11 %11 %ExternalTextureParams %v2int
%void = OpTypeVoid
%135 = OpTypeFunction %void
%120 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
%147 = OpConstantNull %v2int
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%131 = OpConstantNull %v2int
%_ptr_Function_v4float = OpTypePointer Function %v4float
%150 = OpTypeFunction %v4float
%134 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %23
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@ -196,111 +171,95 @@
%plane1 = OpFunctionParameter %11
%coord = OpFunctionParameter %v2int
%params_0 = OpFunctionParameter %ExternalTextureParams
%73 = OpLabel
%71 = OpLabel
%color = OpVariable %_ptr_Function_v3float Function %43
%75 = OpCompositeExtract %uint %params_0 0
%77 = OpIEqual %bool %75 %uint_1
OpSelectionMerge %78 None
OpBranchConditional %77 %79 %80
%79 = OpLabel
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
OpStore %color %83
OpBranch %78
%80 = OpLabel
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
%85 = OpCompositeExtract %float %84 0
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
%87 = OpVectorShuffle %v2float %86 %86 0 1
%88 = OpCompositeExtract %float %87 0
%89 = OpCompositeExtract %float %87 1
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
%92 = OpCompositeExtract %mat3v4float %params_0 2
%93 = OpVectorTimesMatrix %v3float %91 %92
OpStore %color %93
OpBranch %78
%73 = OpCompositeExtract %uint %params_0 0
%75 = OpIEqual %bool %73 %uint_1
OpSelectionMerge %76 None
OpBranchConditional %75 %77 %78
%77 = OpLabel
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
OpStore %color %81
OpBranch %76
%78 = OpLabel
%94 = OpCompositeExtract %uint %params_0 1
%96 = OpIEqual %bool %94 %95
OpSelectionMerge %97 None
OpBranchConditional %96 %98 %97
%98 = OpLabel
%100 = OpLoad %v3float %color
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
OpStore %color %99
%102 = OpCompositeExtract %mat3v3float %params_0 5
%103 = OpLoad %v3float %color
%104 = OpMatrixTimesVector %v3float %102 %103
OpStore %color %104
%106 = OpLoad %v3float %color
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
OpStore %color %105
OpBranch %97
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
%83 = OpCompositeExtract %float %82 0
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
%86 = OpVectorShuffle %v2float %84 %84 0 1
%87 = OpCompositeExtract %float %86 0
%88 = OpCompositeExtract %float %86 1
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
%91 = OpCompositeExtract %mat3v4float %params_0 2
%92 = OpVectorTimesMatrix %v3float %90 %91
OpStore %color %92
OpBranch %76
%76 = OpLabel
%93 = OpCompositeExtract %uint %params_0 1
%95 = OpIEqual %bool %93 %94
OpSelectionMerge %96 None
OpBranchConditional %95 %97 %96
%97 = OpLabel
%108 = OpLoad %v3float %color
%109 = OpCompositeExtract %float %108 0
%110 = OpCompositeExtract %float %108 1
%111 = OpCompositeExtract %float %108 2
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
OpReturnValue %112
%99 = OpLoad %v3float %color
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
OpStore %color %98
%101 = OpCompositeExtract %mat3v3float %params_0 5
%102 = OpLoad %v3float %color
%103 = OpMatrixTimesVector %v3float %101 %102
OpStore %color %103
%105 = OpLoad %v3float %color
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
OpStore %color %104
OpBranch %96
%96 = OpLabel
%107 = OpLoad %v3float %color
%108 = OpCompositeExtract %float %107 0
%109 = OpCompositeExtract %float %107 1
%110 = OpCompositeExtract %float %107 2
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
OpReturnValue %111
OpFunctionEnd
%textureLoad2d = OpFunction %v4float None %113
%textureLoad2d = OpFunction %v4float None %112
%texture = OpFunctionParameter %11
%ext_tex_plane_1_1 = OpFunctionParameter %11
%ext_tex_params_1 = OpFunctionParameter %ExternalTextureParams
%coords = OpFunctionParameter %v2int
%119 = OpLabel
%120 = OpFunctionCall %v4float %textureLoadExternal %texture %ext_tex_plane_1_1 %coords %ext_tex_params_1
OpReturnValue %120
%118 = OpLabel
%119 = OpFunctionCall %v4float %textureLoadExternal %texture %ext_tex_plane_1_1 %coords %ext_tex_params_1
OpReturnValue %119
OpFunctionEnd
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %121
%val = OpFunctionParameter %ExternalTextureParams_std140
%124 = OpLabel
%125 = OpCompositeExtract %uint %val 0
%126 = OpCompositeExtract %uint %val 1
%127 = OpCompositeExtract %mat3v4float %val 2
%128 = OpCompositeExtract %GammaTransferParams %val 3
%129 = OpCompositeExtract %GammaTransferParams %val 4
%130 = OpCompositeExtract %mat3v3float %val 5
%131 = OpCompositeExtract %v2float %val 6
%132 = OpCompositeExtract %v2float %val 7
%133 = OpCompositeConstruct %mat2v2float %131 %132
%134 = OpCompositeConstruct %ExternalTextureParams %125 %126 %127 %128 %129 %130 %133
OpReturnValue %134
OpFunctionEnd
%doTextureLoad = OpFunction %void None %135
%138 = OpLabel
%doTextureLoad = OpFunction %void None %120
%123 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%140 = OpLoad %11 %arg_0
%141 = OpLoad %11 %ext_tex_plane_1
%145 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
%146 = OpLoad %ExternalTextureParams_std140 %145
%142 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %146
%139 = OpFunctionCall %v4float %textureLoad2d %140 %141 %142 %147
OpStore %res %139
%125 = OpLoad %11 %arg_0
%126 = OpLoad %11 %ext_tex_plane_1
%129 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
%130 = OpLoad %ExternalTextureParams %129
%124 = OpFunctionCall %v4float %textureLoad2d %125 %126 %130 %131
OpStore %res %124
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %150
%152 = OpLabel
%153 = OpFunctionCall %void %doTextureLoad
%vertex_main_inner = OpFunction %v4float None %134
%136 = OpLabel
%137 = OpFunctionCall %void %doTextureLoad
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %135
%155 = OpLabel
%156 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %156
%vertex_main = OpFunction %void None %120
%139 = OpLabel
%140 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %140
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %135
%158 = OpLabel
%159 = OpFunctionCall %void %doTextureLoad
%fragment_main = OpFunction %void None %120
%142 = OpLabel
%143 = OpFunctionCall %void %doTextureLoad
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %135
%161 = OpLabel
%162 = OpFunctionCall %void %doTextureLoad
%compute_main = OpFunction %void None %120
%145 = OpLabel
%146 = OpFunctionCall %void %doTextureLoad
OpReturn
OpFunctionEnd