Reduce shader complexity for external textures
Do more math on the CPU to avoid per-fragment ALU operations. Use a mat3x2 instead of mat2x3 to avoid padding. Fixed: dawn:1614 Change-Id: Ib0e0f7d44ed9aa16eaca712f6553214fad141feb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116060 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Brandon1 Jones <brandon1.jones@intel.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
b6fb41cc32
commit
be367b73ae
|
@ -209,67 +209,106 @@ MaybeError ExternalTextureBase::Initialize(DeviceBase* device,
|
||||||
const float* dstFn = descriptor->dstTransferFunctionParameters;
|
const float* dstFn = descriptor->dstTransferFunctionParameters;
|
||||||
std::copy(dstFn, dstFn + 7, params.gammaEncodingParams.begin());
|
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
|
// Unlike WGSL, which stores matrices in column vectors, the following arithmetic uses row
|
||||||
// them directly for performing rotation in the matrix later.
|
// vectors, so elements are stored in the following order:
|
||||||
float xScale = descriptor->visibleRect.width;
|
// ┌ ┐
|
||||||
float yScale = descriptor->visibleRect.height;
|
// │ 0, 1, 2 │
|
||||||
|
// │ 3, 4, 5 │
|
||||||
|
// └ ┘
|
||||||
|
// The matrix is transposed at the end.
|
||||||
|
using mat2x3 = std::array<float, 6>;
|
||||||
|
|
||||||
// In the shader, we must convert UV coordinates from the {0, 1} space to the {-0.5, 0.5} space
|
// Multiplies the two mat2x3 matrices, by treating the RHS matrix as a mat3x3 where the last row
|
||||||
// to do rotation. Ideally, we want to combine the rotate, flip-Y operations in a single matrix
|
// is [0, 0, 1].
|
||||||
// operation - but this is complicated because scaling most easily occurs in the {0, 1} space.
|
auto Mul = [&](const mat2x3& lhs, const mat2x3& rhs) {
|
||||||
// We can work around this and perform scaling in the {-0.5, 0.5} space by multiplying the
|
auto& a = lhs[0];
|
||||||
// needed conversion constant "+ 0.5" by the scale factor. We then can do this all within a
|
auto& b = lhs[1];
|
||||||
// single matrix operation by calculating and adding this value to the offset specified in the
|
auto& c = lhs[2];
|
||||||
// matrix. For reference, this is the entire operation needed is:
|
auto& d = lhs[3];
|
||||||
//
|
auto& e = lhs[4];
|
||||||
// newCoords = vec3<f32>((coord - 0.5f), 1.0f) * coordTransformationMatrix) + (scaleFactor *
|
auto& f = lhs[5];
|
||||||
// 0.5)
|
auto& g = rhs[0];
|
||||||
//
|
auto& h = rhs[1];
|
||||||
// Because we combine the ending (scaleFactor * 0.5) into the crop offset within the matrix, the
|
auto& i = rhs[2];
|
||||||
// shader is actually:
|
auto& j = rhs[3];
|
||||||
//
|
auto& k = rhs[4];
|
||||||
// newCoords = vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix;
|
auto& l = rhs[5];
|
||||||
//
|
// ┌ ┐ ┌ ┐
|
||||||
// TODO(dawn:1614): Incorporate the "- 0.5f" into the matrix.
|
// │ a, b, c │ │ g, h, i │
|
||||||
float xOffset = descriptor->visibleRect.x + 0.5f * xScale;
|
// │ d, e, f │ x │ j, k, l │
|
||||||
float yOffset = descriptor->visibleRect.y + 0.5f * yScale;
|
// └ ┘ │ 0, 0, 1 │
|
||||||
|
// └ ┘
|
||||||
|
return mat2x3{
|
||||||
|
a * g + b * j, //
|
||||||
|
a * h + b * k, //
|
||||||
|
a * i + b * l + c, //
|
||||||
|
d * g + e * j, //
|
||||||
|
d * h + e * k, //
|
||||||
|
d * i + e * l + f, //
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
// Flip-Y can be done by simply negating the scaling factor in the y-plane. The position of the
|
auto Scale = [&](const mat2x3& m, float x, float y) {
|
||||||
// y-plane scaling factor in the matrix can be different depending on the rotation.
|
return Mul(mat2x3{x, 0, 0, 0, y, 0}, m);
|
||||||
float flipY = 1;
|
};
|
||||||
|
|
||||||
|
auto Translate = [&](const mat2x3& m, float x, float y) {
|
||||||
|
return Mul(mat2x3{1, 0, x, 0, 1, y}, m);
|
||||||
|
};
|
||||||
|
|
||||||
|
mat2x3 coordTransformMatrix = {
|
||||||
|
1, 0, 0, //
|
||||||
|
0, 1, 0, //
|
||||||
|
};
|
||||||
|
|
||||||
|
// Offset the coordinates so the center texel is at the origin, so we can apply rotations and
|
||||||
|
// y-flips. After translation, coordinates range from [-0.5 .. +0.5] in both U and V.
|
||||||
|
coordTransformMatrix = Translate(coordTransformMatrix, -0.5, -0.5);
|
||||||
|
|
||||||
|
// If the texture needs flipping, mirror in Y.
|
||||||
if (descriptor->flipY) {
|
if (descriptor->flipY) {
|
||||||
flipY = -1;
|
coordTransformMatrix = Scale(coordTransformMatrix, 1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This block creates a 2x3 matrix which when multiplied by UV coordinates in a shader performs
|
// Apply rotations as needed.
|
||||||
// rotation, flip-Y and cropping operations.
|
|
||||||
switch (descriptor->rotation) {
|
switch (descriptor->rotation) {
|
||||||
case wgpu::ExternalTextureRotation::Rotate0Degrees:
|
case wgpu::ExternalTextureRotation::Rotate0Degrees:
|
||||||
params.coordTransformMatrix = {xScale, 0.0, //
|
|
||||||
xOffset, 0.0, //
|
|
||||||
0.0, flipY * yScale, //
|
|
||||||
yOffset, 0.0};
|
|
||||||
break;
|
break;
|
||||||
case wgpu::ExternalTextureRotation::Rotate90Degrees:
|
case wgpu::ExternalTextureRotation::Rotate90Degrees:
|
||||||
params.coordTransformMatrix = {0.0, flipY * yScale, //
|
coordTransformMatrix = Mul(mat2x3{0, +1, 0, // x' = y
|
||||||
xOffset, 0.0, //
|
-1, 0, 0}, // y' = -x
|
||||||
-xScale, 0.0, //
|
coordTransformMatrix);
|
||||||
yOffset, 0.0};
|
|
||||||
break;
|
break;
|
||||||
case wgpu::ExternalTextureRotation::Rotate180Degrees:
|
case wgpu::ExternalTextureRotation::Rotate180Degrees:
|
||||||
params.coordTransformMatrix = {-xScale, 0.0, //
|
coordTransformMatrix = Mul(mat2x3{-1, 0, 0, // x' = -x
|
||||||
xOffset, 0.0, //
|
0, -1, 0}, // y' = -y
|
||||||
0.0, flipY * -yScale, //
|
coordTransformMatrix);
|
||||||
yOffset, 0.0};
|
|
||||||
break;
|
break;
|
||||||
case wgpu::ExternalTextureRotation::Rotate270Degrees:
|
case wgpu::ExternalTextureRotation::Rotate270Degrees:
|
||||||
params.coordTransformMatrix = {0.0, flipY * -yScale, //
|
coordTransformMatrix = Mul(mat2x3{0, -1, 0, // x' = -y
|
||||||
xOffset, 0.0, //
|
+1, 0, 0}, // y' = x
|
||||||
xScale, 0.0, //
|
coordTransformMatrix);
|
||||||
yOffset, 0.0};
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Offset the coordinates so the bottom-left texel is at origin.
|
||||||
|
// After translation, coordinates range from [0 .. 1] in both U and V.
|
||||||
|
coordTransformMatrix = Translate(coordTransformMatrix, 0.5, 0.5);
|
||||||
|
|
||||||
|
// Finally, scale and translate based on the visible rect. This applies cropping.
|
||||||
|
coordTransformMatrix =
|
||||||
|
Scale(coordTransformMatrix, descriptor->visibleRect.width, descriptor->visibleRect.height);
|
||||||
|
coordTransformMatrix =
|
||||||
|
Translate(coordTransformMatrix, descriptor->visibleRect.x, descriptor->visibleRect.y);
|
||||||
|
|
||||||
|
// Transpose the mat2x3 into column vectors for use by WGSL.
|
||||||
|
params.coordTransformMatrix[0] = coordTransformMatrix[0];
|
||||||
|
params.coordTransformMatrix[1] = coordTransformMatrix[3];
|
||||||
|
params.coordTransformMatrix[2] = coordTransformMatrix[1];
|
||||||
|
params.coordTransformMatrix[3] = coordTransformMatrix[4];
|
||||||
|
params.coordTransformMatrix[4] = coordTransformMatrix[2];
|
||||||
|
params.coordTransformMatrix[5] = coordTransformMatrix[5];
|
||||||
|
|
||||||
DAWN_TRY(device->GetQueue()->WriteBuffer(mParamsBuffer.Get(), 0, ¶ms,
|
DAWN_TRY(device->GetQueue()->WriteBuffer(mParamsBuffer.Get(), 0, ¶ms,
|
||||||
sizeof(ExternalTextureParams)));
|
sizeof(ExternalTextureParams)));
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ struct ExternalTextureParams {
|
||||||
std::array<float, 8> gammaDecodingParams = {};
|
std::array<float, 8> gammaDecodingParams = {};
|
||||||
std::array<float, 8> gammaEncodingParams = {};
|
std::array<float, 8> gammaEncodingParams = {};
|
||||||
std::array<float, 12> gamutConversionMatrix = {};
|
std::array<float, 12> gamutConversionMatrix = {};
|
||||||
std::array<float, 8> coordTransformMatrix = {};
|
std::array<float, 6> coordTransformMatrix = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
MaybeError ValidateExternalTextureDescriptor(const DeviceBase* device,
|
MaybeError ValidateExternalTextureDescriptor(const DeviceBase* device,
|
||||||
|
|
|
@ -374,8 +374,8 @@ TEST_P(ExternalTextureTests, RotateAndOrFlipSinglePlane) {
|
||||||
utils::RGBA8 lowerRightColor;
|
utils::RGBA8 lowerRightColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::array<RotationExpectation, 8> expectations = {
|
std::array<RotationExpectation, 8> expectations = {{
|
||||||
{{wgpu::ExternalTextureRotation::Rotate0Degrees, false, utils::RGBA8::kGreen,
|
{wgpu::ExternalTextureRotation::Rotate0Degrees, false, utils::RGBA8::kGreen,
|
||||||
utils::RGBA8::kBlack, utils::RGBA8::kRed, utils::RGBA8::kBlue},
|
utils::RGBA8::kBlack, utils::RGBA8::kRed, utils::RGBA8::kBlue},
|
||||||
{wgpu::ExternalTextureRotation::Rotate90Degrees, false, utils::RGBA8::kRed,
|
{wgpu::ExternalTextureRotation::Rotate90Degrees, false, utils::RGBA8::kRed,
|
||||||
utils::RGBA8::kGreen, utils::RGBA8::kBlue, utils::RGBA8::kBlack},
|
utils::RGBA8::kGreen, utils::RGBA8::kBlue, utils::RGBA8::kBlack},
|
||||||
|
@ -390,7 +390,8 @@ TEST_P(ExternalTextureTests, RotateAndOrFlipSinglePlane) {
|
||||||
{wgpu::ExternalTextureRotation::Rotate180Degrees, true, utils::RGBA8::kBlack,
|
{wgpu::ExternalTextureRotation::Rotate180Degrees, true, utils::RGBA8::kBlack,
|
||||||
utils::RGBA8::kGreen, utils::RGBA8::kBlue, utils::RGBA8::kRed},
|
utils::RGBA8::kGreen, utils::RGBA8::kBlue, utils::RGBA8::kRed},
|
||||||
{wgpu::ExternalTextureRotation::Rotate270Degrees, true, utils::RGBA8::kGreen,
|
{wgpu::ExternalTextureRotation::Rotate270Degrees, true, utils::RGBA8::kGreen,
|
||||||
utils::RGBA8::kRed, utils::RGBA8::kBlack, utils::RGBA8::kBlue}}};
|
utils::RGBA8::kRed, utils::RGBA8::kBlack, utils::RGBA8::kBlue},
|
||||||
|
}};
|
||||||
|
|
||||||
for (const RotationExpectation& exp : expectations) {
|
for (const RotationExpectation& exp : expectations) {
|
||||||
// Pipeline Creation
|
// Pipeline Creation
|
||||||
|
|
|
@ -263,7 +263,7 @@ struct MultiplanarExternalTexture::State {
|
||||||
b.Member("gammaDecodeParams", b.ty.type_name("GammaTransferParams")),
|
b.Member("gammaDecodeParams", b.ty.type_name("GammaTransferParams")),
|
||||||
b.Member("gammaEncodeParams", b.ty.type_name("GammaTransferParams")),
|
b.Member("gammaEncodeParams", b.ty.type_name("GammaTransferParams")),
|
||||||
b.Member("gamutConversionMatrix", b.ty.mat3x3<f32>()),
|
b.Member("gamutConversionMatrix", b.ty.mat3x3<f32>()),
|
||||||
b.Member("coordTransformationMatrix", b.ty.mat2x3<f32>())};
|
b.Member("coordTransformationMatrix", b.ty.mat3x2<f32>())};
|
||||||
|
|
||||||
params_struct_sym = b.Symbols().New("ExternalTextureParams");
|
params_struct_sym = b.Symbols().New("ExternalTextureParams");
|
||||||
|
|
||||||
|
@ -316,12 +316,9 @@ struct MultiplanarExternalTexture::State {
|
||||||
const ast::CallExpression* plane_1_call = nullptr;
|
const ast::CallExpression* plane_1_call = nullptr;
|
||||||
switch (call_type) {
|
switch (call_type) {
|
||||||
case sem::BuiltinType::kTextureSampleBaseClampToEdge:
|
case sem::BuiltinType::kTextureSampleBaseClampToEdge:
|
||||||
// TODO(dawn:1614): Change this statement to incorporate the "- 0.5" into the
|
stmts.Push(b.Decl(b.Let(
|
||||||
// matrix.
|
"modifiedCoords", b.Mul(b.MemberAccessor("params", "coordTransformationMatrix"),
|
||||||
stmts.Push(
|
b.vec3<f32>("coord", 1_a)))));
|
||||||
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(
|
stmts.Push(b.Decl(b.Let(
|
||||||
"plane0_dims",
|
"plane0_dims",
|
||||||
|
|
|
@ -138,7 +138,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
|
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
|
||||||
|
@ -194,7 +194,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
|
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
|
||||||
|
@ -249,7 +249,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -333,7 +333,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -418,7 +418,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
|
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
|
||||||
|
@ -511,7 +511,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
|
@group(0) @binding(1) var ext_tex_plane_1 : texture_2d<f32>;
|
||||||
|
@ -603,7 +603,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -702,7 +702,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -807,7 +807,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(4) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -918,7 +918,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -1011,7 +1011,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -1104,7 +1104,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -1199,7 +1199,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(3) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -1303,7 +1303,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(3) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -1408,7 +1408,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -1509,7 +1509,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -1598,7 +1598,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn f(ext_tex : texture_2d<f32>, ext_tex_plane_1 : texture_2d<f32>, ext_tex_params : ExternalTextureParams) -> vec2<u32> {
|
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,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
@ -1746,7 +1746,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<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> {
|
fn textureSampleExternal(plane0 : texture_2d<f32>, plane1 : texture_2d<f32>, smp : sampler, coord : vec2<f32>, params : ExternalTextureParams) -> vec4<f32> {
|
||||||
let modifiedCoords = (vec3<f32>((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
let modifiedCoords = (params.coordTransformationMatrix * vec3<f32>(coord, 1));
|
||||||
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
let plane0_dims = vec2<f32>(textureDimensions(plane0, 0));
|
||||||
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
let plane0_half_texel = (vec2<f32>(0.5) / plane0_dims);
|
||||||
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
let plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1 - plane0_half_texel));
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space0);
|
Texture2D<float4> ext_tex_plane_1 : register(t2, space0);
|
||||||
|
@ -67,8 +67,8 @@ GammaTransferParams tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_13;
|
return tint_symbol_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||||
|
@ -78,17 +78,21 @@ float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_12(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_12(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_4(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_15 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_15;
|
||||||
}
|
}
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
[numthreads(1, 1, 1)]
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space0);
|
Texture2D<float4> ext_tex_plane_1 : register(t2, space0);
|
||||||
|
@ -67,8 +67,8 @@ GammaTransferParams tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_13;
|
return tint_symbol_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||||
|
@ -78,17 +78,21 @@ float3x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_12(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_12(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_4(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_15 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_15;
|
||||||
}
|
}
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
[numthreads(1, 1, 1)]
|
||||||
|
|
|
@ -20,11 +20,29 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
|
uint pad_2;
|
||||||
|
uint pad_3;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
uint pad;
|
||||||
|
uint pad_1;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
uint pad_2;
|
||||||
|
uint pad_3;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
layout(rgba8) uniform highp writeonly image2D outImage;
|
layout(rgba8) uniform highp writeonly image2D outImage;
|
||||||
|
@ -52,10 +70,14 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||||
|
|
||||||
uniform highp sampler2D t_2;
|
uniform highp sampler2D t_2;
|
||||||
uniform highp sampler2D ext_tex_plane_1_1;
|
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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2), val.pad_2, val.pad_3);
|
||||||
|
}
|
||||||
|
|
||||||
void tint_symbol() {
|
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)))), 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)))), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
imageStore(outImage, clamp(ivec2(0), ivec2(0), ivec2((uvec2(uvec2(imageSize(outImage))) - uvec2(1u)))), red);
|
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)))), 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)))), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
imageStore(outImage, clamp(ivec2(1, 0), ivec2(0), ivec2((uvec2(uvec2(imageSize(outImage))) - uvec2(1u)))), green);
|
imageStore(outImage, clamp(ivec2(1, 0), ivec2(0), ivec2((uvec2(uvec2(imageSize(outImage))) - uvec2(1u)))), green);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,8 @@ struct ExternalTextureParams {
|
||||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
/* 0x00b0 */ float3x2 coordTransformationMatrix;
|
||||||
|
/* 0x00c8 */ tint_array<int8_t, 8> tint_pad_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 178
|
; Bound: 196
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpCapability ImageQuery
|
OpCapability ImageQuery
|
||||||
|
@ -10,13 +10,13 @@
|
||||||
OpEntryPoint GLCompute %main "main"
|
OpEntryPoint GLCompute %main "main"
|
||||||
OpExecutionMode %main LocalSize 1 1 1
|
OpExecutionMode %main LocalSize 1 1 1
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -26,9 +26,11 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %t "t"
|
OpName %t "t"
|
||||||
OpName %outImage "outImage"
|
OpName %outImage "outImage"
|
||||||
|
@ -39,25 +41,35 @@
|
||||||
OpName %gammaCorrection "gammaCorrection"
|
OpName %gammaCorrection "gammaCorrection"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %params "params"
|
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 "coordTransformationMatrix"
|
||||||
OpName %textureLoadExternal "textureLoadExternal"
|
OpName %textureLoadExternal "textureLoadExternal"
|
||||||
OpName %plane0 "plane0"
|
OpName %plane0 "plane0"
|
||||||
OpName %plane1 "plane1"
|
OpName %plane1 "plane1"
|
||||||
OpName %coord "coord"
|
OpName %coord "coord"
|
||||||
OpName %params_0 "params"
|
OpName %params_0 "params"
|
||||||
OpName %color "color"
|
OpName %color "color"
|
||||||
|
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||||
|
OpName %val "val"
|
||||||
OpName %main "main"
|
OpName %main "main"
|
||||||
OpName %red "red"
|
OpName %red "red"
|
||||||
OpName %green "green"
|
OpName %green "green"
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 0
|
OpDecorate %ext_tex_plane_1 DescriptorSet 0
|
||||||
OpDecorate %ext_tex_plane_1 Binding 2
|
OpDecorate %ext_tex_plane_1 Binding 2
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -66,13 +78,13 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 8 Offset 192
|
||||||
OpDecorate %ext_tex_params NonWritable
|
OpDecorate %ext_tex_params NonWritable
|
||||||
OpDecorate %ext_tex_params DescriptorSet 0
|
OpDecorate %ext_tex_params DescriptorSet 0
|
||||||
OpDecorate %ext_tex_params Binding 3
|
OpDecorate %ext_tex_params Binding 3
|
||||||
|
@ -81,6 +93,19 @@
|
||||||
OpDecorate %outImage NonReadable
|
OpDecorate %outImage NonReadable
|
||||||
OpDecorate %outImage DescriptorSet 0
|
OpDecorate %outImage DescriptorSet 0
|
||||||
OpDecorate %outImage Binding 1
|
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
|
%float = OpTypeFloat 32
|
||||||
%3 = OpTypeImage %float 2D 0 0 0 1 Unknown
|
%3 = OpTypeImage %float 2D 0 0 0 1 Unknown
|
||||||
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
|
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
|
||||||
|
@ -91,11 +116,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%t = OpVariable %_ptr_UniformConstant_3 UniformConstant
|
%t = OpVariable %_ptr_UniformConstant_3 UniformConstant
|
||||||
%19 = OpTypeImage %float 2D 0 0 0 2 Rgba8
|
%19 = OpTypeImage %float 2D 0 0 0 2 Rgba8
|
||||||
%_ptr_UniformConstant_19 = OpTypePointer UniformConstant %19
|
%_ptr_UniformConstant_19 = OpTypePointer UniformConstant %19
|
||||||
|
@ -108,29 +133,31 @@
|
||||||
%v3bool = OpTypeVector %bool 3
|
%v3bool = OpTypeVector %bool 3
|
||||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||||
%50 = OpConstantNull %v3float
|
%50 = OpConstantNull %v3float
|
||||||
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float
|
||||||
%70 = OpTypeFunction %v4float %3 %3 %v2int %ExternalTextureParams
|
%70 = OpTypeFunction %v4float %3 %3 %v2int %ExternalTextureParams
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%85 = OpConstantNull %int
|
%87 = OpConstantNull %int
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%99 = OpConstantNull %uint
|
%100 = OpConstantNull %uint
|
||||||
|
%118 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%117 = OpTypeFunction %void
|
%133 = OpTypeFunction %void
|
||||||
%int_10 = OpConstant %int 10
|
%int_10 = OpConstant %int 10
|
||||||
%123 = OpConstantComposite %v2int %int_10 %int_10
|
%139 = OpConstantComposite %v2int %int_10 %int_10
|
||||||
%124 = OpConstantNull %v2int
|
%140 = OpConstantNull %v2int
|
||||||
%v2uint = OpTypeVector %uint 2
|
%v2uint = OpTypeVector %uint 2
|
||||||
%int_0 = OpConstant %int 0
|
%int_0 = OpConstant %int 0
|
||||||
%131 = OpConstantComposite %v2uint %uint_1 %uint_1
|
%147 = OpConstantComposite %v2uint %uint_1 %uint_1
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%142 = OpConstantNull %v4float
|
%159 = OpConstantNull %v4float
|
||||||
%int_70 = OpConstant %int 70
|
%int_70 = OpConstant %int 70
|
||||||
%int_118 = OpConstant %int 118
|
%int_118 = OpConstant %int 118
|
||||||
%155 = OpConstantComposite %v2int %int_70 %int_118
|
%172 = OpConstantComposite %v2int %int_70 %int_118
|
||||||
%int_1 = OpConstant %int 1
|
%int_1 = OpConstant %int 1
|
||||||
%169 = OpConstantComposite %v2int %int_1 %85
|
%187 = OpConstantComposite %v2int %int_1 %87
|
||||||
%tint_clamp = OpFunction %v2int None %20
|
%tint_clamp = OpFunction %v2int None %20
|
||||||
%e = OpFunctionParameter %v2int
|
%e = OpFunctionParameter %v2int
|
||||||
%low = OpFunctionParameter %v2int
|
%low = OpFunctionParameter %v2int
|
||||||
|
@ -181,97 +208,115 @@
|
||||||
%plane1 = OpFunctionParameter %3
|
%plane1 = OpFunctionParameter %3
|
||||||
%coord = OpFunctionParameter %v2int
|
%coord = OpFunctionParameter %v2int
|
||||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||||
%76 = OpLabel
|
%78 = OpLabel
|
||||||
%color = OpVariable %_ptr_Function_v3float Function %50
|
%color = OpVariable %_ptr_Function_v3float Function %50
|
||||||
%78 = OpCompositeExtract %uint %params_0 0
|
%80 = OpCompositeExtract %uint %params_0 0
|
||||||
%80 = OpIEqual %bool %78 %uint_1
|
%82 = OpIEqual %bool %80 %uint_1
|
||||||
OpSelectionMerge %81 None
|
OpSelectionMerge %83 None
|
||||||
OpBranchConditional %80 %82 %83
|
OpBranchConditional %82 %84 %85
|
||||||
%82 = OpLabel
|
%84 = OpLabel
|
||||||
%84 = OpImageFetch %v4float %plane0 %coord Lod %85
|
%86 = OpImageFetch %v4float %plane0 %coord Lod %87
|
||||||
%86 = OpVectorShuffle %v3float %84 %84 0 1 2
|
%88 = OpVectorShuffle %v3float %86 %86 0 1 2
|
||||||
OpStore %color %86
|
OpStore %color %88
|
||||||
OpBranch %81
|
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
|
||||||
%83 = OpLabel
|
%83 = OpLabel
|
||||||
%87 = OpImageFetch %v4float %plane0 %coord Lod %85
|
%99 = OpCompositeExtract %uint %params_0 1
|
||||||
%88 = OpCompositeExtract %float %87 0
|
%101 = OpIEqual %bool %99 %100
|
||||||
%89 = OpImageFetch %v4float %plane1 %coord Lod %85
|
OpSelectionMerge %102 None
|
||||||
%91 = OpVectorShuffle %v2float %89 %89 0 1
|
OpBranchConditional %101 %103 %102
|
||||||
%92 = OpCompositeExtract %float %91 0
|
%103 = OpLabel
|
||||||
%93 = OpCompositeExtract %float %91 1
|
%105 = OpLoad %v3float %color
|
||||||
%95 = OpCompositeConstruct %v4float %88 %92 %93 %float_1
|
%106 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||||
%96 = OpCompositeExtract %mat3v4float %params_0 2
|
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
|
||||||
%97 = OpVectorTimesMatrix %v3float %95 %96
|
OpStore %color %104
|
||||||
OpStore %color %97
|
%107 = OpCompositeExtract %mat3v3float %params_0 5
|
||||||
OpBranch %81
|
%108 = OpLoad %v3float %color
|
||||||
%81 = OpLabel
|
%109 = OpMatrixTimesVector %v3float %107 %108
|
||||||
%98 = OpCompositeExtract %uint %params_0 1
|
|
||||||
%100 = OpIEqual %bool %98 %99
|
|
||||||
OpSelectionMerge %101 None
|
|
||||||
OpBranchConditional %100 %102 %101
|
|
||||||
%102 = OpLabel
|
|
||||||
%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
|
OpStore %color %109
|
||||||
OpBranch %101
|
%111 = OpLoad %v3float %color
|
||||||
%101 = OpLabel
|
%112 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||||
%112 = OpLoad %v3float %color
|
%110 = OpFunctionCall %v3float %gammaCorrection %111 %112
|
||||||
%113 = OpCompositeExtract %float %112 0
|
OpStore %color %110
|
||||||
%114 = OpCompositeExtract %float %112 1
|
OpBranch %102
|
||||||
%115 = OpCompositeExtract %float %112 2
|
%102 = OpLabel
|
||||||
%116 = OpCompositeConstruct %v4float %113 %114 %115 %float_1
|
%113 = OpLoad %v3float %color
|
||||||
OpReturnValue %116
|
%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
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%main = OpFunction %void None %117
|
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %118
|
||||||
%120 = OpLabel
|
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||||
%red = OpVariable %_ptr_Function_v4float Function %142
|
%121 = OpLabel
|
||||||
%green = OpVariable %_ptr_Function_v4float Function %142
|
%122 = OpCompositeExtract %uint %val 0
|
||||||
%129 = OpLoad %3 %t
|
%123 = OpCompositeExtract %uint %val 1
|
||||||
%128 = OpImageQuerySizeLod %v2uint %129 %int_0
|
%124 = OpCompositeExtract %mat3v4float %val 2
|
||||||
%132 = OpISub %v2uint %128 %131
|
%125 = OpCompositeExtract %GammaTransferParams %val 3
|
||||||
%125 = OpBitcast %v2int %132
|
%126 = OpCompositeExtract %GammaTransferParams %val 4
|
||||||
%121 = OpFunctionCall %v2int %tint_clamp %123 %124 %125
|
%127 = OpCompositeExtract %mat3v3float %val 5
|
||||||
%134 = OpLoad %3 %t
|
%128 = OpCompositeExtract %v2float %val 6
|
||||||
%135 = OpLoad %3 %ext_tex_plane_1
|
%129 = OpCompositeExtract %v2float %val 7
|
||||||
%138 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%130 = OpCompositeExtract %v2float %val 8
|
||||||
%139 = OpLoad %ExternalTextureParams %138
|
%131 = OpCompositeConstruct %mat3v2float %128 %129 %130
|
||||||
%133 = OpFunctionCall %v4float %textureLoadExternal %134 %135 %121 %139
|
%132 = OpCompositeConstruct %ExternalTextureParams %122 %123 %124 %125 %126 %127 %131
|
||||||
OpStore %red %133
|
OpReturnValue %132
|
||||||
%147 = OpLoad %19 %outImage
|
OpFunctionEnd
|
||||||
%146 = OpImageQuerySize %v2uint %147
|
%main = OpFunction %void None %133
|
||||||
%148 = OpISub %v2uint %146 %131
|
%136 = OpLabel
|
||||||
%144 = OpBitcast %v2int %148
|
%red = OpVariable %_ptr_Function_v4float Function %159
|
||||||
%143 = OpFunctionCall %v2int %tint_clamp %124 %124 %144
|
%green = OpVariable %_ptr_Function_v4float Function %159
|
||||||
%150 = OpLoad %19 %outImage
|
%145 = OpLoad %3 %t
|
||||||
%151 = OpLoad %v4float %red
|
%144 = OpImageQuerySizeLod %v2uint %145 %int_0
|
||||||
OpImageWrite %150 %143 %151
|
%148 = OpISub %v2uint %144 %147
|
||||||
%159 = OpLoad %3 %t
|
%141 = OpBitcast %v2int %148
|
||||||
%158 = OpImageQuerySizeLod %v2uint %159 %int_0
|
%137 = OpFunctionCall %v2int %tint_clamp %139 %140 %141
|
||||||
%160 = OpISub %v2uint %158 %131
|
%150 = OpLoad %3 %t
|
||||||
%156 = OpBitcast %v2int %160
|
%151 = OpLoad %3 %ext_tex_plane_1
|
||||||
%152 = OpFunctionCall %v2int %tint_clamp %155 %124 %156
|
%155 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
%162 = OpLoad %3 %t
|
%156 = OpLoad %ExternalTextureParams_std140 %155
|
||||||
%163 = OpLoad %3 %ext_tex_plane_1
|
%152 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %156
|
||||||
%164 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%149 = OpFunctionCall %v4float %textureLoadExternal %150 %151 %137 %152
|
||||||
%165 = OpLoad %ExternalTextureParams %164
|
OpStore %red %149
|
||||||
%161 = OpFunctionCall %v4float %textureLoadExternal %162 %163 %152 %165
|
%164 = OpLoad %19 %outImage
|
||||||
OpStore %green %161
|
%163 = OpImageQuerySize %v2uint %164
|
||||||
%173 = OpLoad %19 %outImage
|
%165 = OpISub %v2uint %163 %147
|
||||||
%172 = OpImageQuerySize %v2uint %173
|
%161 = OpBitcast %v2int %165
|
||||||
%174 = OpISub %v2uint %172 %131
|
%160 = OpFunctionCall %v2int %tint_clamp %140 %140 %161
|
||||||
%170 = OpBitcast %v2int %174
|
%167 = OpLoad %19 %outImage
|
||||||
%167 = OpFunctionCall %v2int %tint_clamp %169 %124 %170
|
%168 = OpLoad %v4float %red
|
||||||
%176 = OpLoad %19 %outImage
|
OpImageWrite %167 %160 %168
|
||||||
%177 = OpLoad %v4float %green
|
%176 = OpLoad %3 %t
|
||||||
OpImageWrite %176 %167 %177
|
%175 = OpImageQuerySizeLod %v2uint %176 %int_0
|
||||||
|
%177 = OpISub %v2uint %175 %147
|
||||||
|
%173 = OpBitcast %v2int %177
|
||||||
|
%169 = OpFunctionCall %v2int %tint_clamp %172 %140 %173
|
||||||
|
%179 = OpLoad %3 %t
|
||||||
|
%180 = OpLoad %3 %ext_tex_plane_1
|
||||||
|
%182 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
|
%183 = OpLoad %ExternalTextureParams_std140 %182
|
||||||
|
%181 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %183
|
||||||
|
%178 = OpFunctionCall %v4float %textureLoadExternal %179 %180 %169 %181
|
||||||
|
OpStore %green %178
|
||||||
|
%191 = OpLoad %19 %outImage
|
||||||
|
%190 = OpImageQuerySize %v2uint %191
|
||||||
|
%192 = OpISub %v2uint %190 %147
|
||||||
|
%188 = OpBitcast %v2int %192
|
||||||
|
%185 = OpFunctionCall %v2int %tint_clamp %187 %140 %188
|
||||||
|
%194 = OpLoad %19 %outImage
|
||||||
|
%195 = OpLoad %v4float %green
|
||||||
|
OpImageWrite %194 %185 %195
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -16,7 +16,7 @@ struct ExternalTextureParams {
|
||||||
gammaDecodeParams : GammaTransferParams,
|
gammaDecodeParams : GammaTransferParams,
|
||||||
gammaEncodeParams : GammaTransferParams,
|
gammaEncodeParams : GammaTransferParams,
|
||||||
gamutConversionMatrix : mat3x3<f32>,
|
gamutConversionMatrix : mat3x3<f32>,
|
||||||
coordTransformationMatrix : mat2x3<f32>,
|
coordTransformationMatrix : mat3x2<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
|
@group(0) @binding(2) var ext_tex_plane_1 : texture_2d<f32>;
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
|
@ -64,11 +76,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
|
@ -104,11 +128,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {
|
void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -30,9 +30,11 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
|
OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
|
||||||
|
@ -45,14 +47,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 1
|
OpDecorate %ext_tex_plane_1 Binding 1
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -61,13 +63,13 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 8 Offset 192
|
||||||
OpDecorate %ext_tex_params NonWritable
|
OpDecorate %ext_tex_params NonWritable
|
||||||
OpDecorate %ext_tex_params DescriptorSet 1
|
OpDecorate %ext_tex_params DescriptorSet 1
|
||||||
OpDecorate %ext_tex_params Binding 2
|
OpDecorate %ext_tex_params Binding 2
|
||||||
|
@ -89,11 +91,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%23 = OpTypeFunction %void
|
%23 = OpTypeFunction %void
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -62,8 +62,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -73,17 +73,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -62,8 +62,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -73,17 +73,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -49,8 +61,12 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -87,11 +103,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -118,8 +146,12 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -150,11 +182,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -181,8 +225,12 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -33,7 +33,8 @@ struct ExternalTextureParams {
|
||||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
/* 0x00b0 */ float3x2 coordTransformationMatrix;
|
||||||
|
/* 0x00c8 */ tint_array<int8_t, 8> tint_pad_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 139
|
; Bound: 156
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
%29 = OpExtInstImport "GLSL.std.450"
|
%29 = OpExtInstImport "GLSL.std.450"
|
||||||
|
@ -14,13 +14,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -30,20 +30,32 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %gammaCorrection "gammaCorrection"
|
OpName %gammaCorrection "gammaCorrection"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %params "params"
|
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 "coordTransformationMatrix"
|
||||||
OpName %textureLoadExternal "textureLoadExternal"
|
OpName %textureLoadExternal "textureLoadExternal"
|
||||||
OpName %plane0 "plane0"
|
OpName %plane0 "plane0"
|
||||||
OpName %plane1 "plane1"
|
OpName %plane1 "plane1"
|
||||||
OpName %coord "coord"
|
OpName %coord "coord"
|
||||||
OpName %params_0 "params"
|
OpName %params_0 "params"
|
||||||
OpName %color "color"
|
OpName %color "color"
|
||||||
|
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||||
|
OpName %val "val"
|
||||||
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
|
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
|
||||||
OpName %res "res"
|
OpName %res "res"
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
OpName %vertex_main_inner "vertex_main_inner"
|
||||||
|
@ -54,14 +66,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 1
|
OpDecorate %ext_tex_plane_1 Binding 1
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -70,18 +82,31 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
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_std140 8 Offset 192
|
||||||
|
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 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||||
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
|
%float = OpTypeFloat 32
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||||
|
@ -98,11 +123,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||||
%bool = OpTypeBool
|
%bool = OpTypeBool
|
||||||
|
@ -110,20 +135,22 @@
|
||||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||||
%43 = OpConstantNull %v3float
|
%43 = OpConstantNull %v3float
|
||||||
%v2uint = OpTypeVector %uint 2
|
%v2uint = OpTypeVector %uint 2
|
||||||
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float
|
||||||
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
|
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
%80 = OpConstantNull %int
|
%82 = OpConstantNull %int
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%94 = OpConstantNull %uint
|
%95 = OpConstantNull %uint
|
||||||
|
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%112 = OpTypeFunction %void
|
%128 = OpTypeFunction %void
|
||||||
%119 = OpConstantComposite %v2uint %uint_1 %uint_1
|
%135 = OpConstantComposite %v2uint %uint_1 %uint_1
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%126 = OpTypeFunction %v4float
|
%143 = OpTypeFunction %v4float
|
||||||
%gammaCorrection = OpFunction %v3float None %23
|
%gammaCorrection = OpFunction %v3float None %23
|
||||||
%v = OpFunctionParameter %v3float
|
%v = OpFunctionParameter %v3float
|
||||||
%params = OpFunctionParameter %GammaTransferParams
|
%params = OpFunctionParameter %GammaTransferParams
|
||||||
|
@ -165,86 +192,103 @@
|
||||||
%plane1 = OpFunctionParameter %11
|
%plane1 = OpFunctionParameter %11
|
||||||
%coord = OpFunctionParameter %v2uint
|
%coord = OpFunctionParameter %v2uint
|
||||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||||
%70 = OpLabel
|
%72 = OpLabel
|
||||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||||
%72 = OpCompositeExtract %uint %params_0 0
|
%74 = OpCompositeExtract %uint %params_0 0
|
||||||
%74 = OpIEqual %bool %72 %uint_1
|
%76 = OpIEqual %bool %74 %uint_1
|
||||||
OpSelectionMerge %75 None
|
OpSelectionMerge %77 None
|
||||||
OpBranchConditional %74 %76 %77
|
OpBranchConditional %76 %78 %79
|
||||||
%76 = OpLabel
|
%78 = OpLabel
|
||||||
%78 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%80 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||||
%81 = OpVectorShuffle %v3float %78 %78 0 1 2
|
%83 = OpVectorShuffle %v3float %80 %80 0 1 2
|
||||||
OpStore %color %81
|
OpStore %color %83
|
||||||
OpBranch %75
|
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
|
||||||
%77 = OpLabel
|
%77 = OpLabel
|
||||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%94 = OpCompositeExtract %uint %params_0 1
|
||||||
%83 = OpCompositeExtract %float %82 0
|
%96 = OpIEqual %bool %94 %95
|
||||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
OpSelectionMerge %97 None
|
||||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
OpBranchConditional %96 %98 %97
|
||||||
%87 = OpCompositeExtract %float %86 0
|
%98 = OpLabel
|
||||||
%88 = OpCompositeExtract %float %86 1
|
%100 = OpLoad %v3float %color
|
||||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
OpStore %color %99
|
||||||
OpStore %color %92
|
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||||
OpBranch %75
|
%103 = OpLoad %v3float %color
|
||||||
%75 = OpLabel
|
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||||
%93 = OpCompositeExtract %uint %params_0 1
|
|
||||||
%95 = OpIEqual %bool %93 %94
|
|
||||||
OpSelectionMerge %96 None
|
|
||||||
OpBranchConditional %95 %97 %96
|
|
||||||
%97 = OpLabel
|
|
||||||
%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
|
OpStore %color %104
|
||||||
OpBranch %96
|
%106 = OpLoad %v3float %color
|
||||||
%96 = OpLabel
|
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||||
%107 = OpLoad %v3float %color
|
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||||
%108 = OpCompositeExtract %float %107 0
|
OpStore %color %105
|
||||||
%109 = OpCompositeExtract %float %107 1
|
OpBranch %97
|
||||||
%110 = OpCompositeExtract %float %107 2
|
%97 = OpLabel
|
||||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
%108 = OpLoad %v3float %color
|
||||||
OpReturnValue %111
|
%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
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%textureLoad_1bfdfb = OpFunction %void None %112
|
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
|
||||||
%115 = OpLabel
|
%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 = OpCompositeExtract %v2float %val 8
|
||||||
|
%126 = OpCompositeConstruct %mat3v2float %123 %124 %125
|
||||||
|
%127 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %126
|
||||||
|
OpReturnValue %127
|
||||||
|
OpFunctionEnd
|
||||||
|
%textureLoad_1bfdfb = OpFunction %void None %128
|
||||||
|
%131 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||||
%117 = OpLoad %11 %arg_0
|
%133 = OpLoad %11 %arg_0
|
||||||
%118 = OpLoad %11 %ext_tex_plane_1
|
%134 = OpLoad %11 %ext_tex_plane_1
|
||||||
%122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%139 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
%123 = OpLoad %ExternalTextureParams %122
|
%140 = OpLoad %ExternalTextureParams_std140 %139
|
||||||
%116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %119 %123
|
%136 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %140
|
||||||
OpStore %res %116
|
%132 = OpFunctionCall %v4float %textureLoadExternal %133 %134 %135 %136
|
||||||
|
OpStore %res %132
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %126
|
%vertex_main_inner = OpFunction %v4float None %143
|
||||||
%128 = OpLabel
|
%145 = OpLabel
|
||||||
%129 = OpFunctionCall %void %textureLoad_1bfdfb
|
%146 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %112
|
%vertex_main = OpFunction %void None %128
|
||||||
%131 = OpLabel
|
%148 = OpLabel
|
||||||
%132 = OpFunctionCall %v4float %vertex_main_inner
|
%149 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %132
|
OpStore %value %149
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %112
|
%fragment_main = OpFunction %void None %128
|
||||||
%134 = OpLabel
|
%151 = OpLabel
|
||||||
%135 = OpFunctionCall %void %textureLoad_1bfdfb
|
%152 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %112
|
%compute_main = OpFunction %void None %128
|
||||||
%137 = OpLabel
|
%154 = OpLabel
|
||||||
%138 = OpFunctionCall %void %textureLoad_1bfdfb
|
%155 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -62,8 +62,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -73,17 +73,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -62,8 +62,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -73,17 +73,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -49,8 +61,12 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -87,11 +103,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -118,8 +146,12 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -150,11 +182,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -181,8 +225,12 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -33,7 +33,8 @@ struct ExternalTextureParams {
|
||||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
/* 0x00b0 */ float3x2 coordTransformationMatrix;
|
||||||
|
/* 0x00c8 */ tint_array<int8_t, 8> tint_pad_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 140
|
; Bound: 157
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
%29 = OpExtInstImport "GLSL.std.450"
|
%29 = OpExtInstImport "GLSL.std.450"
|
||||||
|
@ -14,13 +14,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -30,20 +30,32 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %gammaCorrection "gammaCorrection"
|
OpName %gammaCorrection "gammaCorrection"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %params "params"
|
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 "coordTransformationMatrix"
|
||||||
OpName %textureLoadExternal "textureLoadExternal"
|
OpName %textureLoadExternal "textureLoadExternal"
|
||||||
OpName %plane0 "plane0"
|
OpName %plane0 "plane0"
|
||||||
OpName %plane1 "plane1"
|
OpName %plane1 "plane1"
|
||||||
OpName %coord "coord"
|
OpName %coord "coord"
|
||||||
OpName %params_0 "params"
|
OpName %params_0 "params"
|
||||||
OpName %color "color"
|
OpName %color "color"
|
||||||
|
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||||
|
OpName %val "val"
|
||||||
OpName %textureLoad_8acf41 "textureLoad_8acf41"
|
OpName %textureLoad_8acf41 "textureLoad_8acf41"
|
||||||
OpName %res "res"
|
OpName %res "res"
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
OpName %vertex_main_inner "vertex_main_inner"
|
||||||
|
@ -54,14 +66,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 1
|
OpDecorate %ext_tex_plane_1 Binding 1
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -70,18 +82,31 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
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_std140 8 Offset 192
|
||||||
|
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 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||||
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
|
%float = OpTypeFloat 32
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||||
|
@ -98,11 +123,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||||
%bool = OpTypeBool
|
%bool = OpTypeBool
|
||||||
|
@ -111,20 +136,22 @@
|
||||||
%43 = OpConstantNull %v3float
|
%43 = OpConstantNull %v3float
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
%v2int = OpTypeVector %int 2
|
%v2int = OpTypeVector %int 2
|
||||||
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float
|
||||||
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%80 = OpConstantNull %int
|
%82 = OpConstantNull %int
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%94 = OpConstantNull %uint
|
%95 = OpConstantNull %uint
|
||||||
|
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%112 = OpTypeFunction %void
|
%128 = OpTypeFunction %void
|
||||||
%int_1 = OpConstant %int 1
|
%int_1 = OpConstant %int 1
|
||||||
%120 = OpConstantComposite %v2int %int_1 %int_1
|
%136 = OpConstantComposite %v2int %int_1 %int_1
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%127 = OpTypeFunction %v4float
|
%144 = OpTypeFunction %v4float
|
||||||
%gammaCorrection = OpFunction %v3float None %23
|
%gammaCorrection = OpFunction %v3float None %23
|
||||||
%v = OpFunctionParameter %v3float
|
%v = OpFunctionParameter %v3float
|
||||||
%params = OpFunctionParameter %GammaTransferParams
|
%params = OpFunctionParameter %GammaTransferParams
|
||||||
|
@ -166,86 +193,103 @@
|
||||||
%plane1 = OpFunctionParameter %11
|
%plane1 = OpFunctionParameter %11
|
||||||
%coord = OpFunctionParameter %v2int
|
%coord = OpFunctionParameter %v2int
|
||||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||||
%71 = OpLabel
|
%73 = OpLabel
|
||||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||||
%73 = OpCompositeExtract %uint %params_0 0
|
%75 = OpCompositeExtract %uint %params_0 0
|
||||||
%75 = OpIEqual %bool %73 %uint_1
|
%77 = OpIEqual %bool %75 %uint_1
|
||||||
OpSelectionMerge %76 None
|
OpSelectionMerge %78 None
|
||||||
OpBranchConditional %75 %77 %78
|
OpBranchConditional %77 %79 %80
|
||||||
%77 = OpLabel
|
%79 = OpLabel
|
||||||
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||||
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
|
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
|
||||||
OpStore %color %81
|
OpStore %color %83
|
||||||
OpBranch %76
|
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
|
||||||
%78 = OpLabel
|
%78 = OpLabel
|
||||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%94 = OpCompositeExtract %uint %params_0 1
|
||||||
%83 = OpCompositeExtract %float %82 0
|
%96 = OpIEqual %bool %94 %95
|
||||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
OpSelectionMerge %97 None
|
||||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
OpBranchConditional %96 %98 %97
|
||||||
%87 = OpCompositeExtract %float %86 0
|
%98 = OpLabel
|
||||||
%88 = OpCompositeExtract %float %86 1
|
%100 = OpLoad %v3float %color
|
||||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
OpStore %color %99
|
||||||
OpStore %color %92
|
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||||
OpBranch %76
|
%103 = OpLoad %v3float %color
|
||||||
%76 = OpLabel
|
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||||
%93 = OpCompositeExtract %uint %params_0 1
|
|
||||||
%95 = OpIEqual %bool %93 %94
|
|
||||||
OpSelectionMerge %96 None
|
|
||||||
OpBranchConditional %95 %97 %96
|
|
||||||
%97 = OpLabel
|
|
||||||
%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
|
OpStore %color %104
|
||||||
OpBranch %96
|
%106 = OpLoad %v3float %color
|
||||||
%96 = OpLabel
|
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||||
%107 = OpLoad %v3float %color
|
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||||
%108 = OpCompositeExtract %float %107 0
|
OpStore %color %105
|
||||||
%109 = OpCompositeExtract %float %107 1
|
OpBranch %97
|
||||||
%110 = OpCompositeExtract %float %107 2
|
%97 = OpLabel
|
||||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
%108 = OpLoad %v3float %color
|
||||||
OpReturnValue %111
|
%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
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%textureLoad_8acf41 = OpFunction %void None %112
|
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
|
||||||
%115 = OpLabel
|
%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 = OpCompositeExtract %v2float %val 8
|
||||||
|
%126 = OpCompositeConstruct %mat3v2float %123 %124 %125
|
||||||
|
%127 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %126
|
||||||
|
OpReturnValue %127
|
||||||
|
OpFunctionEnd
|
||||||
|
%textureLoad_8acf41 = OpFunction %void None %128
|
||||||
|
%131 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||||
%117 = OpLoad %11 %arg_0
|
%133 = OpLoad %11 %arg_0
|
||||||
%118 = OpLoad %11 %ext_tex_plane_1
|
%134 = OpLoad %11 %ext_tex_plane_1
|
||||||
%123 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%140 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
%124 = OpLoad %ExternalTextureParams %123
|
%141 = OpLoad %ExternalTextureParams_std140 %140
|
||||||
%116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %120 %124
|
%137 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %141
|
||||||
OpStore %res %116
|
%132 = OpFunctionCall %v4float %textureLoadExternal %133 %134 %136 %137
|
||||||
|
OpStore %res %132
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %127
|
%vertex_main_inner = OpFunction %v4float None %144
|
||||||
%129 = OpLabel
|
%146 = OpLabel
|
||||||
%130 = OpFunctionCall %void %textureLoad_8acf41
|
%147 = OpFunctionCall %void %textureLoad_8acf41
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %112
|
%vertex_main = OpFunction %void None %128
|
||||||
%132 = OpLabel
|
%149 = OpLabel
|
||||||
%133 = OpFunctionCall %v4float %vertex_main_inner
|
%150 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %133
|
OpStore %value %150
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %112
|
%fragment_main = OpFunction %void None %128
|
||||||
%135 = OpLabel
|
%152 = OpLabel
|
||||||
%136 = OpFunctionCall %void %textureLoad_8acf41
|
%153 = OpFunctionCall %void %textureLoad_8acf41
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %112
|
%compute_main = OpFunction %void None %128
|
||||||
%138 = OpLabel
|
%155 = OpLabel
|
||||||
%139 = OpFunctionCall %void %textureLoad_8acf41
|
%156 = OpFunctionCall %void %textureLoad_8acf41
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t2, 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) {
|
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
|
||||||
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
|
const float2 modifiedCoords = mul(float3(coord, 1.0f), params.coordTransformationMatrix);
|
||||||
int3 tint_tmp;
|
int3 tint_tmp;
|
||||||
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||||
const float2 plane0_dims = float2(tint_tmp.xy);
|
const float2 plane0_dims = float2(tint_tmp.xy);
|
||||||
|
@ -74,8 +74,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -85,17 +85,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
void textureSampleBaseClampToEdge_7c04e6() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t2, 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) {
|
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
|
||||||
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
|
const float2 modifiedCoords = mul(float3(coord, 1.0f), params.coordTransformationMatrix);
|
||||||
int3 tint_tmp;
|
int3 tint_tmp;
|
||||||
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||||
const float2 plane0_dims = float2(tint_tmp.xy);
|
const float2 plane0_dims = float2(tint_tmp.xy);
|
||||||
|
@ -74,8 +74,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -85,17 +85,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
void textureSampleBaseClampToEdge_7c04e6() {
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -34,7 +46,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) {
|
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
vec2 modifiedCoords = (params.coordTransformationMatrix * vec3(coord, 1.0f));
|
||||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||||
|
@ -59,8 +71,12 @@ uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_1;
|
uniform highp sampler2D ext_tex_plane_1_1;
|
||||||
uniform highp sampler2D arg_0_arg_1;
|
uniform highp sampler2D arg_0_arg_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
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), 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), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -97,11 +113,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -113,7 +141,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) {
|
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
vec2 modifiedCoords = (params.coordTransformationMatrix * vec3(coord, 1.0f));
|
||||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||||
|
@ -138,8 +166,12 @@ uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_1;
|
uniform highp sampler2D ext_tex_plane_1_1;
|
||||||
uniform highp sampler2D arg_0_arg_1;
|
uniform highp sampler2D arg_0_arg_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
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), 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), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -170,11 +202,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -186,7 +230,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) {
|
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
vec2 modifiedCoords = (params.coordTransformationMatrix * vec3(coord, 1.0f));
|
||||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||||
|
@ -211,8 +255,12 @@ uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_1;
|
uniform highp sampler2D ext_tex_plane_1_1;
|
||||||
uniform highp sampler2D arg_0_arg_1;
|
uniform highp sampler2D arg_0_arg_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
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), 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), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -33,7 +33,8 @@ struct ExternalTextureParams {
|
||||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
/* 0x00b0 */ float3x2 coordTransformationMatrix;
|
||||||
|
/* 0x00c8 */ tint_array<int8_t, 8> tint_pad_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||||
|
@ -44,7 +45,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) {
|
float4 textureSampleExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, sampler smp, float2 coord, ExternalTextureParams params) {
|
||||||
float2 const modifiedCoords = (float3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
float2 const modifiedCoords = (params.coordTransformationMatrix * float3(coord, 1.0f));
|
||||||
float2 const plane0_dims = float2(uint2(plane0.get_width(0), plane0.get_height(0)));
|
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_half_texel = (float2(0.5f) / plane0_dims);
|
||||||
float2 const plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
float2 const plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 174
|
; Bound: 188
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpCapability ImageQuery
|
OpCapability ImageQuery
|
||||||
|
@ -15,13 +15,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -31,15 +31,25 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %arg_1 "arg_1"
|
OpName %arg_1 "arg_1"
|
||||||
OpName %gammaCorrection "gammaCorrection"
|
OpName %gammaCorrection "gammaCorrection"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %params "params"
|
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 "coordTransformationMatrix"
|
||||||
OpName %textureSampleExternal "textureSampleExternal"
|
OpName %textureSampleExternal "textureSampleExternal"
|
||||||
OpName %plane0 "plane0"
|
OpName %plane0 "plane0"
|
||||||
OpName %plane1 "plane1"
|
OpName %plane1 "plane1"
|
||||||
|
@ -47,6 +57,8 @@
|
||||||
OpName %coord "coord"
|
OpName %coord "coord"
|
||||||
OpName %params_0 "params"
|
OpName %params_0 "params"
|
||||||
OpName %color "color"
|
OpName %color "color"
|
||||||
|
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||||
|
OpName %val "val"
|
||||||
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
|
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
|
||||||
OpName %res "res"
|
OpName %res "res"
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
OpName %vertex_main_inner "vertex_main_inner"
|
||||||
|
@ -57,14 +69,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 2
|
OpDecorate %ext_tex_plane_1 Binding 2
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -73,13 +85,13 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 8 Offset 192
|
||||||
OpDecorate %ext_tex_params NonWritable
|
OpDecorate %ext_tex_params NonWritable
|
||||||
OpDecorate %ext_tex_params DescriptorSet 1
|
OpDecorate %ext_tex_params DescriptorSet 1
|
||||||
OpDecorate %ext_tex_params Binding 3
|
OpDecorate %ext_tex_params Binding 3
|
||||||
|
@ -87,6 +99,19 @@
|
||||||
OpDecorate %arg_0 Binding 0
|
OpDecorate %arg_0 Binding 0
|
||||||
OpDecorate %arg_1 DescriptorSet 1
|
OpDecorate %arg_1 DescriptorSet 1
|
||||||
OpDecorate %arg_1 Binding 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
|
%float = OpTypeFloat 32
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||||
|
@ -103,11 +128,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%25 = OpTypeSampler
|
%25 = OpTypeSampler
|
||||||
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
|
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
|
||||||
|
@ -117,26 +142,28 @@
|
||||||
%v3bool = OpTypeVector %bool 3
|
%v3bool = OpTypeVector %bool 3
|
||||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||||
%46 = OpConstantNull %v3float
|
%46 = OpConstantNull %v3float
|
||||||
%v2float = OpTypeVector %float 2
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float
|
||||||
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
|
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
|
||||||
%float_0_5 = OpConstant %float 0.5
|
|
||||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
||||||
%79 = OpConstantNull %v2float
|
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%v2uint = OpTypeVector %uint 2
|
%v2uint = OpTypeVector %uint 2
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
%91 = OpConstantNull %int
|
%86 = OpConstantNull %int
|
||||||
%92 = OpConstantComposite %v2float %float_0_5 %float_0_5
|
%float_0_5 = OpConstant %float 0.5
|
||||||
|
%88 = OpConstantComposite %v2float %float_0_5 %float_0_5
|
||||||
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||||
|
%94 = OpConstantNull %v2float
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%113 = OpTypeSampledImage %11
|
%111 = OpTypeSampledImage %11
|
||||||
%128 = OpConstantNull %uint
|
%126 = OpConstantNull %uint
|
||||||
|
%144 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%146 = OpTypeFunction %void
|
%159 = OpTypeFunction %void
|
||||||
%154 = OpConstantComposite %v2float %float_1 %float_1
|
%167 = OpConstantComposite %v2float %float_1 %float_1
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%161 = OpTypeFunction %v4float
|
%175 = OpTypeFunction %v4float
|
||||||
%gammaCorrection = OpFunction %v3float None %26
|
%gammaCorrection = OpFunction %v3float None %26
|
||||||
%v = OpFunctionParameter %v3float
|
%v = OpFunctionParameter %v3float
|
||||||
%params = OpFunctionParameter %GammaTransferParams
|
%params = OpFunctionParameter %GammaTransferParams
|
||||||
|
@ -179,112 +206,126 @@
|
||||||
%smp = OpFunctionParameter %25
|
%smp = OpFunctionParameter %25
|
||||||
%coord = OpFunctionParameter %v2float
|
%coord = OpFunctionParameter %v2float
|
||||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||||
%74 = OpLabel
|
%75 = OpLabel
|
||||||
%77 = OpVariable %_ptr_Function_v2float Function %79
|
%92 = OpVariable %_ptr_Function_v2float Function %94
|
||||||
%96 = OpVariable %_ptr_Function_v2float Function %79
|
%101 = OpVariable %_ptr_Function_v2float Function %94
|
||||||
%103 = OpVariable %_ptr_Function_v2float Function %79
|
|
||||||
%color = OpVariable %_ptr_Function_v3float Function %46
|
%color = OpVariable %_ptr_Function_v3float Function %46
|
||||||
%80 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
%76 = OpCompositeExtract %mat3v2float %params_0 6
|
||||||
%76 = OpFSub %v2float %coord %80
|
%77 = OpCompositeExtract %float %coord 0
|
||||||
%81 = OpCompositeExtract %float %76 0
|
%78 = OpCompositeExtract %float %coord 1
|
||||||
%82 = OpCompositeExtract %float %76 1
|
%80 = OpCompositeConstruct %v3float %77 %78 %float_1
|
||||||
%84 = OpCompositeConstruct %v3float %81 %82 %float_1
|
%81 = OpMatrixTimesVector %v2float %76 %80
|
||||||
%85 = OpCompositeExtract %mat2v3float %params_0 6
|
%83 = OpImageQuerySizeLod %v2uint %plane0 %86
|
||||||
%86 = OpVectorTimesMatrix %v2float %84 %85
|
%82 = OpConvertUToF %v2float %83
|
||||||
%88 = OpImageQuerySizeLod %v2uint %plane0 %91
|
%89 = OpFDiv %v2float %88 %82
|
||||||
%87 = OpConvertUToF %v2float %88
|
%95 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||||
%93 = OpFDiv %v2float %92 %87
|
%91 = OpFSub %v2float %95 %89
|
||||||
%97 = OpCompositeConstruct %v2float %float_1 %float_1
|
%90 = OpExtInst %v2float %32 NClamp %81 %89 %91
|
||||||
%95 = OpFSub %v2float %97 %93
|
%97 = OpImageQuerySizeLod %v2uint %plane1 %86
|
||||||
%94 = OpExtInst %v2float %32 NClamp %86 %93 %95
|
%96 = OpConvertUToF %v2float %97
|
||||||
%99 = OpImageQuerySizeLod %v2uint %plane1 %91
|
%98 = OpFDiv %v2float %88 %96
|
||||||
%98 = OpConvertUToF %v2float %99
|
%102 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||||
%100 = OpFDiv %v2float %92 %98
|
%100 = OpFSub %v2float %102 %98
|
||||||
%104 = OpCompositeConstruct %v2float %float_1 %float_1
|
%99 = OpExtInst %v2float %32 NClamp %81 %98 %100
|
||||||
%102 = OpFSub %v2float %104 %100
|
%104 = OpCompositeExtract %uint %params_0 0
|
||||||
%101 = OpExtInst %v2float %32 NClamp %86 %100 %102
|
%106 = OpIEqual %bool %104 %uint_1
|
||||||
%106 = OpCompositeExtract %uint %params_0 0
|
OpSelectionMerge %107 None
|
||||||
%108 = OpIEqual %bool %106 %uint_1
|
OpBranchConditional %106 %108 %109
|
||||||
OpSelectionMerge %109 None
|
%108 = OpLabel
|
||||||
OpBranchConditional %108 %110 %111
|
%112 = OpSampledImage %111 %plane0 %smp
|
||||||
%110 = OpLabel
|
%110 = OpImageSampleExplicitLod %v4float %112 %90 Lod %8
|
||||||
%114 = OpSampledImage %113 %plane0 %smp
|
%113 = OpVectorShuffle %v3float %110 %110 0 1 2
|
||||||
%112 = OpImageSampleExplicitLod %v4float %114 %94 Lod %8
|
OpStore %color %113
|
||||||
%115 = OpVectorShuffle %v3float %112 %112 0 1 2
|
OpBranch %107
|
||||||
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
|
%109 = OpLabel
|
||||||
%127 = OpCompositeExtract %uint %params_0 1
|
%115 = OpSampledImage %111 %plane0 %smp
|
||||||
%129 = OpIEqual %bool %127 %128
|
%114 = OpImageSampleExplicitLod %v4float %115 %90 Lod %8
|
||||||
OpSelectionMerge %130 None
|
%116 = OpCompositeExtract %float %114 0
|
||||||
OpBranchConditional %129 %131 %130
|
%118 = OpSampledImage %111 %plane1 %smp
|
||||||
%131 = OpLabel
|
%117 = OpImageSampleExplicitLod %v4float %118 %99 Lod %8
|
||||||
%133 = OpLoad %v3float %color
|
%119 = OpVectorShuffle %v2float %117 %117 0 1
|
||||||
%134 = OpCompositeExtract %GammaTransferParams %params_0 3
|
%120 = OpCompositeExtract %float %119 0
|
||||||
%132 = OpFunctionCall %v3float %gammaCorrection %133 %134
|
%121 = OpCompositeExtract %float %119 1
|
||||||
OpStore %color %132
|
%122 = OpCompositeConstruct %v4float %116 %120 %121 %float_1
|
||||||
%135 = OpCompositeExtract %mat3v3float %params_0 5
|
%123 = OpCompositeExtract %mat3v4float %params_0 2
|
||||||
%136 = OpLoad %v3float %color
|
%124 = OpVectorTimesMatrix %v3float %122 %123
|
||||||
%137 = OpMatrixTimesVector %v3float %135 %136
|
OpStore %color %124
|
||||||
OpStore %color %137
|
OpBranch %107
|
||||||
|
%107 = OpLabel
|
||||||
|
%125 = OpCompositeExtract %uint %params_0 1
|
||||||
|
%127 = OpIEqual %bool %125 %126
|
||||||
|
OpSelectionMerge %128 None
|
||||||
|
OpBranchConditional %127 %129 %128
|
||||||
|
%129 = OpLabel
|
||||||
|
%131 = OpLoad %v3float %color
|
||||||
|
%132 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||||
|
%130 = OpFunctionCall %v3float %gammaCorrection %131 %132
|
||||||
|
OpStore %color %130
|
||||||
|
%133 = OpCompositeExtract %mat3v3float %params_0 5
|
||||||
|
%134 = OpLoad %v3float %color
|
||||||
|
%135 = OpMatrixTimesVector %v3float %133 %134
|
||||||
|
OpStore %color %135
|
||||||
|
%137 = OpLoad %v3float %color
|
||||||
|
%138 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||||
|
%136 = OpFunctionCall %v3float %gammaCorrection %137 %138
|
||||||
|
OpStore %color %136
|
||||||
|
OpBranch %128
|
||||||
|
%128 = OpLabel
|
||||||
%139 = OpLoad %v3float %color
|
%139 = OpLoad %v3float %color
|
||||||
%140 = OpCompositeExtract %GammaTransferParams %params_0 4
|
%140 = OpCompositeExtract %float %139 0
|
||||||
%138 = OpFunctionCall %v3float %gammaCorrection %139 %140
|
%141 = OpCompositeExtract %float %139 1
|
||||||
OpStore %color %138
|
%142 = OpCompositeExtract %float %139 2
|
||||||
OpBranch %130
|
%143 = OpCompositeConstruct %v4float %140 %141 %142 %float_1
|
||||||
%130 = OpLabel
|
OpReturnValue %143
|
||||||
%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
|
OpFunctionEnd
|
||||||
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %146
|
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %144
|
||||||
%149 = OpLabel
|
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||||
|
%147 = OpLabel
|
||||||
|
%148 = OpCompositeExtract %uint %val 0
|
||||||
|
%149 = OpCompositeExtract %uint %val 1
|
||||||
|
%150 = OpCompositeExtract %mat3v4float %val 2
|
||||||
|
%151 = OpCompositeExtract %GammaTransferParams %val 3
|
||||||
|
%152 = OpCompositeExtract %GammaTransferParams %val 4
|
||||||
|
%153 = OpCompositeExtract %mat3v3float %val 5
|
||||||
|
%154 = OpCompositeExtract %v2float %val 6
|
||||||
|
%155 = OpCompositeExtract %v2float %val 7
|
||||||
|
%156 = OpCompositeExtract %v2float %val 8
|
||||||
|
%157 = OpCompositeConstruct %mat3v2float %154 %155 %156
|
||||||
|
%158 = OpCompositeConstruct %ExternalTextureParams %148 %149 %150 %151 %152 %153 %157
|
||||||
|
OpReturnValue %158
|
||||||
|
OpFunctionEnd
|
||||||
|
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %159
|
||||||
|
%162 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||||
%151 = OpLoad %11 %arg_0
|
%164 = OpLoad %11 %arg_0
|
||||||
%152 = OpLoad %11 %ext_tex_plane_1
|
%165 = OpLoad %11 %ext_tex_plane_1
|
||||||
%153 = OpLoad %25 %arg_1
|
%166 = OpLoad %25 %arg_1
|
||||||
%157 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%171 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
%158 = OpLoad %ExternalTextureParams %157
|
%172 = OpLoad %ExternalTextureParams_std140 %171
|
||||||
%150 = OpFunctionCall %v4float %textureSampleExternal %151 %152 %153 %154 %158
|
%168 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %172
|
||||||
OpStore %res %150
|
%163 = OpFunctionCall %v4float %textureSampleExternal %164 %165 %166 %167 %168
|
||||||
|
OpStore %res %163
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %161
|
%vertex_main_inner = OpFunction %v4float None %175
|
||||||
%163 = OpLabel
|
%177 = OpLabel
|
||||||
%164 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
%178 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %146
|
%vertex_main = OpFunction %void None %159
|
||||||
%166 = OpLabel
|
%180 = OpLabel
|
||||||
%167 = OpFunctionCall %v4float %vertex_main_inner
|
%181 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %167
|
OpStore %value %181
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %146
|
%fragment_main = OpFunction %void None %159
|
||||||
%169 = OpLabel
|
%183 = OpLabel
|
||||||
%170 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
%184 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %146
|
%compute_main = OpFunction %void None %159
|
||||||
%172 = OpLabel
|
%186 = OpLabel
|
||||||
%173 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
%187 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
|
@ -64,11 +76,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
|
@ -104,11 +128,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {
|
void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -30,9 +30,11 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
|
OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
|
||||||
|
@ -45,14 +47,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 1
|
OpDecorate %ext_tex_plane_1 Binding 1
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -61,13 +63,13 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 8 Offset 192
|
||||||
OpDecorate %ext_tex_params NonWritable
|
OpDecorate %ext_tex_params NonWritable
|
||||||
OpDecorate %ext_tex_params DescriptorSet 1
|
OpDecorate %ext_tex_params DescriptorSet 1
|
||||||
OpDecorate %ext_tex_params Binding 2
|
OpDecorate %ext_tex_params Binding 2
|
||||||
|
@ -89,11 +91,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%23 = OpTypeFunction %void
|
%23 = OpTypeFunction %void
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -62,8 +62,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -73,17 +73,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -62,8 +62,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -73,17 +73,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -49,9 +61,13 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
uvec2 arg_1 = uvec2(1u);
|
uvec2 arg_1 = uvec2(1u);
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -88,11 +104,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -119,9 +147,13 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
uvec2 arg_1 = uvec2(1u);
|
uvec2 arg_1 = uvec2(1u);
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -152,11 +184,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -183,9 +227,13 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_1bfdfb() {
|
void textureLoad_1bfdfb() {
|
||||||
uvec2 arg_1 = uvec2(1u);
|
uvec2 arg_1 = uvec2(1u);
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -33,7 +33,8 @@ struct ExternalTextureParams {
|
||||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
/* 0x00b0 */ float3x2 coordTransformationMatrix;
|
||||||
|
/* 0x00c8 */ tint_array<int8_t, 8> tint_pad_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 143
|
; Bound: 160
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
%29 = OpExtInstImport "GLSL.std.450"
|
%29 = OpExtInstImport "GLSL.std.450"
|
||||||
|
@ -14,13 +14,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -30,20 +30,32 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %gammaCorrection "gammaCorrection"
|
OpName %gammaCorrection "gammaCorrection"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %params "params"
|
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 "coordTransformationMatrix"
|
||||||
OpName %textureLoadExternal "textureLoadExternal"
|
OpName %textureLoadExternal "textureLoadExternal"
|
||||||
OpName %plane0 "plane0"
|
OpName %plane0 "plane0"
|
||||||
OpName %plane1 "plane1"
|
OpName %plane1 "plane1"
|
||||||
OpName %coord "coord"
|
OpName %coord "coord"
|
||||||
OpName %params_0 "params"
|
OpName %params_0 "params"
|
||||||
OpName %color "color"
|
OpName %color "color"
|
||||||
|
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||||
|
OpName %val "val"
|
||||||
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
|
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
|
||||||
OpName %arg_1 "arg_1"
|
OpName %arg_1 "arg_1"
|
||||||
OpName %res "res"
|
OpName %res "res"
|
||||||
|
@ -55,14 +67,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 1
|
OpDecorate %ext_tex_plane_1 Binding 1
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -71,18 +83,31 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
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_std140 8 Offset 192
|
||||||
|
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 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||||
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
|
%float = OpTypeFloat 32
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||||
|
@ -99,11 +124,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||||
%bool = OpTypeBool
|
%bool = OpTypeBool
|
||||||
|
@ -111,22 +136,24 @@
|
||||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||||
%43 = OpConstantNull %v3float
|
%43 = OpConstantNull %v3float
|
||||||
%v2uint = OpTypeVector %uint 2
|
%v2uint = OpTypeVector %uint 2
|
||||||
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float
|
||||||
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
|
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
%80 = OpConstantNull %int
|
%82 = OpConstantNull %int
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%94 = OpConstantNull %uint
|
%95 = OpConstantNull %uint
|
||||||
|
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%112 = OpTypeFunction %void
|
%128 = OpTypeFunction %void
|
||||||
%116 = OpConstantComposite %v2uint %uint_1 %uint_1
|
%132 = OpConstantComposite %v2uint %uint_1 %uint_1
|
||||||
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
|
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
|
||||||
%119 = OpConstantNull %v2uint
|
%135 = OpConstantNull %v2uint
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%130 = OpTypeFunction %v4float
|
%147 = OpTypeFunction %v4float
|
||||||
%gammaCorrection = OpFunction %v3float None %23
|
%gammaCorrection = OpFunction %v3float None %23
|
||||||
%v = OpFunctionParameter %v3float
|
%v = OpFunctionParameter %v3float
|
||||||
%params = OpFunctionParameter %GammaTransferParams
|
%params = OpFunctionParameter %GammaTransferParams
|
||||||
|
@ -168,89 +195,106 @@
|
||||||
%plane1 = OpFunctionParameter %11
|
%plane1 = OpFunctionParameter %11
|
||||||
%coord = OpFunctionParameter %v2uint
|
%coord = OpFunctionParameter %v2uint
|
||||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||||
%70 = OpLabel
|
%72 = OpLabel
|
||||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||||
%72 = OpCompositeExtract %uint %params_0 0
|
%74 = OpCompositeExtract %uint %params_0 0
|
||||||
%74 = OpIEqual %bool %72 %uint_1
|
%76 = OpIEqual %bool %74 %uint_1
|
||||||
OpSelectionMerge %75 None
|
OpSelectionMerge %77 None
|
||||||
OpBranchConditional %74 %76 %77
|
OpBranchConditional %76 %78 %79
|
||||||
%76 = OpLabel
|
%78 = OpLabel
|
||||||
%78 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%80 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||||
%81 = OpVectorShuffle %v3float %78 %78 0 1 2
|
%83 = OpVectorShuffle %v3float %80 %80 0 1 2
|
||||||
OpStore %color %81
|
OpStore %color %83
|
||||||
OpBranch %75
|
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
|
||||||
%77 = OpLabel
|
%77 = OpLabel
|
||||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%94 = OpCompositeExtract %uint %params_0 1
|
||||||
%83 = OpCompositeExtract %float %82 0
|
%96 = OpIEqual %bool %94 %95
|
||||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
OpSelectionMerge %97 None
|
||||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
OpBranchConditional %96 %98 %97
|
||||||
%87 = OpCompositeExtract %float %86 0
|
%98 = OpLabel
|
||||||
%88 = OpCompositeExtract %float %86 1
|
%100 = OpLoad %v3float %color
|
||||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
OpStore %color %99
|
||||||
OpStore %color %92
|
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||||
OpBranch %75
|
%103 = OpLoad %v3float %color
|
||||||
%75 = OpLabel
|
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||||
%93 = OpCompositeExtract %uint %params_0 1
|
|
||||||
%95 = OpIEqual %bool %93 %94
|
|
||||||
OpSelectionMerge %96 None
|
|
||||||
OpBranchConditional %95 %97 %96
|
|
||||||
%97 = OpLabel
|
|
||||||
%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
|
OpStore %color %104
|
||||||
OpBranch %96
|
%106 = OpLoad %v3float %color
|
||||||
%96 = OpLabel
|
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||||
%107 = OpLoad %v3float %color
|
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||||
%108 = OpCompositeExtract %float %107 0
|
OpStore %color %105
|
||||||
%109 = OpCompositeExtract %float %107 1
|
OpBranch %97
|
||||||
%110 = OpCompositeExtract %float %107 2
|
%97 = OpLabel
|
||||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
%108 = OpLoad %v3float %color
|
||||||
OpReturnValue %111
|
%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
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%textureLoad_1bfdfb = OpFunction %void None %112
|
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
|
||||||
%115 = OpLabel
|
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||||
%arg_1 = OpVariable %_ptr_Function_v2uint Function %119
|
%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 = OpCompositeExtract %v2float %val 8
|
||||||
|
%126 = OpCompositeConstruct %mat3v2float %123 %124 %125
|
||||||
|
%127 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %126
|
||||||
|
OpReturnValue %127
|
||||||
|
OpFunctionEnd
|
||||||
|
%textureLoad_1bfdfb = OpFunction %void None %128
|
||||||
|
%131 = OpLabel
|
||||||
|
%arg_1 = OpVariable %_ptr_Function_v2uint Function %135
|
||||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||||
OpStore %arg_1 %116
|
OpStore %arg_1 %132
|
||||||
%121 = OpLoad %11 %arg_0
|
%137 = OpLoad %11 %arg_0
|
||||||
%122 = OpLoad %11 %ext_tex_plane_1
|
%138 = OpLoad %11 %ext_tex_plane_1
|
||||||
%123 = OpLoad %v2uint %arg_1
|
%139 = OpLoad %v2uint %arg_1
|
||||||
%126 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%143 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
%127 = OpLoad %ExternalTextureParams %126
|
%144 = OpLoad %ExternalTextureParams_std140 %143
|
||||||
%120 = OpFunctionCall %v4float %textureLoadExternal %121 %122 %123 %127
|
%140 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %144
|
||||||
OpStore %res %120
|
%136 = OpFunctionCall %v4float %textureLoadExternal %137 %138 %139 %140
|
||||||
|
OpStore %res %136
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %130
|
%vertex_main_inner = OpFunction %v4float None %147
|
||||||
%132 = OpLabel
|
%149 = OpLabel
|
||||||
%133 = OpFunctionCall %void %textureLoad_1bfdfb
|
%150 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %112
|
%vertex_main = OpFunction %void None %128
|
||||||
%135 = OpLabel
|
%152 = OpLabel
|
||||||
%136 = OpFunctionCall %v4float %vertex_main_inner
|
%153 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %136
|
OpStore %value %153
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %112
|
%fragment_main = OpFunction %void None %128
|
||||||
%138 = OpLabel
|
%155 = OpLabel
|
||||||
%139 = OpFunctionCall %void %textureLoad_1bfdfb
|
%156 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %112
|
%compute_main = OpFunction %void None %128
|
||||||
%141 = OpLabel
|
%158 = OpLabel
|
||||||
%142 = OpFunctionCall %void %textureLoad_1bfdfb
|
%159 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -62,8 +62,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -73,17 +73,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -62,8 +62,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -73,17 +73,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -49,9 +61,13 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
ivec2 arg_1 = ivec2(1);
|
ivec2 arg_1 = ivec2(1);
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -88,11 +104,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -119,9 +147,13 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
ivec2 arg_1 = ivec2(1);
|
ivec2 arg_1 = ivec2(1);
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -152,11 +184,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -183,9 +227,13 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureLoad_8acf41() {
|
void textureLoad_8acf41() {
|
||||||
ivec2 arg_1 = ivec2(1);
|
ivec2 arg_1 = ivec2(1);
|
||||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -33,7 +33,8 @@ struct ExternalTextureParams {
|
||||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
/* 0x00b0 */ float3x2 coordTransformationMatrix;
|
||||||
|
/* 0x00c8 */ tint_array<int8_t, 8> tint_pad_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 144
|
; Bound: 161
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
%29 = OpExtInstImport "GLSL.std.450"
|
%29 = OpExtInstImport "GLSL.std.450"
|
||||||
|
@ -14,13 +14,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -30,20 +30,32 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %gammaCorrection "gammaCorrection"
|
OpName %gammaCorrection "gammaCorrection"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %params "params"
|
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 "coordTransformationMatrix"
|
||||||
OpName %textureLoadExternal "textureLoadExternal"
|
OpName %textureLoadExternal "textureLoadExternal"
|
||||||
OpName %plane0 "plane0"
|
OpName %plane0 "plane0"
|
||||||
OpName %plane1 "plane1"
|
OpName %plane1 "plane1"
|
||||||
OpName %coord "coord"
|
OpName %coord "coord"
|
||||||
OpName %params_0 "params"
|
OpName %params_0 "params"
|
||||||
OpName %color "color"
|
OpName %color "color"
|
||||||
|
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||||
|
OpName %val "val"
|
||||||
OpName %textureLoad_8acf41 "textureLoad_8acf41"
|
OpName %textureLoad_8acf41 "textureLoad_8acf41"
|
||||||
OpName %arg_1 "arg_1"
|
OpName %arg_1 "arg_1"
|
||||||
OpName %res "res"
|
OpName %res "res"
|
||||||
|
@ -55,14 +67,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 1
|
OpDecorate %ext_tex_plane_1 Binding 1
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -71,18 +83,31 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
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_std140 8 Offset 192
|
||||||
|
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 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||||
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
|
%float = OpTypeFloat 32
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||||
|
@ -99,11 +124,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||||
%bool = OpTypeBool
|
%bool = OpTypeBool
|
||||||
|
@ -112,22 +137,24 @@
|
||||||
%43 = OpConstantNull %v3float
|
%43 = OpConstantNull %v3float
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
%v2int = OpTypeVector %int 2
|
%v2int = OpTypeVector %int 2
|
||||||
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float
|
||||||
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%80 = OpConstantNull %int
|
%82 = OpConstantNull %int
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%94 = OpConstantNull %uint
|
%95 = OpConstantNull %uint
|
||||||
|
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%112 = OpTypeFunction %void
|
%128 = OpTypeFunction %void
|
||||||
%int_1 = OpConstant %int 1
|
%int_1 = OpConstant %int 1
|
||||||
%117 = OpConstantComposite %v2int %int_1 %int_1
|
%133 = OpConstantComposite %v2int %int_1 %int_1
|
||||||
%_ptr_Function_v2int = OpTypePointer Function %v2int
|
%_ptr_Function_v2int = OpTypePointer Function %v2int
|
||||||
%120 = OpConstantNull %v2int
|
%136 = OpConstantNull %v2int
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%131 = OpTypeFunction %v4float
|
%148 = OpTypeFunction %v4float
|
||||||
%gammaCorrection = OpFunction %v3float None %23
|
%gammaCorrection = OpFunction %v3float None %23
|
||||||
%v = OpFunctionParameter %v3float
|
%v = OpFunctionParameter %v3float
|
||||||
%params = OpFunctionParameter %GammaTransferParams
|
%params = OpFunctionParameter %GammaTransferParams
|
||||||
|
@ -169,89 +196,106 @@
|
||||||
%plane1 = OpFunctionParameter %11
|
%plane1 = OpFunctionParameter %11
|
||||||
%coord = OpFunctionParameter %v2int
|
%coord = OpFunctionParameter %v2int
|
||||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||||
%71 = OpLabel
|
%73 = OpLabel
|
||||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||||
%73 = OpCompositeExtract %uint %params_0 0
|
%75 = OpCompositeExtract %uint %params_0 0
|
||||||
%75 = OpIEqual %bool %73 %uint_1
|
%77 = OpIEqual %bool %75 %uint_1
|
||||||
OpSelectionMerge %76 None
|
OpSelectionMerge %78 None
|
||||||
OpBranchConditional %75 %77 %78
|
OpBranchConditional %77 %79 %80
|
||||||
%77 = OpLabel
|
%79 = OpLabel
|
||||||
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||||
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
|
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
|
||||||
OpStore %color %81
|
OpStore %color %83
|
||||||
OpBranch %76
|
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
|
||||||
%78 = OpLabel
|
%78 = OpLabel
|
||||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%94 = OpCompositeExtract %uint %params_0 1
|
||||||
%83 = OpCompositeExtract %float %82 0
|
%96 = OpIEqual %bool %94 %95
|
||||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
OpSelectionMerge %97 None
|
||||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
OpBranchConditional %96 %98 %97
|
||||||
%87 = OpCompositeExtract %float %86 0
|
%98 = OpLabel
|
||||||
%88 = OpCompositeExtract %float %86 1
|
%100 = OpLoad %v3float %color
|
||||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
OpStore %color %99
|
||||||
OpStore %color %92
|
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||||
OpBranch %76
|
%103 = OpLoad %v3float %color
|
||||||
%76 = OpLabel
|
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||||
%93 = OpCompositeExtract %uint %params_0 1
|
|
||||||
%95 = OpIEqual %bool %93 %94
|
|
||||||
OpSelectionMerge %96 None
|
|
||||||
OpBranchConditional %95 %97 %96
|
|
||||||
%97 = OpLabel
|
|
||||||
%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
|
OpStore %color %104
|
||||||
OpBranch %96
|
%106 = OpLoad %v3float %color
|
||||||
%96 = OpLabel
|
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||||
%107 = OpLoad %v3float %color
|
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||||
%108 = OpCompositeExtract %float %107 0
|
OpStore %color %105
|
||||||
%109 = OpCompositeExtract %float %107 1
|
OpBranch %97
|
||||||
%110 = OpCompositeExtract %float %107 2
|
%97 = OpLabel
|
||||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
%108 = OpLoad %v3float %color
|
||||||
OpReturnValue %111
|
%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
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%textureLoad_8acf41 = OpFunction %void None %112
|
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
|
||||||
%115 = OpLabel
|
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||||
%arg_1 = OpVariable %_ptr_Function_v2int Function %120
|
%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 = OpCompositeExtract %v2float %val 8
|
||||||
|
%126 = OpCompositeConstruct %mat3v2float %123 %124 %125
|
||||||
|
%127 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %126
|
||||||
|
OpReturnValue %127
|
||||||
|
OpFunctionEnd
|
||||||
|
%textureLoad_8acf41 = OpFunction %void None %128
|
||||||
|
%131 = OpLabel
|
||||||
|
%arg_1 = OpVariable %_ptr_Function_v2int Function %136
|
||||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||||
OpStore %arg_1 %117
|
OpStore %arg_1 %133
|
||||||
%122 = OpLoad %11 %arg_0
|
%138 = OpLoad %11 %arg_0
|
||||||
%123 = OpLoad %11 %ext_tex_plane_1
|
%139 = OpLoad %11 %ext_tex_plane_1
|
||||||
%124 = OpLoad %v2int %arg_1
|
%140 = OpLoad %v2int %arg_1
|
||||||
%127 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%144 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
%128 = OpLoad %ExternalTextureParams %127
|
%145 = OpLoad %ExternalTextureParams_std140 %144
|
||||||
%121 = OpFunctionCall %v4float %textureLoadExternal %122 %123 %124 %128
|
%141 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %145
|
||||||
OpStore %res %121
|
%137 = OpFunctionCall %v4float %textureLoadExternal %138 %139 %140 %141
|
||||||
|
OpStore %res %137
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %131
|
%vertex_main_inner = OpFunction %v4float None %148
|
||||||
%133 = OpLabel
|
%150 = OpLabel
|
||||||
%134 = OpFunctionCall %void %textureLoad_8acf41
|
%151 = OpFunctionCall %void %textureLoad_8acf41
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %112
|
%vertex_main = OpFunction %void None %128
|
||||||
%136 = OpLabel
|
%153 = OpLabel
|
||||||
%137 = OpFunctionCall %v4float %vertex_main_inner
|
%154 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %137
|
OpStore %value %154
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %112
|
%fragment_main = OpFunction %void None %128
|
||||||
%139 = OpLabel
|
%156 = OpLabel
|
||||||
%140 = OpFunctionCall %void %textureLoad_8acf41
|
%157 = OpFunctionCall %void %textureLoad_8acf41
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %112
|
%compute_main = OpFunction %void None %128
|
||||||
%142 = OpLabel
|
%159 = OpLabel
|
||||||
%143 = OpFunctionCall %void %textureLoad_8acf41
|
%160 = OpFunctionCall %void %textureLoad_8acf41
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t2, 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) {
|
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
|
||||||
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
|
const float2 modifiedCoords = mul(float3(coord, 1.0f), params.coordTransformationMatrix);
|
||||||
int3 tint_tmp;
|
int3 tint_tmp;
|
||||||
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||||
const float2 plane0_dims = float2(tint_tmp.xy);
|
const float2 plane0_dims = float2(tint_tmp.xy);
|
||||||
|
@ -74,8 +74,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -85,17 +85,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
void textureSampleBaseClampToEdge_7c04e6() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t2, 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) {
|
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
|
||||||
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
|
const float2 modifiedCoords = mul(float3(coord, 1.0f), params.coordTransformationMatrix);
|
||||||
int3 tint_tmp;
|
int3 tint_tmp;
|
||||||
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||||
const float2 plane0_dims = float2(tint_tmp.xy);
|
const float2 plane0_dims = float2(tint_tmp.xy);
|
||||||
|
@ -74,8 +74,8 @@ GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||||
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]};
|
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_10;
|
return tint_symbol_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
|
@ -85,17 +85,21 @@ float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((offset + 4u)) / 4;
|
||||||
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))};
|
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
void textureSampleBaseClampToEdge_7c04e6() {
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -34,7 +46,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) {
|
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
vec2 modifiedCoords = (params.coordTransformationMatrix * vec3(coord, 1.0f));
|
||||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||||
|
@ -59,9 +71,13 @@ uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_1;
|
uniform highp sampler2D ext_tex_plane_1_1;
|
||||||
uniform highp sampler2D arg_0_arg_1;
|
uniform highp sampler2D arg_0_arg_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
void textureSampleBaseClampToEdge_7c04e6() {
|
||||||
vec2 arg_2 = vec2(1.0f);
|
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, 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, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -98,11 +114,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -114,7 +142,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) {
|
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
vec2 modifiedCoords = (params.coordTransformationMatrix * vec3(coord, 1.0f));
|
||||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||||
|
@ -139,9 +167,13 @@ uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_1;
|
uniform highp sampler2D ext_tex_plane_1_1;
|
||||||
uniform highp sampler2D arg_0_arg_1;
|
uniform highp sampler2D arg_0_arg_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
void textureSampleBaseClampToEdge_7c04e6() {
|
||||||
vec2 arg_2 = vec2(1.0f);
|
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, 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, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -172,11 +204,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -188,7 +232,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) {
|
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
vec2 modifiedCoords = (params.coordTransformationMatrix * vec3(coord, 1.0f));
|
||||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||||
|
@ -213,9 +257,13 @@ uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_1;
|
uniform highp sampler2D ext_tex_plane_1_1;
|
||||||
uniform highp sampler2D arg_0_arg_1;
|
uniform highp sampler2D arg_0_arg_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void textureSampleBaseClampToEdge_7c04e6() {
|
void textureSampleBaseClampToEdge_7c04e6() {
|
||||||
vec2 arg_2 = vec2(1.0f);
|
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, 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, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -33,7 +33,8 @@ struct ExternalTextureParams {
|
||||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
/* 0x00b0 */ float3x2 coordTransformationMatrix;
|
||||||
|
/* 0x00c8 */ tint_array<int8_t, 8> tint_pad_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||||
|
@ -44,7 +45,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) {
|
float4 textureSampleExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, sampler smp, float2 coord, ExternalTextureParams params) {
|
||||||
float2 const modifiedCoords = (float3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
float2 const modifiedCoords = (params.coordTransformationMatrix * float3(coord, 1.0f));
|
||||||
float2 const plane0_dims = float2(uint2(plane0.get_width(0), plane0.get_height(0)));
|
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_half_texel = (float2(0.5f) / plane0_dims);
|
||||||
float2 const plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
float2 const plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 176
|
; Bound: 190
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpCapability ImageQuery
|
OpCapability ImageQuery
|
||||||
|
@ -15,13 +15,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -31,15 +31,25 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %arg_1 "arg_1"
|
OpName %arg_1 "arg_1"
|
||||||
OpName %gammaCorrection "gammaCorrection"
|
OpName %gammaCorrection "gammaCorrection"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %params "params"
|
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 "coordTransformationMatrix"
|
||||||
OpName %textureSampleExternal "textureSampleExternal"
|
OpName %textureSampleExternal "textureSampleExternal"
|
||||||
OpName %plane0 "plane0"
|
OpName %plane0 "plane0"
|
||||||
OpName %plane1 "plane1"
|
OpName %plane1 "plane1"
|
||||||
|
@ -47,6 +57,8 @@
|
||||||
OpName %coord "coord"
|
OpName %coord "coord"
|
||||||
OpName %params_0 "params"
|
OpName %params_0 "params"
|
||||||
OpName %color "color"
|
OpName %color "color"
|
||||||
|
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||||
|
OpName %val "val"
|
||||||
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
|
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
|
||||||
OpName %arg_2 "arg_2"
|
OpName %arg_2 "arg_2"
|
||||||
OpName %res "res"
|
OpName %res "res"
|
||||||
|
@ -58,14 +70,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 2
|
OpDecorate %ext_tex_plane_1 Binding 2
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -74,13 +86,13 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 8 Offset 192
|
||||||
OpDecorate %ext_tex_params NonWritable
|
OpDecorate %ext_tex_params NonWritable
|
||||||
OpDecorate %ext_tex_params DescriptorSet 1
|
OpDecorate %ext_tex_params DescriptorSet 1
|
||||||
OpDecorate %ext_tex_params Binding 3
|
OpDecorate %ext_tex_params Binding 3
|
||||||
|
@ -88,6 +100,19 @@
|
||||||
OpDecorate %arg_0 Binding 0
|
OpDecorate %arg_0 Binding 0
|
||||||
OpDecorate %arg_1 DescriptorSet 1
|
OpDecorate %arg_1 DescriptorSet 1
|
||||||
OpDecorate %arg_1 Binding 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
|
%float = OpTypeFloat 32
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||||
|
@ -104,11 +129,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%25 = OpTypeSampler
|
%25 = OpTypeSampler
|
||||||
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
|
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
|
||||||
|
@ -118,26 +143,28 @@
|
||||||
%v3bool = OpTypeVector %bool 3
|
%v3bool = OpTypeVector %bool 3
|
||||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||||
%46 = OpConstantNull %v3float
|
%46 = OpConstantNull %v3float
|
||||||
%v2float = OpTypeVector %float 2
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float
|
||||||
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
|
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
|
||||||
%float_0_5 = OpConstant %float 0.5
|
|
||||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
||||||
%79 = OpConstantNull %v2float
|
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%v2uint = OpTypeVector %uint 2
|
%v2uint = OpTypeVector %uint 2
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
%91 = OpConstantNull %int
|
%86 = OpConstantNull %int
|
||||||
%92 = OpConstantComposite %v2float %float_0_5 %float_0_5
|
%float_0_5 = OpConstant %float 0.5
|
||||||
|
%88 = OpConstantComposite %v2float %float_0_5 %float_0_5
|
||||||
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||||
|
%94 = OpConstantNull %v2float
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%113 = OpTypeSampledImage %11
|
%111 = OpTypeSampledImage %11
|
||||||
%128 = OpConstantNull %uint
|
%126 = OpConstantNull %uint
|
||||||
|
%144 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%146 = OpTypeFunction %void
|
%159 = OpTypeFunction %void
|
||||||
%150 = OpConstantComposite %v2float %float_1 %float_1
|
%163 = OpConstantComposite %v2float %float_1 %float_1
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%163 = OpTypeFunction %v4float
|
%177 = OpTypeFunction %v4float
|
||||||
%gammaCorrection = OpFunction %v3float None %26
|
%gammaCorrection = OpFunction %v3float None %26
|
||||||
%v = OpFunctionParameter %v3float
|
%v = OpFunctionParameter %v3float
|
||||||
%params = OpFunctionParameter %GammaTransferParams
|
%params = OpFunctionParameter %GammaTransferParams
|
||||||
|
@ -180,115 +207,129 @@
|
||||||
%smp = OpFunctionParameter %25
|
%smp = OpFunctionParameter %25
|
||||||
%coord = OpFunctionParameter %v2float
|
%coord = OpFunctionParameter %v2float
|
||||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||||
%74 = OpLabel
|
%75 = OpLabel
|
||||||
%77 = OpVariable %_ptr_Function_v2float Function %79
|
%92 = OpVariable %_ptr_Function_v2float Function %94
|
||||||
%96 = OpVariable %_ptr_Function_v2float Function %79
|
%101 = OpVariable %_ptr_Function_v2float Function %94
|
||||||
%103 = OpVariable %_ptr_Function_v2float Function %79
|
|
||||||
%color = OpVariable %_ptr_Function_v3float Function %46
|
%color = OpVariable %_ptr_Function_v3float Function %46
|
||||||
%80 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
%76 = OpCompositeExtract %mat3v2float %params_0 6
|
||||||
%76 = OpFSub %v2float %coord %80
|
%77 = OpCompositeExtract %float %coord 0
|
||||||
%81 = OpCompositeExtract %float %76 0
|
%78 = OpCompositeExtract %float %coord 1
|
||||||
%82 = OpCompositeExtract %float %76 1
|
%80 = OpCompositeConstruct %v3float %77 %78 %float_1
|
||||||
%84 = OpCompositeConstruct %v3float %81 %82 %float_1
|
%81 = OpMatrixTimesVector %v2float %76 %80
|
||||||
%85 = OpCompositeExtract %mat2v3float %params_0 6
|
%83 = OpImageQuerySizeLod %v2uint %plane0 %86
|
||||||
%86 = OpVectorTimesMatrix %v2float %84 %85
|
%82 = OpConvertUToF %v2float %83
|
||||||
%88 = OpImageQuerySizeLod %v2uint %plane0 %91
|
%89 = OpFDiv %v2float %88 %82
|
||||||
%87 = OpConvertUToF %v2float %88
|
%95 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||||
%93 = OpFDiv %v2float %92 %87
|
%91 = OpFSub %v2float %95 %89
|
||||||
%97 = OpCompositeConstruct %v2float %float_1 %float_1
|
%90 = OpExtInst %v2float %32 NClamp %81 %89 %91
|
||||||
%95 = OpFSub %v2float %97 %93
|
%97 = OpImageQuerySizeLod %v2uint %plane1 %86
|
||||||
%94 = OpExtInst %v2float %32 NClamp %86 %93 %95
|
%96 = OpConvertUToF %v2float %97
|
||||||
%99 = OpImageQuerySizeLod %v2uint %plane1 %91
|
%98 = OpFDiv %v2float %88 %96
|
||||||
%98 = OpConvertUToF %v2float %99
|
%102 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||||
%100 = OpFDiv %v2float %92 %98
|
%100 = OpFSub %v2float %102 %98
|
||||||
%104 = OpCompositeConstruct %v2float %float_1 %float_1
|
%99 = OpExtInst %v2float %32 NClamp %81 %98 %100
|
||||||
%102 = OpFSub %v2float %104 %100
|
%104 = OpCompositeExtract %uint %params_0 0
|
||||||
%101 = OpExtInst %v2float %32 NClamp %86 %100 %102
|
%106 = OpIEqual %bool %104 %uint_1
|
||||||
%106 = OpCompositeExtract %uint %params_0 0
|
OpSelectionMerge %107 None
|
||||||
%108 = OpIEqual %bool %106 %uint_1
|
OpBranchConditional %106 %108 %109
|
||||||
OpSelectionMerge %109 None
|
%108 = OpLabel
|
||||||
OpBranchConditional %108 %110 %111
|
%112 = OpSampledImage %111 %plane0 %smp
|
||||||
%110 = OpLabel
|
%110 = OpImageSampleExplicitLod %v4float %112 %90 Lod %8
|
||||||
%114 = OpSampledImage %113 %plane0 %smp
|
%113 = OpVectorShuffle %v3float %110 %110 0 1 2
|
||||||
%112 = OpImageSampleExplicitLod %v4float %114 %94 Lod %8
|
OpStore %color %113
|
||||||
%115 = OpVectorShuffle %v3float %112 %112 0 1 2
|
OpBranch %107
|
||||||
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
|
%109 = OpLabel
|
||||||
%127 = OpCompositeExtract %uint %params_0 1
|
%115 = OpSampledImage %111 %plane0 %smp
|
||||||
%129 = OpIEqual %bool %127 %128
|
%114 = OpImageSampleExplicitLod %v4float %115 %90 Lod %8
|
||||||
OpSelectionMerge %130 None
|
%116 = OpCompositeExtract %float %114 0
|
||||||
OpBranchConditional %129 %131 %130
|
%118 = OpSampledImage %111 %plane1 %smp
|
||||||
%131 = OpLabel
|
%117 = OpImageSampleExplicitLod %v4float %118 %99 Lod %8
|
||||||
%133 = OpLoad %v3float %color
|
%119 = OpVectorShuffle %v2float %117 %117 0 1
|
||||||
%134 = OpCompositeExtract %GammaTransferParams %params_0 3
|
%120 = OpCompositeExtract %float %119 0
|
||||||
%132 = OpFunctionCall %v3float %gammaCorrection %133 %134
|
%121 = OpCompositeExtract %float %119 1
|
||||||
OpStore %color %132
|
%122 = OpCompositeConstruct %v4float %116 %120 %121 %float_1
|
||||||
%135 = OpCompositeExtract %mat3v3float %params_0 5
|
%123 = OpCompositeExtract %mat3v4float %params_0 2
|
||||||
%136 = OpLoad %v3float %color
|
%124 = OpVectorTimesMatrix %v3float %122 %123
|
||||||
%137 = OpMatrixTimesVector %v3float %135 %136
|
OpStore %color %124
|
||||||
OpStore %color %137
|
OpBranch %107
|
||||||
|
%107 = OpLabel
|
||||||
|
%125 = OpCompositeExtract %uint %params_0 1
|
||||||
|
%127 = OpIEqual %bool %125 %126
|
||||||
|
OpSelectionMerge %128 None
|
||||||
|
OpBranchConditional %127 %129 %128
|
||||||
|
%129 = OpLabel
|
||||||
|
%131 = OpLoad %v3float %color
|
||||||
|
%132 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||||
|
%130 = OpFunctionCall %v3float %gammaCorrection %131 %132
|
||||||
|
OpStore %color %130
|
||||||
|
%133 = OpCompositeExtract %mat3v3float %params_0 5
|
||||||
|
%134 = OpLoad %v3float %color
|
||||||
|
%135 = OpMatrixTimesVector %v3float %133 %134
|
||||||
|
OpStore %color %135
|
||||||
|
%137 = OpLoad %v3float %color
|
||||||
|
%138 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||||
|
%136 = OpFunctionCall %v3float %gammaCorrection %137 %138
|
||||||
|
OpStore %color %136
|
||||||
|
OpBranch %128
|
||||||
|
%128 = OpLabel
|
||||||
%139 = OpLoad %v3float %color
|
%139 = OpLoad %v3float %color
|
||||||
%140 = OpCompositeExtract %GammaTransferParams %params_0 4
|
%140 = OpCompositeExtract %float %139 0
|
||||||
%138 = OpFunctionCall %v3float %gammaCorrection %139 %140
|
%141 = OpCompositeExtract %float %139 1
|
||||||
OpStore %color %138
|
%142 = OpCompositeExtract %float %139 2
|
||||||
OpBranch %130
|
%143 = OpCompositeConstruct %v4float %140 %141 %142 %float_1
|
||||||
%130 = OpLabel
|
OpReturnValue %143
|
||||||
%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
|
OpFunctionEnd
|
||||||
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %146
|
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %144
|
||||||
%149 = OpLabel
|
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||||
%arg_2 = OpVariable %_ptr_Function_v2float Function %79
|
%147 = OpLabel
|
||||||
|
%148 = OpCompositeExtract %uint %val 0
|
||||||
|
%149 = OpCompositeExtract %uint %val 1
|
||||||
|
%150 = OpCompositeExtract %mat3v4float %val 2
|
||||||
|
%151 = OpCompositeExtract %GammaTransferParams %val 3
|
||||||
|
%152 = OpCompositeExtract %GammaTransferParams %val 4
|
||||||
|
%153 = OpCompositeExtract %mat3v3float %val 5
|
||||||
|
%154 = OpCompositeExtract %v2float %val 6
|
||||||
|
%155 = OpCompositeExtract %v2float %val 7
|
||||||
|
%156 = OpCompositeExtract %v2float %val 8
|
||||||
|
%157 = OpCompositeConstruct %mat3v2float %154 %155 %156
|
||||||
|
%158 = OpCompositeConstruct %ExternalTextureParams %148 %149 %150 %151 %152 %153 %157
|
||||||
|
OpReturnValue %158
|
||||||
|
OpFunctionEnd
|
||||||
|
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %159
|
||||||
|
%162 = OpLabel
|
||||||
|
%arg_2 = OpVariable %_ptr_Function_v2float Function %94
|
||||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||||
OpStore %arg_2 %150
|
OpStore %arg_2 %163
|
||||||
%153 = OpLoad %11 %arg_0
|
%166 = OpLoad %11 %arg_0
|
||||||
%154 = OpLoad %11 %ext_tex_plane_1
|
%167 = OpLoad %11 %ext_tex_plane_1
|
||||||
%155 = OpLoad %25 %arg_1
|
%168 = OpLoad %25 %arg_1
|
||||||
%156 = OpLoad %v2float %arg_2
|
%169 = OpLoad %v2float %arg_2
|
||||||
%159 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%173 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
%160 = OpLoad %ExternalTextureParams %159
|
%174 = OpLoad %ExternalTextureParams_std140 %173
|
||||||
%152 = OpFunctionCall %v4float %textureSampleExternal %153 %154 %155 %156 %160
|
%170 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %174
|
||||||
OpStore %res %152
|
%165 = OpFunctionCall %v4float %textureSampleExternal %166 %167 %168 %169 %170
|
||||||
|
OpStore %res %165
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %163
|
%vertex_main_inner = OpFunction %v4float None %177
|
||||||
%165 = OpLabel
|
%179 = OpLabel
|
||||||
%166 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
%180 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %146
|
%vertex_main = OpFunction %void None %159
|
||||||
%168 = OpLabel
|
%182 = OpLabel
|
||||||
%169 = OpFunctionCall %v4float %vertex_main_inner
|
%183 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %169
|
OpStore %value %183
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %146
|
%fragment_main = OpFunction %void None %159
|
||||||
%171 = OpLabel
|
%185 = OpLabel
|
||||||
%172 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
%186 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %146
|
%compute_main = OpFunction %void None %159
|
||||||
%174 = OpLabel
|
%188 = OpLabel
|
||||||
%175 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
%189 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -66,8 +66,8 @@ GammaTransferParams tint_symbol_6(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 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]};
|
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_11;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||||
|
@ -77,17 +77,21 @@ float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_2(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((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_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))};
|
const ExternalTextureParams tint_symbol_13 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_13;
|
||||||
}
|
}
|
||||||
|
|
||||||
void doTextureLoad() {
|
void doTextureLoad() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
float3x3 gamutConversionMatrix;
|
float3x3 gamutConversionMatrix;
|
||||||
float2x3 coordTransformationMatrix;
|
float3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||||
|
@ -66,8 +66,8 @@ GammaTransferParams tint_symbol_6(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||||
const uint scalar_offset_10 = ((offset + 28u)) / 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]};
|
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_11;
|
return tint_symbol_12;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
|
float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||||
|
@ -77,17 +77,21 @@ float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||||
}
|
}
|
||||||
|
|
||||||
float2x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
float3x2 tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||||
|
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||||
|
const uint scalar_offset_16 = ((offset + 16u)) / 4;
|
||||||
|
uint4 ubo_load_2 = buffer[scalar_offset_16 / 4];
|
||||||
|
return float3x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)), asfloat(((scalar_offset_16 & 2) ? ubo_load_2.zw : ubo_load_2.xy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalTextureParams tint_symbol_2(uint4 buffer[13], 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 + 0u)) / 4;
|
||||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
const uint scalar_offset_18 = ((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_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))};
|
const ExternalTextureParams tint_symbol_13 = {buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], buffer[scalar_offset_18 / 4][scalar_offset_18 % 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;
|
return tint_symbol_13;
|
||||||
}
|
}
|
||||||
|
|
||||||
void doTextureLoad() {
|
void doTextureLoad() {
|
||||||
|
|
|
@ -18,11 +18,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -53,8 +65,12 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_2;
|
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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void doTextureLoad() {
|
void doTextureLoad() {
|
||||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
|
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 vertex_main() {
|
vec4 vertex_main() {
|
||||||
|
@ -91,11 +107,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -126,8 +154,12 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_2;
|
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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void doTextureLoad() {
|
void doTextureLoad() {
|
||||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
|
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment_main() {
|
void fragment_main() {
|
||||||
|
@ -158,11 +190,23 @@ struct ExternalTextureParams {
|
||||||
GammaTransferParams gammaDecodeParams;
|
GammaTransferParams gammaDecodeParams;
|
||||||
GammaTransferParams gammaEncodeParams;
|
GammaTransferParams gammaEncodeParams;
|
||||||
mat3 gamutConversionMatrix;
|
mat3 gamutConversionMatrix;
|
||||||
mat2x3 coordTransformationMatrix;
|
mat3x2 coordTransformationMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
struct ExternalTextureParams_std140 {
|
||||||
ExternalTextureParams inner;
|
uint numPlanes;
|
||||||
|
uint doYuvToRgbConversionOnly;
|
||||||
|
mat3x4 yuvToRgbConversionMatrix;
|
||||||
|
GammaTransferParams gammaDecodeParams;
|
||||||
|
GammaTransferParams gammaEncodeParams;
|
||||||
|
mat3 gamutConversionMatrix;
|
||||||
|
vec2 coordTransformationMatrix_0;
|
||||||
|
vec2 coordTransformationMatrix_1;
|
||||||
|
vec2 coordTransformationMatrix_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||||
|
ExternalTextureParams_std140 inner;
|
||||||
} ext_tex_params;
|
} ext_tex_params;
|
||||||
|
|
||||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||||
|
@ -193,8 +237,12 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
|
||||||
|
|
||||||
uniform highp sampler2D arg_0_1;
|
uniform highp sampler2D arg_0_1;
|
||||||
uniform highp sampler2D ext_tex_plane_1_2;
|
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, mat3x2(val.coordTransformationMatrix_0, val.coordTransformationMatrix_1, val.coordTransformationMatrix_2));
|
||||||
|
}
|
||||||
|
|
||||||
void doTextureLoad() {
|
void doTextureLoad() {
|
||||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
|
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void compute_main() {
|
void compute_main() {
|
||||||
|
|
|
@ -33,7 +33,8 @@ struct ExternalTextureParams {
|
||||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
/* 0x00b0 */ float3x2 coordTransformationMatrix;
|
||||||
|
/* 0x00c8 */ tint_array<int8_t, 8> tint_pad_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 147
|
; Bound: 164
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
%29 = OpExtInstImport "GLSL.std.450"
|
%29 = OpExtInstImport "GLSL.std.450"
|
||||||
|
@ -14,13 +14,13 @@
|
||||||
OpName %value "value"
|
OpName %value "value"
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
OpName %vertex_point_size "vertex_point_size"
|
||||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||||
OpMemberName %ext_tex_params_block 0 "inner"
|
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||||
OpName %GammaTransferParams "GammaTransferParams"
|
OpName %GammaTransferParams "GammaTransferParams"
|
||||||
OpMemberName %GammaTransferParams 0 "G"
|
OpMemberName %GammaTransferParams 0 "G"
|
||||||
OpMemberName %GammaTransferParams 1 "A"
|
OpMemberName %GammaTransferParams 1 "A"
|
||||||
|
@ -30,14 +30,24 @@
|
||||||
OpMemberName %GammaTransferParams 5 "E"
|
OpMemberName %GammaTransferParams 5 "E"
|
||||||
OpMemberName %GammaTransferParams 6 "F"
|
OpMemberName %GammaTransferParams 6 "F"
|
||||||
OpMemberName %GammaTransferParams 7 "padding"
|
OpMemberName %GammaTransferParams 7 "padding"
|
||||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1"
|
||||||
|
OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2"
|
||||||
OpName %ext_tex_params "ext_tex_params"
|
OpName %ext_tex_params "ext_tex_params"
|
||||||
OpName %arg_0 "arg_0"
|
OpName %arg_0 "arg_0"
|
||||||
OpName %gammaCorrection "gammaCorrection"
|
OpName %gammaCorrection "gammaCorrection"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %params "params"
|
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 "coordTransformationMatrix"
|
||||||
OpName %textureLoadExternal "textureLoadExternal"
|
OpName %textureLoadExternal "textureLoadExternal"
|
||||||
OpName %plane0 "plane0"
|
OpName %plane0 "plane0"
|
||||||
OpName %plane1 "plane1"
|
OpName %plane1 "plane1"
|
||||||
|
@ -49,6 +59,8 @@
|
||||||
OpName %ext_tex_plane_1_1 "ext_tex_plane_1_1"
|
OpName %ext_tex_plane_1_1 "ext_tex_plane_1_1"
|
||||||
OpName %ext_tex_params_1 "ext_tex_params_1"
|
OpName %ext_tex_params_1 "ext_tex_params_1"
|
||||||
OpName %coords "coords"
|
OpName %coords "coords"
|
||||||
|
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||||
|
OpName %val "val"
|
||||||
OpName %doTextureLoad "doTextureLoad"
|
OpName %doTextureLoad "doTextureLoad"
|
||||||
OpName %res "res"
|
OpName %res "res"
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
OpName %vertex_main_inner "vertex_main_inner"
|
||||||
|
@ -59,14 +71,14 @@
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||||
OpDecorate %ext_tex_plane_1 Binding 1
|
OpDecorate %ext_tex_plane_1 Binding 1
|
||||||
OpDecorate %ext_tex_params_block Block
|
OpDecorate %ext_tex_params_block_std140 Block
|
||||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||||
|
@ -75,18 +87,31 @@
|
||||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
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_std140 8 Offset 192
|
||||||
|
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 4 Offset 96
|
||||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||||
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
|
%float = OpTypeFloat 32
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||||
|
@ -103,11 +128,11 @@
|
||||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||||
%v3float = OpTypeVector %float 3
|
%v3float = OpTypeVector %float 3
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%mat2v3float = OpTypeMatrix %v3float 2
|
%v2float = OpTypeVector %float 2
|
||||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float
|
||||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||||
%bool = OpTypeBool
|
%bool = OpTypeBool
|
||||||
|
@ -116,20 +141,22 @@
|
||||||
%43 = OpConstantNull %v3float
|
%43 = OpConstantNull %v3float
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
%v2int = OpTypeVector %int 2
|
%v2int = OpTypeVector %int 2
|
||||||
|
%mat3v2float = OpTypeMatrix %v2float 3
|
||||||
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float
|
||||||
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%80 = OpConstantNull %int
|
%82 = OpConstantNull %int
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%float_1 = OpConstant %float 1
|
%float_1 = OpConstant %float 1
|
||||||
%94 = OpConstantNull %uint
|
%95 = OpConstantNull %uint
|
||||||
%112 = OpTypeFunction %v4float %11 %11 %ExternalTextureParams %v2int
|
%113 = OpTypeFunction %v4float %11 %11 %ExternalTextureParams %v2int
|
||||||
|
%121 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%120 = OpTypeFunction %void
|
%136 = OpTypeFunction %void
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||||
%131 = OpConstantNull %v2int
|
%148 = OpConstantNull %v2int
|
||||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||||
%134 = OpTypeFunction %v4float
|
%151 = OpTypeFunction %v4float
|
||||||
%gammaCorrection = OpFunction %v3float None %23
|
%gammaCorrection = OpFunction %v3float None %23
|
||||||
%v = OpFunctionParameter %v3float
|
%v = OpFunctionParameter %v3float
|
||||||
%params = OpFunctionParameter %GammaTransferParams
|
%params = OpFunctionParameter %GammaTransferParams
|
||||||
|
@ -171,95 +198,112 @@
|
||||||
%plane1 = OpFunctionParameter %11
|
%plane1 = OpFunctionParameter %11
|
||||||
%coord = OpFunctionParameter %v2int
|
%coord = OpFunctionParameter %v2int
|
||||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||||
%71 = OpLabel
|
%73 = OpLabel
|
||||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||||
%73 = OpCompositeExtract %uint %params_0 0
|
%75 = OpCompositeExtract %uint %params_0 0
|
||||||
%75 = OpIEqual %bool %73 %uint_1
|
%77 = OpIEqual %bool %75 %uint_1
|
||||||
OpSelectionMerge %76 None
|
OpSelectionMerge %78 None
|
||||||
OpBranchConditional %75 %77 %78
|
OpBranchConditional %77 %79 %80
|
||||||
%77 = OpLabel
|
%79 = OpLabel
|
||||||
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||||
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
|
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
|
||||||
OpStore %color %81
|
OpStore %color %83
|
||||||
OpBranch %76
|
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
|
||||||
%78 = OpLabel
|
%78 = OpLabel
|
||||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
%94 = OpCompositeExtract %uint %params_0 1
|
||||||
%83 = OpCompositeExtract %float %82 0
|
%96 = OpIEqual %bool %94 %95
|
||||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
OpSelectionMerge %97 None
|
||||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
OpBranchConditional %96 %98 %97
|
||||||
%87 = OpCompositeExtract %float %86 0
|
%98 = OpLabel
|
||||||
%88 = OpCompositeExtract %float %86 1
|
%100 = OpLoad %v3float %color
|
||||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
OpStore %color %99
|
||||||
OpStore %color %92
|
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||||
OpBranch %76
|
%103 = OpLoad %v3float %color
|
||||||
%76 = OpLabel
|
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||||
%93 = OpCompositeExtract %uint %params_0 1
|
|
||||||
%95 = OpIEqual %bool %93 %94
|
|
||||||
OpSelectionMerge %96 None
|
|
||||||
OpBranchConditional %95 %97 %96
|
|
||||||
%97 = OpLabel
|
|
||||||
%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
|
OpStore %color %104
|
||||||
OpBranch %96
|
%106 = OpLoad %v3float %color
|
||||||
%96 = OpLabel
|
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||||
%107 = OpLoad %v3float %color
|
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||||
%108 = OpCompositeExtract %float %107 0
|
OpStore %color %105
|
||||||
%109 = OpCompositeExtract %float %107 1
|
OpBranch %97
|
||||||
%110 = OpCompositeExtract %float %107 2
|
%97 = OpLabel
|
||||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
%108 = OpLoad %v3float %color
|
||||||
OpReturnValue %111
|
%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
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%textureLoad2d = OpFunction %v4float None %112
|
%textureLoad2d = OpFunction %v4float None %113
|
||||||
%texture = OpFunctionParameter %11
|
%texture = OpFunctionParameter %11
|
||||||
%ext_tex_plane_1_1 = OpFunctionParameter %11
|
%ext_tex_plane_1_1 = OpFunctionParameter %11
|
||||||
%ext_tex_params_1 = OpFunctionParameter %ExternalTextureParams
|
%ext_tex_params_1 = OpFunctionParameter %ExternalTextureParams
|
||||||
%coords = OpFunctionParameter %v2int
|
%coords = OpFunctionParameter %v2int
|
||||||
%118 = OpLabel
|
%119 = OpLabel
|
||||||
%119 = OpFunctionCall %v4float %textureLoadExternal %texture %ext_tex_plane_1_1 %coords %ext_tex_params_1
|
%120 = OpFunctionCall %v4float %textureLoadExternal %texture %ext_tex_plane_1_1 %coords %ext_tex_params_1
|
||||||
OpReturnValue %119
|
OpReturnValue %120
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%doTextureLoad = OpFunction %void None %120
|
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %121
|
||||||
%123 = OpLabel
|
%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 = OpCompositeExtract %v2float %val 8
|
||||||
|
%134 = OpCompositeConstruct %mat3v2float %131 %132 %133
|
||||||
|
%135 = OpCompositeConstruct %ExternalTextureParams %125 %126 %127 %128 %129 %130 %134
|
||||||
|
OpReturnValue %135
|
||||||
|
OpFunctionEnd
|
||||||
|
%doTextureLoad = OpFunction %void None %136
|
||||||
|
%139 = OpLabel
|
||||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||||
%125 = OpLoad %11 %arg_0
|
%141 = OpLoad %11 %arg_0
|
||||||
%126 = OpLoad %11 %ext_tex_plane_1
|
%142 = OpLoad %11 %ext_tex_plane_1
|
||||||
%129 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
%146 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||||
%130 = OpLoad %ExternalTextureParams %129
|
%147 = OpLoad %ExternalTextureParams_std140 %146
|
||||||
%124 = OpFunctionCall %v4float %textureLoad2d %125 %126 %130 %131
|
%143 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %147
|
||||||
OpStore %res %124
|
%140 = OpFunctionCall %v4float %textureLoad2d %141 %142 %143 %148
|
||||||
|
OpStore %res %140
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main_inner = OpFunction %v4float None %134
|
%vertex_main_inner = OpFunction %v4float None %151
|
||||||
%136 = OpLabel
|
%153 = OpLabel
|
||||||
%137 = OpFunctionCall %void %doTextureLoad
|
%154 = OpFunctionCall %void %doTextureLoad
|
||||||
OpReturnValue %5
|
OpReturnValue %5
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vertex_main = OpFunction %void None %120
|
%vertex_main = OpFunction %void None %136
|
||||||
%139 = OpLabel
|
%156 = OpLabel
|
||||||
%140 = OpFunctionCall %v4float %vertex_main_inner
|
%157 = OpFunctionCall %v4float %vertex_main_inner
|
||||||
OpStore %value %140
|
OpStore %value %157
|
||||||
OpStore %vertex_point_size %float_1
|
OpStore %vertex_point_size %float_1
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%fragment_main = OpFunction %void None %120
|
%fragment_main = OpFunction %void None %136
|
||||||
%142 = OpLabel
|
%159 = OpLabel
|
||||||
%143 = OpFunctionCall %void %doTextureLoad
|
%160 = OpFunctionCall %void %doTextureLoad
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%compute_main = OpFunction %void None %120
|
%compute_main = OpFunction %void None %136
|
||||||
%145 = OpLabel
|
%162 = OpLabel
|
||||||
%146 = OpFunctionCall %void %doTextureLoad
|
%163 = OpFunctionCall %void %doTextureLoad
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
Loading…
Reference in New Issue