mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Implement External Texture Crop Functionality
Adds to the External Texture shader transform to allow cropping. Tests included. Bug: chromium:1316671 Change-Id: Id0ec9acac22a0968ba6847d6ead9cf5084eaca88 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113281 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
0be08d8b88
commit
183df9d24e
@@ -1,6 +1,6 @@
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
@@ -75,22 +64,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
@@ -126,22 +104,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
|
||||
@@ -19,7 +19,7 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -30,10 +30,9 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
|
||||
@@ -46,14 +45,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 1
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -62,12 +61,13 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
@@ -89,11 +89,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%void = OpTypeVoid
|
||||
%23 = OpTypeFunction %void
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, u
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, u
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -60,12 +49,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
@@ -102,22 +87,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -144,12 +118,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
@@ -180,22 +150,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -222,12 +181,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ExternalTextureParams {
|
||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||
/* 0x00b0 */ float2x2 rotationMatrix;
|
||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 155
|
||||
; Bound: 139
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%29 = OpExtInstImport "GLSL.std.450"
|
||||
@@ -14,13 +14,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -30,31 +30,20 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %gammaCorrection "gammaCorrection"
|
||||
OpName %v "v"
|
||||
OpName %params "params"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
|
||||
OpName %textureLoadExternal "textureLoadExternal"
|
||||
OpName %plane0 "plane0"
|
||||
OpName %plane1 "plane1"
|
||||
OpName %coord "coord"
|
||||
OpName %params_0 "params"
|
||||
OpName %color "color"
|
||||
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||
OpName %val "val"
|
||||
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
@@ -65,14 +54,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 1
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -81,30 +70,18 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
@@ -121,11 +98,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||
%bool = OpTypeBool
|
||||
@@ -133,22 +110,20 @@
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%43 = OpConstantNull %v3float
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
|
||||
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%int = OpTypeInt 32 1
|
||||
%82 = OpConstantNull %int
|
||||
%80 = OpConstantNull %int
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%95 = OpConstantNull %uint
|
||||
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||
%94 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%127 = OpTypeFunction %void
|
||||
%134 = OpConstantComposite %v2uint %uint_1 %uint_1
|
||||
%112 = OpTypeFunction %void
|
||||
%119 = OpConstantComposite %v2uint %uint_1 %uint_1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%142 = OpTypeFunction %v4float
|
||||
%126 = OpTypeFunction %v4float
|
||||
%gammaCorrection = OpFunction %v3float None %23
|
||||
%v = OpFunctionParameter %v3float
|
||||
%params = OpFunctionParameter %GammaTransferParams
|
||||
@@ -190,102 +165,86 @@
|
||||
%plane1 = OpFunctionParameter %11
|
||||
%coord = OpFunctionParameter %v2uint
|
||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||
%72 = OpLabel
|
||||
%70 = OpLabel
|
||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||
%74 = OpCompositeExtract %uint %params_0 0
|
||||
%76 = OpIEqual %bool %74 %uint_1
|
||||
OpSelectionMerge %77 None
|
||||
OpBranchConditional %76 %78 %79
|
||||
%78 = OpLabel
|
||||
%80 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%83 = OpVectorShuffle %v3float %80 %80 0 1 2
|
||||
OpStore %color %83
|
||||
OpBranch %77
|
||||
%79 = OpLabel
|
||||
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%85 = OpCompositeExtract %float %84 0
|
||||
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
|
||||
%87 = OpVectorShuffle %v2float %86 %86 0 1
|
||||
%88 = OpCompositeExtract %float %87 0
|
||||
%89 = OpCompositeExtract %float %87 1
|
||||
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
|
||||
%92 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%93 = OpVectorTimesMatrix %v3float %91 %92
|
||||
OpStore %color %93
|
||||
OpBranch %77
|
||||
%72 = OpCompositeExtract %uint %params_0 0
|
||||
%74 = OpIEqual %bool %72 %uint_1
|
||||
OpSelectionMerge %75 None
|
||||
OpBranchConditional %74 %76 %77
|
||||
%76 = OpLabel
|
||||
%78 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%81 = OpVectorShuffle %v3float %78 %78 0 1 2
|
||||
OpStore %color %81
|
||||
OpBranch %75
|
||||
%77 = OpLabel
|
||||
%94 = OpCompositeExtract %uint %params_0 1
|
||||
%96 = OpIEqual %bool %94 %95
|
||||
OpSelectionMerge %97 None
|
||||
OpBranchConditional %96 %98 %97
|
||||
%98 = OpLabel
|
||||
%100 = OpLoad %v3float %color
|
||||
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||
OpStore %color %99
|
||||
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%103 = OpLoad %v3float %color
|
||||
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||
OpStore %color %104
|
||||
%106 = OpLoad %v3float %color
|
||||
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||
OpStore %color %105
|
||||
OpBranch %97
|
||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%83 = OpCompositeExtract %float %82 0
|
||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
||||
%87 = OpCompositeExtract %float %86 0
|
||||
%88 = OpCompositeExtract %float %86 1
|
||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
||||
OpStore %color %92
|
||||
OpBranch %75
|
||||
%75 = OpLabel
|
||||
%93 = OpCompositeExtract %uint %params_0 1
|
||||
%95 = OpIEqual %bool %93 %94
|
||||
OpSelectionMerge %96 None
|
||||
OpBranchConditional %95 %97 %96
|
||||
%97 = OpLabel
|
||||
%108 = OpLoad %v3float %color
|
||||
%109 = OpCompositeExtract %float %108 0
|
||||
%110 = OpCompositeExtract %float %108 1
|
||||
%111 = OpCompositeExtract %float %108 2
|
||||
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
|
||||
OpReturnValue %112
|
||||
%99 = OpLoad %v3float %color
|
||||
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
|
||||
OpStore %color %98
|
||||
%101 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%102 = OpLoad %v3float %color
|
||||
%103 = OpMatrixTimesVector %v3float %101 %102
|
||||
OpStore %color %103
|
||||
%105 = OpLoad %v3float %color
|
||||
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
|
||||
OpStore %color %104
|
||||
OpBranch %96
|
||||
%96 = OpLabel
|
||||
%107 = OpLoad %v3float %color
|
||||
%108 = OpCompositeExtract %float %107 0
|
||||
%109 = OpCompositeExtract %float %107 1
|
||||
%110 = OpCompositeExtract %float %107 2
|
||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
||||
OpReturnValue %111
|
||||
OpFunctionEnd
|
||||
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
|
||||
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||
%116 = OpLabel
|
||||
%117 = OpCompositeExtract %uint %val 0
|
||||
%118 = OpCompositeExtract %uint %val 1
|
||||
%119 = OpCompositeExtract %mat3v4float %val 2
|
||||
%120 = OpCompositeExtract %GammaTransferParams %val 3
|
||||
%121 = OpCompositeExtract %GammaTransferParams %val 4
|
||||
%122 = OpCompositeExtract %mat3v3float %val 5
|
||||
%123 = OpCompositeExtract %v2float %val 6
|
||||
%124 = OpCompositeExtract %v2float %val 7
|
||||
%125 = OpCompositeConstruct %mat2v2float %123 %124
|
||||
%126 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %125
|
||||
OpReturnValue %126
|
||||
OpFunctionEnd
|
||||
%textureLoad_1bfdfb = OpFunction %void None %127
|
||||
%130 = OpLabel
|
||||
%textureLoad_1bfdfb = OpFunction %void None %112
|
||||
%115 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
%132 = OpLoad %11 %arg_0
|
||||
%133 = OpLoad %11 %ext_tex_plane_1
|
||||
%138 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||
%139 = OpLoad %ExternalTextureParams_std140 %138
|
||||
%135 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %139
|
||||
%131 = OpFunctionCall %v4float %textureLoadExternal %132 %133 %134 %135
|
||||
OpStore %res %131
|
||||
%117 = OpLoad %11 %arg_0
|
||||
%118 = OpLoad %11 %ext_tex_plane_1
|
||||
%122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
||||
%123 = OpLoad %ExternalTextureParams %122
|
||||
%116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %119 %123
|
||||
OpStore %res %116
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %142
|
||||
%144 = OpLabel
|
||||
%145 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
%vertex_main_inner = OpFunction %v4float None %126
|
||||
%128 = OpLabel
|
||||
%129 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %127
|
||||
%147 = OpLabel
|
||||
%148 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %148
|
||||
%vertex_main = OpFunction %void None %112
|
||||
%131 = OpLabel
|
||||
%132 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %132
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %127
|
||||
%150 = OpLabel
|
||||
%151 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
%fragment_main = OpFunction %void None %112
|
||||
%134 = OpLabel
|
||||
%135 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %127
|
||||
%153 = OpLabel
|
||||
%154 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
%compute_main = OpFunction %void None %112
|
||||
%137 = OpLabel
|
||||
%138 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -60,12 +49,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
@@ -102,22 +87,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -144,12 +118,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
@@ -180,22 +150,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -222,12 +181,8 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ExternalTextureParams {
|
||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||
/* 0x00b0 */ float2x2 rotationMatrix;
|
||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 156
|
||||
; Bound: 140
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%29 = OpExtInstImport "GLSL.std.450"
|
||||
@@ -14,13 +14,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -30,31 +30,20 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %gammaCorrection "gammaCorrection"
|
||||
OpName %v "v"
|
||||
OpName %params "params"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
|
||||
OpName %textureLoadExternal "textureLoadExternal"
|
||||
OpName %plane0 "plane0"
|
||||
OpName %plane1 "plane1"
|
||||
OpName %coord "coord"
|
||||
OpName %params_0 "params"
|
||||
OpName %color "color"
|
||||
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||
OpName %val "val"
|
||||
OpName %textureLoad_8acf41 "textureLoad_8acf41"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
@@ -65,14 +54,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 1
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -81,30 +70,18 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
@@ -121,11 +98,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||
%bool = OpTypeBool
|
||||
@@ -134,22 +111,20 @@
|
||||
%43 = OpConstantNull %v3float
|
||||
%int = OpTypeInt 32 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
|
||||
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%82 = OpConstantNull %int
|
||||
%80 = OpConstantNull %int
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%95 = OpConstantNull %uint
|
||||
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||
%94 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%127 = OpTypeFunction %void
|
||||
%112 = OpTypeFunction %void
|
||||
%int_1 = OpConstant %int 1
|
||||
%135 = OpConstantComposite %v2int %int_1 %int_1
|
||||
%120 = OpConstantComposite %v2int %int_1 %int_1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%143 = OpTypeFunction %v4float
|
||||
%127 = OpTypeFunction %v4float
|
||||
%gammaCorrection = OpFunction %v3float None %23
|
||||
%v = OpFunctionParameter %v3float
|
||||
%params = OpFunctionParameter %GammaTransferParams
|
||||
@@ -191,102 +166,86 @@
|
||||
%plane1 = OpFunctionParameter %11
|
||||
%coord = OpFunctionParameter %v2int
|
||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||
%73 = OpLabel
|
||||
%71 = OpLabel
|
||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||
%75 = OpCompositeExtract %uint %params_0 0
|
||||
%77 = OpIEqual %bool %75 %uint_1
|
||||
OpSelectionMerge %78 None
|
||||
OpBranchConditional %77 %79 %80
|
||||
%79 = OpLabel
|
||||
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
|
||||
OpStore %color %83
|
||||
OpBranch %78
|
||||
%80 = OpLabel
|
||||
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%85 = OpCompositeExtract %float %84 0
|
||||
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
|
||||
%87 = OpVectorShuffle %v2float %86 %86 0 1
|
||||
%88 = OpCompositeExtract %float %87 0
|
||||
%89 = OpCompositeExtract %float %87 1
|
||||
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
|
||||
%92 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%93 = OpVectorTimesMatrix %v3float %91 %92
|
||||
OpStore %color %93
|
||||
OpBranch %78
|
||||
%73 = OpCompositeExtract %uint %params_0 0
|
||||
%75 = OpIEqual %bool %73 %uint_1
|
||||
OpSelectionMerge %76 None
|
||||
OpBranchConditional %75 %77 %78
|
||||
%77 = OpLabel
|
||||
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
|
||||
OpStore %color %81
|
||||
OpBranch %76
|
||||
%78 = OpLabel
|
||||
%94 = OpCompositeExtract %uint %params_0 1
|
||||
%96 = OpIEqual %bool %94 %95
|
||||
OpSelectionMerge %97 None
|
||||
OpBranchConditional %96 %98 %97
|
||||
%98 = OpLabel
|
||||
%100 = OpLoad %v3float %color
|
||||
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||
OpStore %color %99
|
||||
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%103 = OpLoad %v3float %color
|
||||
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||
OpStore %color %104
|
||||
%106 = OpLoad %v3float %color
|
||||
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||
OpStore %color %105
|
||||
OpBranch %97
|
||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%83 = OpCompositeExtract %float %82 0
|
||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
||||
%87 = OpCompositeExtract %float %86 0
|
||||
%88 = OpCompositeExtract %float %86 1
|
||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
||||
OpStore %color %92
|
||||
OpBranch %76
|
||||
%76 = OpLabel
|
||||
%93 = OpCompositeExtract %uint %params_0 1
|
||||
%95 = OpIEqual %bool %93 %94
|
||||
OpSelectionMerge %96 None
|
||||
OpBranchConditional %95 %97 %96
|
||||
%97 = OpLabel
|
||||
%108 = OpLoad %v3float %color
|
||||
%109 = OpCompositeExtract %float %108 0
|
||||
%110 = OpCompositeExtract %float %108 1
|
||||
%111 = OpCompositeExtract %float %108 2
|
||||
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
|
||||
OpReturnValue %112
|
||||
%99 = OpLoad %v3float %color
|
||||
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
|
||||
OpStore %color %98
|
||||
%101 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%102 = OpLoad %v3float %color
|
||||
%103 = OpMatrixTimesVector %v3float %101 %102
|
||||
OpStore %color %103
|
||||
%105 = OpLoad %v3float %color
|
||||
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
|
||||
OpStore %color %104
|
||||
OpBranch %96
|
||||
%96 = OpLabel
|
||||
%107 = OpLoad %v3float %color
|
||||
%108 = OpCompositeExtract %float %107 0
|
||||
%109 = OpCompositeExtract %float %107 1
|
||||
%110 = OpCompositeExtract %float %107 2
|
||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
||||
OpReturnValue %111
|
||||
OpFunctionEnd
|
||||
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
|
||||
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||
%116 = OpLabel
|
||||
%117 = OpCompositeExtract %uint %val 0
|
||||
%118 = OpCompositeExtract %uint %val 1
|
||||
%119 = OpCompositeExtract %mat3v4float %val 2
|
||||
%120 = OpCompositeExtract %GammaTransferParams %val 3
|
||||
%121 = OpCompositeExtract %GammaTransferParams %val 4
|
||||
%122 = OpCompositeExtract %mat3v3float %val 5
|
||||
%123 = OpCompositeExtract %v2float %val 6
|
||||
%124 = OpCompositeExtract %v2float %val 7
|
||||
%125 = OpCompositeConstruct %mat2v2float %123 %124
|
||||
%126 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %125
|
||||
OpReturnValue %126
|
||||
OpFunctionEnd
|
||||
%textureLoad_8acf41 = OpFunction %void None %127
|
||||
%130 = OpLabel
|
||||
%textureLoad_8acf41 = OpFunction %void None %112
|
||||
%115 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
%132 = OpLoad %11 %arg_0
|
||||
%133 = OpLoad %11 %ext_tex_plane_1
|
||||
%139 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||
%140 = OpLoad %ExternalTextureParams_std140 %139
|
||||
%136 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %140
|
||||
%131 = OpFunctionCall %v4float %textureLoadExternal %132 %133 %135 %136
|
||||
OpStore %res %131
|
||||
%117 = OpLoad %11 %arg_0
|
||||
%118 = OpLoad %11 %ext_tex_plane_1
|
||||
%123 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
||||
%124 = OpLoad %ExternalTextureParams %123
|
||||
%116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %120 %124
|
||||
OpStore %res %116
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %143
|
||||
%145 = OpLabel
|
||||
%146 = OpFunctionCall %void %textureLoad_8acf41
|
||||
%vertex_main_inner = OpFunction %v4float None %127
|
||||
%129 = OpLabel
|
||||
%130 = OpFunctionCall %void %textureLoad_8acf41
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %127
|
||||
%148 = OpLabel
|
||||
%149 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %149
|
||||
%vertex_main = OpFunction %void None %112
|
||||
%132 = OpLabel
|
||||
%133 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %133
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %127
|
||||
%151 = OpLabel
|
||||
%152 = OpFunctionCall %void %textureLoad_8acf41
|
||||
%fragment_main = OpFunction %void None %112
|
||||
%135 = OpLabel
|
||||
%136 = OpFunctionCall %void %textureLoad_8acf41
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %127
|
||||
%154 = OpLabel
|
||||
%155 = OpFunctionCall %void %textureLoad_8acf41
|
||||
%compute_main = OpFunction %void None %112
|
||||
%138 = OpLabel
|
||||
%139 = OpFunctionCall %void %textureLoad_8acf41
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b3, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
SamplerState arg_1 : register(s1, space1);
|
||||
@@ -33,7 +33,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
}
|
||||
|
||||
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
|
||||
const float2 modifiedCoords = (mul(params.rotationMatrix, (coord - 0.5f)) + 0.5f);
|
||||
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
|
||||
int3 tint_tmp;
|
||||
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||
const float2 plane0_dims = float2(tint_tmp.xy);
|
||||
@@ -58,14 +58,14 @@ float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1,
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -74,30 +74,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b3, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
SamplerState arg_1 : register(s1, space1);
|
||||
@@ -33,7 +33,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
}
|
||||
|
||||
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
|
||||
const float2 modifiedCoords = (mul(params.rotationMatrix, (coord - 0.5f)) + 0.5f);
|
||||
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
|
||||
int3 tint_tmp;
|
||||
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||
const float2 plane0_dims = float2(tint_tmp.xy);
|
||||
@@ -58,14 +58,14 @@ float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1,
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -74,30 +74,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -45,7 +34,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
|
||||
|
||||
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
|
||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||
@@ -70,12 +59,8 @@ uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
uniform highp sampler2D arg_0_arg_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_arg_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
@@ -112,22 +97,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -139,7 +113,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
|
||||
|
||||
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
|
||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||
@@ -164,12 +138,8 @@ uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
uniform highp sampler2D arg_0_arg_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_arg_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
@@ -200,22 +170,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -227,7 +186,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
|
||||
|
||||
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
|
||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||
@@ -252,12 +211,8 @@ uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
uniform highp sampler2D arg_0_arg_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_arg_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ExternalTextureParams {
|
||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||
/* 0x00b0 */ float2x2 rotationMatrix;
|
||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
@@ -44,7 +44,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
}
|
||||
|
||||
float4 textureSampleExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, sampler smp, float2 coord, ExternalTextureParams params) {
|
||||
float2 const modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
|
||||
float2 const modifiedCoords = (float3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
||||
float2 const plane0_dims = float2(uint2(plane0.get_width(0), plane0.get_height(0)));
|
||||
float2 const plane0_half_texel = (float2(0.5f) / plane0_dims);
|
||||
float2 const plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 190
|
||||
; Bound: 174
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability ImageQuery
|
||||
@@ -15,13 +15,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -31,24 +31,15 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %gammaCorrection "gammaCorrection"
|
||||
OpName %v "v"
|
||||
OpName %params "params"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
|
||||
OpName %textureSampleExternal "textureSampleExternal"
|
||||
OpName %plane0 "plane0"
|
||||
OpName %plane1 "plane1"
|
||||
@@ -56,8 +47,6 @@
|
||||
OpName %coord "coord"
|
||||
OpName %params_0 "params"
|
||||
OpName %color "color"
|
||||
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||
OpName %val "val"
|
||||
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
@@ -68,14 +57,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 2
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -84,12 +73,13 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 3
|
||||
@@ -97,19 +87,6 @@
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpDecorate %arg_1 DescriptorSet 1
|
||||
OpDecorate %arg_1 Binding 1
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
@@ -126,11 +103,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%25 = OpTypeSampler
|
||||
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
|
||||
@@ -140,28 +117,26 @@
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%46 = OpConstantNull %v3float
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
|
||||
%v2float = OpTypeVector %float 2
|
||||
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
|
||||
%float_0_5 = OpConstant %float 0.5
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%80 = OpConstantNull %v2float
|
||||
%79 = OpConstantNull %v2float
|
||||
%float_1 = OpConstant %float 1
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%int = OpTypeInt 32 1
|
||||
%91 = OpConstantNull %int
|
||||
%92 = OpConstantComposite %v2float %float_0_5 %float_0_5
|
||||
%float_1 = OpConstant %float 1
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%114 = OpTypeSampledImage %11
|
||||
%129 = OpConstantNull %uint
|
||||
%147 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||
%113 = OpTypeSampledImage %11
|
||||
%128 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%161 = OpTypeFunction %void
|
||||
%169 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%146 = OpTypeFunction %void
|
||||
%154 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%177 = OpTypeFunction %v4float
|
||||
%161 = OpTypeFunction %v4float
|
||||
%gammaCorrection = OpFunction %v3float None %26
|
||||
%v = OpFunctionParameter %v3float
|
||||
%params = OpFunctionParameter %GammaTransferParams
|
||||
@@ -204,128 +179,112 @@
|
||||
%smp = OpFunctionParameter %25
|
||||
%coord = OpFunctionParameter %v2float
|
||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||
%75 = OpLabel
|
||||
%78 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%85 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%97 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%104 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%74 = OpLabel
|
||||
%77 = OpVariable %_ptr_Function_v2float Function %79
|
||||
%96 = OpVariable %_ptr_Function_v2float Function %79
|
||||
%103 = OpVariable %_ptr_Function_v2float Function %79
|
||||
%color = OpVariable %_ptr_Function_v3float Function %46
|
||||
%81 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
||||
%77 = OpFSub %v2float %coord %81
|
||||
%82 = OpCompositeExtract %mat2v2float %params_0 6
|
||||
%83 = OpVectorTimesMatrix %v2float %77 %82
|
||||
%86 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
||||
%84 = OpFAdd %v2float %83 %86
|
||||
%80 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
||||
%76 = OpFSub %v2float %coord %80
|
||||
%81 = OpCompositeExtract %float %76 0
|
||||
%82 = OpCompositeExtract %float %76 1
|
||||
%84 = OpCompositeConstruct %v3float %81 %82 %float_1
|
||||
%85 = OpCompositeExtract %mat2v3float %params_0 6
|
||||
%86 = OpVectorTimesMatrix %v2float %84 %85
|
||||
%88 = OpImageQuerySizeLod %v2uint %plane0 %91
|
||||
%87 = OpConvertUToF %v2float %88
|
||||
%93 = OpFDiv %v2float %92 %87
|
||||
%98 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||
%96 = OpFSub %v2float %98 %93
|
||||
%94 = OpExtInst %v2float %32 NClamp %84 %93 %96
|
||||
%100 = OpImageQuerySizeLod %v2uint %plane1 %91
|
||||
%99 = OpConvertUToF %v2float %100
|
||||
%101 = OpFDiv %v2float %92 %99
|
||||
%105 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||
%103 = OpFSub %v2float %105 %101
|
||||
%102 = OpExtInst %v2float %32 NClamp %84 %101 %103
|
||||
%107 = OpCompositeExtract %uint %params_0 0
|
||||
%109 = OpIEqual %bool %107 %uint_1
|
||||
OpSelectionMerge %110 None
|
||||
OpBranchConditional %109 %111 %112
|
||||
%111 = OpLabel
|
||||
%115 = OpSampledImage %114 %plane0 %smp
|
||||
%113 = OpImageSampleExplicitLod %v4float %115 %94 Lod %8
|
||||
%116 = OpVectorShuffle %v3float %113 %113 0 1 2
|
||||
OpStore %color %116
|
||||
OpBranch %110
|
||||
%112 = OpLabel
|
||||
%118 = OpSampledImage %114 %plane0 %smp
|
||||
%117 = OpImageSampleExplicitLod %v4float %118 %94 Lod %8
|
||||
%119 = OpCompositeExtract %float %117 0
|
||||
%121 = OpSampledImage %114 %plane1 %smp
|
||||
%120 = OpImageSampleExplicitLod %v4float %121 %102 Lod %8
|
||||
%122 = OpVectorShuffle %v2float %120 %120 0 1
|
||||
%123 = OpCompositeExtract %float %122 0
|
||||
%124 = OpCompositeExtract %float %122 1
|
||||
%125 = OpCompositeConstruct %v4float %119 %123 %124 %float_1
|
||||
%126 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%127 = OpVectorTimesMatrix %v3float %125 %126
|
||||
OpStore %color %127
|
||||
OpBranch %110
|
||||
%97 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||
%95 = OpFSub %v2float %97 %93
|
||||
%94 = OpExtInst %v2float %32 NClamp %86 %93 %95
|
||||
%99 = OpImageQuerySizeLod %v2uint %plane1 %91
|
||||
%98 = OpConvertUToF %v2float %99
|
||||
%100 = OpFDiv %v2float %92 %98
|
||||
%104 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||
%102 = OpFSub %v2float %104 %100
|
||||
%101 = OpExtInst %v2float %32 NClamp %86 %100 %102
|
||||
%106 = OpCompositeExtract %uint %params_0 0
|
||||
%108 = OpIEqual %bool %106 %uint_1
|
||||
OpSelectionMerge %109 None
|
||||
OpBranchConditional %108 %110 %111
|
||||
%110 = OpLabel
|
||||
%128 = OpCompositeExtract %uint %params_0 1
|
||||
%130 = OpIEqual %bool %128 %129
|
||||
OpSelectionMerge %131 None
|
||||
OpBranchConditional %130 %132 %131
|
||||
%132 = OpLabel
|
||||
%134 = OpLoad %v3float %color
|
||||
%135 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%133 = OpFunctionCall %v3float %gammaCorrection %134 %135
|
||||
OpStore %color %133
|
||||
%136 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%137 = OpLoad %v3float %color
|
||||
%138 = OpMatrixTimesVector %v3float %136 %137
|
||||
OpStore %color %138
|
||||
%140 = OpLoad %v3float %color
|
||||
%141 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%139 = OpFunctionCall %v3float %gammaCorrection %140 %141
|
||||
OpStore %color %139
|
||||
OpBranch %131
|
||||
%114 = OpSampledImage %113 %plane0 %smp
|
||||
%112 = OpImageSampleExplicitLod %v4float %114 %94 Lod %8
|
||||
%115 = OpVectorShuffle %v3float %112 %112 0 1 2
|
||||
OpStore %color %115
|
||||
OpBranch %109
|
||||
%111 = OpLabel
|
||||
%117 = OpSampledImage %113 %plane0 %smp
|
||||
%116 = OpImageSampleExplicitLod %v4float %117 %94 Lod %8
|
||||
%118 = OpCompositeExtract %float %116 0
|
||||
%120 = OpSampledImage %113 %plane1 %smp
|
||||
%119 = OpImageSampleExplicitLod %v4float %120 %101 Lod %8
|
||||
%121 = OpVectorShuffle %v2float %119 %119 0 1
|
||||
%122 = OpCompositeExtract %float %121 0
|
||||
%123 = OpCompositeExtract %float %121 1
|
||||
%124 = OpCompositeConstruct %v4float %118 %122 %123 %float_1
|
||||
%125 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%126 = OpVectorTimesMatrix %v3float %124 %125
|
||||
OpStore %color %126
|
||||
OpBranch %109
|
||||
%109 = OpLabel
|
||||
%127 = OpCompositeExtract %uint %params_0 1
|
||||
%129 = OpIEqual %bool %127 %128
|
||||
OpSelectionMerge %130 None
|
||||
OpBranchConditional %129 %131 %130
|
||||
%131 = OpLabel
|
||||
%142 = OpLoad %v3float %color
|
||||
%143 = OpCompositeExtract %float %142 0
|
||||
%144 = OpCompositeExtract %float %142 1
|
||||
%145 = OpCompositeExtract %float %142 2
|
||||
%146 = OpCompositeConstruct %v4float %143 %144 %145 %float_1
|
||||
OpReturnValue %146
|
||||
%133 = OpLoad %v3float %color
|
||||
%134 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%132 = OpFunctionCall %v3float %gammaCorrection %133 %134
|
||||
OpStore %color %132
|
||||
%135 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%136 = OpLoad %v3float %color
|
||||
%137 = OpMatrixTimesVector %v3float %135 %136
|
||||
OpStore %color %137
|
||||
%139 = OpLoad %v3float %color
|
||||
%140 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%138 = OpFunctionCall %v3float %gammaCorrection %139 %140
|
||||
OpStore %color %138
|
||||
OpBranch %130
|
||||
%130 = OpLabel
|
||||
%141 = OpLoad %v3float %color
|
||||
%142 = OpCompositeExtract %float %141 0
|
||||
%143 = OpCompositeExtract %float %141 1
|
||||
%144 = OpCompositeExtract %float %141 2
|
||||
%145 = OpCompositeConstruct %v4float %142 %143 %144 %float_1
|
||||
OpReturnValue %145
|
||||
OpFunctionEnd
|
||||
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %147
|
||||
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||
%150 = OpLabel
|
||||
%151 = OpCompositeExtract %uint %val 0
|
||||
%152 = OpCompositeExtract %uint %val 1
|
||||
%153 = OpCompositeExtract %mat3v4float %val 2
|
||||
%154 = OpCompositeExtract %GammaTransferParams %val 3
|
||||
%155 = OpCompositeExtract %GammaTransferParams %val 4
|
||||
%156 = OpCompositeExtract %mat3v3float %val 5
|
||||
%157 = OpCompositeExtract %v2float %val 6
|
||||
%158 = OpCompositeExtract %v2float %val 7
|
||||
%159 = OpCompositeConstruct %mat2v2float %157 %158
|
||||
%160 = OpCompositeConstruct %ExternalTextureParams %151 %152 %153 %154 %155 %156 %159
|
||||
OpReturnValue %160
|
||||
OpFunctionEnd
|
||||
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %161
|
||||
%164 = OpLabel
|
||||
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %146
|
||||
%149 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
%166 = OpLoad %11 %arg_0
|
||||
%167 = OpLoad %11 %ext_tex_plane_1
|
||||
%168 = OpLoad %25 %arg_1
|
||||
%173 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||
%174 = OpLoad %ExternalTextureParams_std140 %173
|
||||
%170 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %174
|
||||
%165 = OpFunctionCall %v4float %textureSampleExternal %166 %167 %168 %169 %170
|
||||
OpStore %res %165
|
||||
%151 = OpLoad %11 %arg_0
|
||||
%152 = OpLoad %11 %ext_tex_plane_1
|
||||
%153 = OpLoad %25 %arg_1
|
||||
%157 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
||||
%158 = OpLoad %ExternalTextureParams %157
|
||||
%150 = OpFunctionCall %v4float %textureSampleExternal %151 %152 %153 %154 %158
|
||||
OpStore %res %150
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %177
|
||||
%179 = OpLabel
|
||||
%180 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
%vertex_main_inner = OpFunction %v4float None %161
|
||||
%163 = OpLabel
|
||||
%164 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %161
|
||||
%182 = OpLabel
|
||||
%183 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %183
|
||||
%vertex_main = OpFunction %void None %146
|
||||
%166 = OpLabel
|
||||
%167 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %167
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %161
|
||||
%185 = OpLabel
|
||||
%186 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
%fragment_main = OpFunction %void None %146
|
||||
%169 = OpLabel
|
||||
%170 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %161
|
||||
%188 = OpLabel
|
||||
%189 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
%compute_main = OpFunction %void None %146
|
||||
%172 = OpLabel
|
||||
%173 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
30
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.dxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_275cac() {
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_275cac();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_275cac();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_275cac();
|
||||
return;
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.fxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_275cac() {
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_275cac();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_275cac();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_275cac();
|
||||
return;
|
||||
}
|
||||
49
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.glsl
Normal file
49
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.glsl
Normal file
@@ -0,0 +1,49 @@
|
||||
#version 310 es
|
||||
|
||||
void mix_275cac() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
mix_275cac();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void mix_275cac() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_275cac();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void mix_275cac() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
mix_275cac();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
||||
33
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.msl
Normal file
33
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.msl
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void mix_275cac() {
|
||||
float4 res = float4(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_275cac();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
mix_275cac();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
mix_275cac();
|
||||
return;
|
||||
}
|
||||
|
||||
64
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.spvasm
Normal file
64
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,64 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 30
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %mix_275cac "mix_275cac"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%17 = OpTypeFunction %v4float
|
||||
%mix_275cac = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
OpStore %res %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %17
|
||||
%19 = OpLabel
|
||||
%20 = OpFunctionCall %void %mix_275cac
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %23
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %void %mix_275cac
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
%29 = OpFunctionCall %void %mix_275cac
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
22
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.wgsl
Normal file
22
test/tint/builtins/gen/var/mix/275cac.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,22 @@
|
||||
fn mix_275cac() {
|
||||
const arg_0 = vec4(1.0);
|
||||
const arg_1 = vec4(1.0);
|
||||
const arg_2 = 1.0;
|
||||
var res = mix(arg_0, arg_1, arg_2);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
mix_275cac();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
mix_275cac();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
mix_275cac();
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.dxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_30de36() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_30de36();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_30de36();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_30de36();
|
||||
return;
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.fxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_30de36() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_30de36();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_30de36();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_30de36();
|
||||
return;
|
||||
}
|
||||
49
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.glsl
Normal file
49
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.glsl
Normal file
@@ -0,0 +1,49 @@
|
||||
#version 310 es
|
||||
|
||||
void mix_30de36() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
mix_30de36();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void mix_30de36() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_30de36();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void mix_30de36() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
mix_30de36();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
||||
33
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.msl
Normal file
33
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.msl
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void mix_30de36() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_30de36();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
mix_30de36();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
mix_30de36();
|
||||
return;
|
||||
}
|
||||
|
||||
63
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.spvasm
Normal file
63
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,63 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %mix_30de36 "mix_30de36"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%16 = OpTypeFunction %v4float
|
||||
%mix_30de36 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %8
|
||||
OpStore %res %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %16
|
||||
%18 = OpLabel
|
||||
%19 = OpFunctionCall %void %mix_30de36
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %22
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %mix_30de36
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %mix_30de36
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
22
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.wgsl
Normal file
22
test/tint/builtins/gen/var/mix/30de36.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,22 @@
|
||||
fn mix_30de36() {
|
||||
const arg_0 = 1.0;
|
||||
const arg_1 = 1.0;
|
||||
const arg_2 = 1.0;
|
||||
var res = mix(arg_0, arg_1, arg_2);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
mix_30de36();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
mix_30de36();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
mix_30de36();
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.dxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_343c49() {
|
||||
float3 res = (1.0f).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_343c49();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_343c49();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_343c49();
|
||||
return;
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.fxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_343c49() {
|
||||
float3 res = (1.0f).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_343c49();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_343c49();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_343c49();
|
||||
return;
|
||||
}
|
||||
49
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.glsl
Normal file
49
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.glsl
Normal file
@@ -0,0 +1,49 @@
|
||||
#version 310 es
|
||||
|
||||
void mix_343c49() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
mix_343c49();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void mix_343c49() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_343c49();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void mix_343c49() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
mix_343c49();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
||||
33
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.msl
Normal file
33
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.msl
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void mix_343c49() {
|
||||
float3 res = float3(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_343c49();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
mix_343c49();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
mix_343c49();
|
||||
return;
|
||||
}
|
||||
|
||||
66
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.spvasm
Normal file
66
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,66 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %mix_343c49 "mix_343c49"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_1 = OpConstant %float 1
|
||||
%15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%18 = OpConstantNull %v3float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%mix_343c49 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %18
|
||||
OpStore %res %15
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %mix_343c49
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %mix_343c49
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %mix_343c49
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
22
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.wgsl
Normal file
22
test/tint/builtins/gen/var/mix/343c49.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,22 @@
|
||||
fn mix_343c49() {
|
||||
const arg_0 = vec3(1.0);
|
||||
const arg_1 = vec3(1.0);
|
||||
const arg_2 = vec3(1.0);
|
||||
var res = mix(arg_0, arg_1, arg_2);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
mix_343c49();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
mix_343c49();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
mix_343c49();
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.dxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_42d11d() {
|
||||
float2 res = (1.0f).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_42d11d();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_42d11d();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_42d11d();
|
||||
return;
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.fxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_42d11d() {
|
||||
float2 res = (1.0f).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_42d11d();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_42d11d();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_42d11d();
|
||||
return;
|
||||
}
|
||||
49
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.glsl
Normal file
49
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.glsl
Normal file
@@ -0,0 +1,49 @@
|
||||
#version 310 es
|
||||
|
||||
void mix_42d11d() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
mix_42d11d();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void mix_42d11d() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_42d11d();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void mix_42d11d() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
mix_42d11d();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
||||
33
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.msl
Normal file
33
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.msl
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void mix_42d11d() {
|
||||
float2 res = float2(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_42d11d();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
mix_42d11d();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
mix_42d11d();
|
||||
return;
|
||||
}
|
||||
|
||||
66
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.spvasm
Normal file
66
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,66 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %mix_42d11d "mix_42d11d"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%15 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%18 = OpConstantNull %v2float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%mix_42d11d = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2float Function %18
|
||||
OpStore %res %15
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %mix_42d11d
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %mix_42d11d
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %mix_42d11d
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
22
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.wgsl
Normal file
22
test/tint/builtins/gen/var/mix/42d11d.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,22 @@
|
||||
fn mix_42d11d() {
|
||||
const arg_0 = vec2(1.0);
|
||||
const arg_1 = vec2(1.0);
|
||||
const arg_2 = 1.0;
|
||||
var res = mix(arg_0, arg_1, arg_2);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
mix_42d11d();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
mix_42d11d();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
mix_42d11d();
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.dxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_98007a() {
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_98007a();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_98007a();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_98007a();
|
||||
return;
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.fxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_98007a() {
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_98007a();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_98007a();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_98007a();
|
||||
return;
|
||||
}
|
||||
49
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.glsl
Normal file
49
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.glsl
Normal file
@@ -0,0 +1,49 @@
|
||||
#version 310 es
|
||||
|
||||
void mix_98007a() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
mix_98007a();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void mix_98007a() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_98007a();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void mix_98007a() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
mix_98007a();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
||||
33
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.msl
Normal file
33
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.msl
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void mix_98007a() {
|
||||
float4 res = float4(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_98007a();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
mix_98007a();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
mix_98007a();
|
||||
return;
|
||||
}
|
||||
|
||||
64
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.spvasm
Normal file
64
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,64 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 30
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %mix_98007a "mix_98007a"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%17 = OpTypeFunction %v4float
|
||||
%mix_98007a = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
OpStore %res %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %17
|
||||
%19 = OpLabel
|
||||
%20 = OpFunctionCall %void %mix_98007a
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %23
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %void %mix_98007a
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
%29 = OpFunctionCall %void %mix_98007a
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
22
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.wgsl
Normal file
22
test/tint/builtins/gen/var/mix/98007a.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,22 @@
|
||||
fn mix_98007a() {
|
||||
const arg_0 = vec4(1.0);
|
||||
const arg_1 = vec4(1.0);
|
||||
const arg_2 = vec4(1.0);
|
||||
var res = mix(arg_0, arg_1, arg_2);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
mix_98007a();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
mix_98007a();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
mix_98007a();
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.dxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_9c2681() {
|
||||
float3 res = (1.0f).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_9c2681();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_9c2681();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_9c2681();
|
||||
return;
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.fxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_9c2681() {
|
||||
float3 res = (1.0f).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_9c2681();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_9c2681();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_9c2681();
|
||||
return;
|
||||
}
|
||||
49
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.glsl
Normal file
49
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.glsl
Normal file
@@ -0,0 +1,49 @@
|
||||
#version 310 es
|
||||
|
||||
void mix_9c2681() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
mix_9c2681();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void mix_9c2681() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_9c2681();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void mix_9c2681() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
mix_9c2681();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
||||
33
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.msl
Normal file
33
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.msl
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void mix_9c2681() {
|
||||
float3 res = float3(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_9c2681();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
mix_9c2681();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
mix_9c2681();
|
||||
return;
|
||||
}
|
||||
|
||||
66
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.spvasm
Normal file
66
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,66 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %mix_9c2681 "mix_9c2681"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_1 = OpConstant %float 1
|
||||
%15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%18 = OpConstantNull %v3float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%mix_9c2681 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %18
|
||||
OpStore %res %15
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %mix_9c2681
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %mix_9c2681
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %mix_9c2681
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
22
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.wgsl
Normal file
22
test/tint/builtins/gen/var/mix/9c2681.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,22 @@
|
||||
fn mix_9c2681() {
|
||||
const arg_0 = vec3(1.0);
|
||||
const arg_1 = vec3(1.0);
|
||||
const arg_2 = 1.0;
|
||||
var res = mix(arg_0, arg_1, arg_2);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
mix_9c2681();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
mix_9c2681();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
mix_9c2681();
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.dxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.dxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_ef3575() {
|
||||
float2 res = (1.0f).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_ef3575();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_ef3575();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_ef3575();
|
||||
return;
|
||||
}
|
||||
30
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.fxc.hlsl
Normal file
30
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.fxc.hlsl
Normal file
@@ -0,0 +1,30 @@
|
||||
void mix_ef3575() {
|
||||
float2 res = (1.0f).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_ef3575();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_ef3575();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
mix_ef3575();
|
||||
return;
|
||||
}
|
||||
49
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.glsl
Normal file
49
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.glsl
Normal file
@@ -0,0 +1,49 @@
|
||||
#version 310 es
|
||||
|
||||
void mix_ef3575() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
mix_ef3575();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void mix_ef3575() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
mix_ef3575();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void mix_ef3575() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
mix_ef3575();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
||||
33
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.msl
Normal file
33
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.msl
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void mix_ef3575() {
|
||||
float2 res = float2(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
mix_ef3575();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
mix_ef3575();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
mix_ef3575();
|
||||
return;
|
||||
}
|
||||
|
||||
66
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.spvasm
Normal file
66
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.spvasm
Normal file
@@ -0,0 +1,66 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %mix_ef3575 "mix_ef3575"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%15 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%18 = OpConstantNull %v2float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%mix_ef3575 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2float Function %18
|
||||
OpStore %res %15
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %mix_ef3575
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %mix_ef3575
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %mix_ef3575
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
22
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.wgsl
Normal file
22
test/tint/builtins/gen/var/mix/ef3575.wgsl.expected.wgsl
Normal file
@@ -0,0 +1,22 @@
|
||||
fn mix_ef3575() {
|
||||
const arg_0 = vec2(1.0);
|
||||
const arg_1 = vec2(1.0);
|
||||
const arg_2 = vec2(1.0);
|
||||
var res = mix(arg_0, arg_1, arg_2);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
mix_ef3575();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
mix_ef3575();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
mix_ef3575();
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
@@ -75,22 +64,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
@@ -126,22 +104,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
|
||||
@@ -19,7 +19,7 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -30,10 +30,9 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
|
||||
@@ -46,14 +45,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 1
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -62,12 +61,13 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
@@ -89,11 +89,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%void = OpTypeVoid
|
||||
%23 = OpTypeFunction %void
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, u
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, u
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -60,13 +49,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
uvec2 arg_1 = uvec2(1u);
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
@@ -103,22 +88,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -145,13 +119,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
uvec2 arg_1 = uvec2(1u);
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
@@ -182,22 +152,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -224,13 +183,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_1bfdfb() {
|
||||
uvec2 arg_1 = uvec2(1u);
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ExternalTextureParams {
|
||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||
/* 0x00b0 */ float2x2 rotationMatrix;
|
||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 159
|
||||
; Bound: 143
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%29 = OpExtInstImport "GLSL.std.450"
|
||||
@@ -14,13 +14,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -30,31 +30,20 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %gammaCorrection "gammaCorrection"
|
||||
OpName %v "v"
|
||||
OpName %params "params"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
|
||||
OpName %textureLoadExternal "textureLoadExternal"
|
||||
OpName %plane0 "plane0"
|
||||
OpName %plane1 "plane1"
|
||||
OpName %coord "coord"
|
||||
OpName %params_0 "params"
|
||||
OpName %color "color"
|
||||
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||
OpName %val "val"
|
||||
OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
@@ -66,14 +55,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 1
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -82,30 +71,18 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
@@ -122,11 +99,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||
%bool = OpTypeBool
|
||||
@@ -134,24 +111,22 @@
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%43 = OpConstantNull %v3float
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
|
||||
%63 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%int = OpTypeInt 32 1
|
||||
%82 = OpConstantNull %int
|
||||
%80 = OpConstantNull %int
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%95 = OpConstantNull %uint
|
||||
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||
%94 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%127 = OpTypeFunction %void
|
||||
%131 = OpConstantComposite %v2uint %uint_1 %uint_1
|
||||
%112 = OpTypeFunction %void
|
||||
%116 = OpConstantComposite %v2uint %uint_1 %uint_1
|
||||
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
|
||||
%134 = OpConstantNull %v2uint
|
||||
%119 = OpConstantNull %v2uint
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%146 = OpTypeFunction %v4float
|
||||
%130 = OpTypeFunction %v4float
|
||||
%gammaCorrection = OpFunction %v3float None %23
|
||||
%v = OpFunctionParameter %v3float
|
||||
%params = OpFunctionParameter %GammaTransferParams
|
||||
@@ -193,105 +168,89 @@
|
||||
%plane1 = OpFunctionParameter %11
|
||||
%coord = OpFunctionParameter %v2uint
|
||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||
%72 = OpLabel
|
||||
%70 = OpLabel
|
||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||
%74 = OpCompositeExtract %uint %params_0 0
|
||||
%76 = OpIEqual %bool %74 %uint_1
|
||||
OpSelectionMerge %77 None
|
||||
OpBranchConditional %76 %78 %79
|
||||
%78 = OpLabel
|
||||
%80 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%83 = OpVectorShuffle %v3float %80 %80 0 1 2
|
||||
OpStore %color %83
|
||||
OpBranch %77
|
||||
%79 = OpLabel
|
||||
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%85 = OpCompositeExtract %float %84 0
|
||||
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
|
||||
%87 = OpVectorShuffle %v2float %86 %86 0 1
|
||||
%88 = OpCompositeExtract %float %87 0
|
||||
%89 = OpCompositeExtract %float %87 1
|
||||
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
|
||||
%92 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%93 = OpVectorTimesMatrix %v3float %91 %92
|
||||
OpStore %color %93
|
||||
OpBranch %77
|
||||
%72 = OpCompositeExtract %uint %params_0 0
|
||||
%74 = OpIEqual %bool %72 %uint_1
|
||||
OpSelectionMerge %75 None
|
||||
OpBranchConditional %74 %76 %77
|
||||
%76 = OpLabel
|
||||
%78 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%81 = OpVectorShuffle %v3float %78 %78 0 1 2
|
||||
OpStore %color %81
|
||||
OpBranch %75
|
||||
%77 = OpLabel
|
||||
%94 = OpCompositeExtract %uint %params_0 1
|
||||
%96 = OpIEqual %bool %94 %95
|
||||
OpSelectionMerge %97 None
|
||||
OpBranchConditional %96 %98 %97
|
||||
%98 = OpLabel
|
||||
%100 = OpLoad %v3float %color
|
||||
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||
OpStore %color %99
|
||||
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%103 = OpLoad %v3float %color
|
||||
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||
OpStore %color %104
|
||||
%106 = OpLoad %v3float %color
|
||||
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||
OpStore %color %105
|
||||
OpBranch %97
|
||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%83 = OpCompositeExtract %float %82 0
|
||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
||||
%87 = OpCompositeExtract %float %86 0
|
||||
%88 = OpCompositeExtract %float %86 1
|
||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
||||
OpStore %color %92
|
||||
OpBranch %75
|
||||
%75 = OpLabel
|
||||
%93 = OpCompositeExtract %uint %params_0 1
|
||||
%95 = OpIEqual %bool %93 %94
|
||||
OpSelectionMerge %96 None
|
||||
OpBranchConditional %95 %97 %96
|
||||
%97 = OpLabel
|
||||
%108 = OpLoad %v3float %color
|
||||
%109 = OpCompositeExtract %float %108 0
|
||||
%110 = OpCompositeExtract %float %108 1
|
||||
%111 = OpCompositeExtract %float %108 2
|
||||
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
|
||||
OpReturnValue %112
|
||||
%99 = OpLoad %v3float %color
|
||||
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
|
||||
OpStore %color %98
|
||||
%101 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%102 = OpLoad %v3float %color
|
||||
%103 = OpMatrixTimesVector %v3float %101 %102
|
||||
OpStore %color %103
|
||||
%105 = OpLoad %v3float %color
|
||||
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
|
||||
OpStore %color %104
|
||||
OpBranch %96
|
||||
%96 = OpLabel
|
||||
%107 = OpLoad %v3float %color
|
||||
%108 = OpCompositeExtract %float %107 0
|
||||
%109 = OpCompositeExtract %float %107 1
|
||||
%110 = OpCompositeExtract %float %107 2
|
||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
||||
OpReturnValue %111
|
||||
OpFunctionEnd
|
||||
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
|
||||
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||
%116 = OpLabel
|
||||
%117 = OpCompositeExtract %uint %val 0
|
||||
%118 = OpCompositeExtract %uint %val 1
|
||||
%119 = OpCompositeExtract %mat3v4float %val 2
|
||||
%120 = OpCompositeExtract %GammaTransferParams %val 3
|
||||
%121 = OpCompositeExtract %GammaTransferParams %val 4
|
||||
%122 = OpCompositeExtract %mat3v3float %val 5
|
||||
%123 = OpCompositeExtract %v2float %val 6
|
||||
%124 = OpCompositeExtract %v2float %val 7
|
||||
%125 = OpCompositeConstruct %mat2v2float %123 %124
|
||||
%126 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %125
|
||||
OpReturnValue %126
|
||||
OpFunctionEnd
|
||||
%textureLoad_1bfdfb = OpFunction %void None %127
|
||||
%130 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v2uint Function %134
|
||||
%textureLoad_1bfdfb = OpFunction %void None %112
|
||||
%115 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v2uint Function %119
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
OpStore %arg_1 %131
|
||||
%136 = OpLoad %11 %arg_0
|
||||
%137 = OpLoad %11 %ext_tex_plane_1
|
||||
%138 = OpLoad %v2uint %arg_1
|
||||
%142 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||
%143 = OpLoad %ExternalTextureParams_std140 %142
|
||||
%139 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %143
|
||||
%135 = OpFunctionCall %v4float %textureLoadExternal %136 %137 %138 %139
|
||||
OpStore %res %135
|
||||
OpStore %arg_1 %116
|
||||
%121 = OpLoad %11 %arg_0
|
||||
%122 = OpLoad %11 %ext_tex_plane_1
|
||||
%123 = OpLoad %v2uint %arg_1
|
||||
%126 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
||||
%127 = OpLoad %ExternalTextureParams %126
|
||||
%120 = OpFunctionCall %v4float %textureLoadExternal %121 %122 %123 %127
|
||||
OpStore %res %120
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %146
|
||||
%148 = OpLabel
|
||||
%149 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
%vertex_main_inner = OpFunction %v4float None %130
|
||||
%132 = OpLabel
|
||||
%133 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %127
|
||||
%151 = OpLabel
|
||||
%152 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %152
|
||||
%vertex_main = OpFunction %void None %112
|
||||
%135 = OpLabel
|
||||
%136 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %136
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %127
|
||||
%154 = OpLabel
|
||||
%155 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
%fragment_main = OpFunction %void None %112
|
||||
%138 = OpLabel
|
||||
%139 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %127
|
||||
%157 = OpLabel
|
||||
%158 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
%compute_main = OpFunction %void None %112
|
||||
%141 = OpLabel
|
||||
%142 = OpFunctionCall %void %textureLoad_1bfdfb
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -46,14 +46,14 @@ float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, i
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -62,30 +62,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -60,13 +49,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
ivec2 arg_1 = ivec2(1);
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
@@ -103,22 +88,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -145,13 +119,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
ivec2 arg_1 = ivec2(1);
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
@@ -182,22 +152,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -224,13 +183,9 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureLoad_8acf41() {
|
||||
ivec2 arg_1 = ivec2(1);
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ExternalTextureParams {
|
||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||
/* 0x00b0 */ float2x2 rotationMatrix;
|
||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 160
|
||||
; Bound: 144
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%29 = OpExtInstImport "GLSL.std.450"
|
||||
@@ -14,13 +14,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -30,31 +30,20 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %gammaCorrection "gammaCorrection"
|
||||
OpName %v "v"
|
||||
OpName %params "params"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
|
||||
OpName %textureLoadExternal "textureLoadExternal"
|
||||
OpName %plane0 "plane0"
|
||||
OpName %plane1 "plane1"
|
||||
OpName %coord "coord"
|
||||
OpName %params_0 "params"
|
||||
OpName %color "color"
|
||||
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||
OpName %val "val"
|
||||
OpName %textureLoad_8acf41 "textureLoad_8acf41"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
@@ -66,14 +55,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 1
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -82,30 +71,18 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
@@ -122,11 +99,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||
%bool = OpTypeBool
|
||||
@@ -135,24 +112,22 @@
|
||||
%43 = OpConstantNull %v3float
|
||||
%int = OpTypeInt 32 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
|
||||
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%82 = OpConstantNull %int
|
||||
%80 = OpConstantNull %int
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%95 = OpConstantNull %uint
|
||||
%113 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||
%94 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%127 = OpTypeFunction %void
|
||||
%112 = OpTypeFunction %void
|
||||
%int_1 = OpConstant %int 1
|
||||
%132 = OpConstantComposite %v2int %int_1 %int_1
|
||||
%117 = OpConstantComposite %v2int %int_1 %int_1
|
||||
%_ptr_Function_v2int = OpTypePointer Function %v2int
|
||||
%135 = OpConstantNull %v2int
|
||||
%120 = OpConstantNull %v2int
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%147 = OpTypeFunction %v4float
|
||||
%131 = OpTypeFunction %v4float
|
||||
%gammaCorrection = OpFunction %v3float None %23
|
||||
%v = OpFunctionParameter %v3float
|
||||
%params = OpFunctionParameter %GammaTransferParams
|
||||
@@ -194,105 +169,89 @@
|
||||
%plane1 = OpFunctionParameter %11
|
||||
%coord = OpFunctionParameter %v2int
|
||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||
%73 = OpLabel
|
||||
%71 = OpLabel
|
||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||
%75 = OpCompositeExtract %uint %params_0 0
|
||||
%77 = OpIEqual %bool %75 %uint_1
|
||||
OpSelectionMerge %78 None
|
||||
OpBranchConditional %77 %79 %80
|
||||
%79 = OpLabel
|
||||
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
|
||||
OpStore %color %83
|
||||
OpBranch %78
|
||||
%80 = OpLabel
|
||||
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%85 = OpCompositeExtract %float %84 0
|
||||
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
|
||||
%87 = OpVectorShuffle %v2float %86 %86 0 1
|
||||
%88 = OpCompositeExtract %float %87 0
|
||||
%89 = OpCompositeExtract %float %87 1
|
||||
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
|
||||
%92 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%93 = OpVectorTimesMatrix %v3float %91 %92
|
||||
OpStore %color %93
|
||||
OpBranch %78
|
||||
%73 = OpCompositeExtract %uint %params_0 0
|
||||
%75 = OpIEqual %bool %73 %uint_1
|
||||
OpSelectionMerge %76 None
|
||||
OpBranchConditional %75 %77 %78
|
||||
%77 = OpLabel
|
||||
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
|
||||
OpStore %color %81
|
||||
OpBranch %76
|
||||
%78 = OpLabel
|
||||
%94 = OpCompositeExtract %uint %params_0 1
|
||||
%96 = OpIEqual %bool %94 %95
|
||||
OpSelectionMerge %97 None
|
||||
OpBranchConditional %96 %98 %97
|
||||
%98 = OpLabel
|
||||
%100 = OpLoad %v3float %color
|
||||
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||
OpStore %color %99
|
||||
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%103 = OpLoad %v3float %color
|
||||
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||
OpStore %color %104
|
||||
%106 = OpLoad %v3float %color
|
||||
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||
OpStore %color %105
|
||||
OpBranch %97
|
||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%83 = OpCompositeExtract %float %82 0
|
||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
||||
%87 = OpCompositeExtract %float %86 0
|
||||
%88 = OpCompositeExtract %float %86 1
|
||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
||||
OpStore %color %92
|
||||
OpBranch %76
|
||||
%76 = OpLabel
|
||||
%93 = OpCompositeExtract %uint %params_0 1
|
||||
%95 = OpIEqual %bool %93 %94
|
||||
OpSelectionMerge %96 None
|
||||
OpBranchConditional %95 %97 %96
|
||||
%97 = OpLabel
|
||||
%108 = OpLoad %v3float %color
|
||||
%109 = OpCompositeExtract %float %108 0
|
||||
%110 = OpCompositeExtract %float %108 1
|
||||
%111 = OpCompositeExtract %float %108 2
|
||||
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
|
||||
OpReturnValue %112
|
||||
%99 = OpLoad %v3float %color
|
||||
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
|
||||
OpStore %color %98
|
||||
%101 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%102 = OpLoad %v3float %color
|
||||
%103 = OpMatrixTimesVector %v3float %101 %102
|
||||
OpStore %color %103
|
||||
%105 = OpLoad %v3float %color
|
||||
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
|
||||
OpStore %color %104
|
||||
OpBranch %96
|
||||
%96 = OpLabel
|
||||
%107 = OpLoad %v3float %color
|
||||
%108 = OpCompositeExtract %float %107 0
|
||||
%109 = OpCompositeExtract %float %107 1
|
||||
%110 = OpCompositeExtract %float %107 2
|
||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
||||
OpReturnValue %111
|
||||
OpFunctionEnd
|
||||
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %113
|
||||
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||
%116 = OpLabel
|
||||
%117 = OpCompositeExtract %uint %val 0
|
||||
%118 = OpCompositeExtract %uint %val 1
|
||||
%119 = OpCompositeExtract %mat3v4float %val 2
|
||||
%120 = OpCompositeExtract %GammaTransferParams %val 3
|
||||
%121 = OpCompositeExtract %GammaTransferParams %val 4
|
||||
%122 = OpCompositeExtract %mat3v3float %val 5
|
||||
%123 = OpCompositeExtract %v2float %val 6
|
||||
%124 = OpCompositeExtract %v2float %val 7
|
||||
%125 = OpCompositeConstruct %mat2v2float %123 %124
|
||||
%126 = OpCompositeConstruct %ExternalTextureParams %117 %118 %119 %120 %121 %122 %125
|
||||
OpReturnValue %126
|
||||
OpFunctionEnd
|
||||
%textureLoad_8acf41 = OpFunction %void None %127
|
||||
%130 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v2int Function %135
|
||||
%textureLoad_8acf41 = OpFunction %void None %112
|
||||
%115 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v2int Function %120
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
OpStore %arg_1 %132
|
||||
%137 = OpLoad %11 %arg_0
|
||||
%138 = OpLoad %11 %ext_tex_plane_1
|
||||
%139 = OpLoad %v2int %arg_1
|
||||
%143 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||
%144 = OpLoad %ExternalTextureParams_std140 %143
|
||||
%140 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %144
|
||||
%136 = OpFunctionCall %v4float %textureLoadExternal %137 %138 %139 %140
|
||||
OpStore %res %136
|
||||
OpStore %arg_1 %117
|
||||
%122 = OpLoad %11 %arg_0
|
||||
%123 = OpLoad %11 %ext_tex_plane_1
|
||||
%124 = OpLoad %v2int %arg_1
|
||||
%127 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
||||
%128 = OpLoad %ExternalTextureParams %127
|
||||
%121 = OpFunctionCall %v4float %textureLoadExternal %122 %123 %124 %128
|
||||
OpStore %res %121
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %147
|
||||
%149 = OpLabel
|
||||
%150 = OpFunctionCall %void %textureLoad_8acf41
|
||||
%vertex_main_inner = OpFunction %v4float None %131
|
||||
%133 = OpLabel
|
||||
%134 = OpFunctionCall %void %textureLoad_8acf41
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %127
|
||||
%152 = OpLabel
|
||||
%153 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %153
|
||||
%vertex_main = OpFunction %void None %112
|
||||
%136 = OpLabel
|
||||
%137 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %137
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %127
|
||||
%155 = OpLabel
|
||||
%156 = OpFunctionCall %void %textureLoad_8acf41
|
||||
%fragment_main = OpFunction %void None %112
|
||||
%139 = OpLabel
|
||||
%140 = OpFunctionCall %void %textureLoad_8acf41
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %127
|
||||
%158 = OpLabel
|
||||
%159 = OpFunctionCall %void %textureLoad_8acf41
|
||||
%compute_main = OpFunction %void None %112
|
||||
%142 = OpLabel
|
||||
%143 = OpFunctionCall %void %textureLoad_8acf41
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b3, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
SamplerState arg_1 : register(s1, space1);
|
||||
@@ -33,7 +33,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
}
|
||||
|
||||
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
|
||||
const float2 modifiedCoords = (mul(params.rotationMatrix, (coord - 0.5f)) + 0.5f);
|
||||
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
|
||||
int3 tint_tmp;
|
||||
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||
const float2 plane0_dims = float2(tint_tmp.xy);
|
||||
@@ -58,14 +58,14 @@ float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1,
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -74,30 +74,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t2, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b3, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
SamplerState arg_1 : register(s1, space1);
|
||||
@@ -33,7 +33,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
}
|
||||
|
||||
float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, SamplerState smp, float2 coord, ExternalTextureParams params) {
|
||||
const float2 modifiedCoords = (mul(params.rotationMatrix, (coord - 0.5f)) + 0.5f);
|
||||
const float2 modifiedCoords = mul(params.coordTransformationMatrix, float3((coord - 0.5f), 1.0f));
|
||||
int3 tint_tmp;
|
||||
plane0.GetDimensions(0, tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||
const float2 plane0_dims = float2(tint_tmp.xy);
|
||||
@@ -58,14 +58,14 @@ float4 textureSampleExternal(Texture2D<float4> plane0, Texture2D<float4> plane1,
|
||||
return float4(color, 1.0f);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_3(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_3(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_5(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -74,30 +74,28 @@ GammaTransferParams tint_symbol_5(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
const GammaTransferParams tint_symbol_10 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_10;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_7(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_7(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_9(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_9(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_1(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
const ExternalTextureParams tint_symbol_11 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u)), tint_symbol_9(buffer, (offset + 176u))};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -45,7 +34,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
|
||||
|
||||
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
|
||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||
@@ -70,13 +59,9 @@ uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
uniform highp sampler2D arg_0_arg_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_arg_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
vec2 arg_2 = vec2(1.0f);
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
@@ -113,22 +98,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -140,7 +114,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
|
||||
|
||||
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
|
||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||
@@ -165,13 +139,9 @@ uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
uniform highp sampler2D arg_0_arg_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_arg_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
vec2 arg_2 = vec2(1.0f);
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
@@ -202,22 +172,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 3, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -229,7 +188,7 @@ vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
|
||||
|
||||
vec4 textureSampleExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, highp sampler2D plane0_smp, highp sampler2D plane1_smp, vec2 coord, ExternalTextureParams params) {
|
||||
vec2 modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
|
||||
vec2 modifiedCoords = (vec3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
||||
vec2 plane0_dims = vec2(uvec2(textureSize(plane0_1, 0)));
|
||||
vec2 plane0_half_texel = (vec2(0.5f) / plane0_dims);
|
||||
vec2 plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||
@@ -254,13 +213,9 @@ uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_1;
|
||||
uniform highp sampler2D arg_0_arg_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_arg_1;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void textureSampleBaseClampToEdge_7c04e6() {
|
||||
vec2 arg_2 = vec2(1.0f);
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, conv_ExternalTextureParams(ext_tex_params.inner));
|
||||
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ExternalTextureParams {
|
||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||
/* 0x00b0 */ float2x2 rotationMatrix;
|
||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
@@ -44,7 +44,7 @@ float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
}
|
||||
|
||||
float4 textureSampleExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, sampler smp, float2 coord, ExternalTextureParams params) {
|
||||
float2 const modifiedCoords = (((coord - 0.5f) * params.rotationMatrix) + 0.5f);
|
||||
float2 const modifiedCoords = (float3((coord - 0.5f), 1.0f) * params.coordTransformationMatrix);
|
||||
float2 const plane0_dims = float2(uint2(plane0.get_width(0), plane0.get_height(0)));
|
||||
float2 const plane0_half_texel = (float2(0.5f) / plane0_dims);
|
||||
float2 const plane0_clamped = clamp(modifiedCoords, plane0_half_texel, (1.0f - plane0_half_texel));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 192
|
||||
; Bound: 176
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability ImageQuery
|
||||
@@ -15,13 +15,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -31,24 +31,15 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %gammaCorrection "gammaCorrection"
|
||||
OpName %v "v"
|
||||
OpName %params "params"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
|
||||
OpName %textureSampleExternal "textureSampleExternal"
|
||||
OpName %plane0 "plane0"
|
||||
OpName %plane1 "plane1"
|
||||
@@ -56,8 +47,6 @@
|
||||
OpName %coord "coord"
|
||||
OpName %params_0 "params"
|
||||
OpName %color "color"
|
||||
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||
OpName %val "val"
|
||||
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
|
||||
OpName %arg_2 "arg_2"
|
||||
OpName %res "res"
|
||||
@@ -69,14 +58,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 2
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -85,12 +74,13 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 3
|
||||
@@ -98,19 +88,6 @@
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpDecorate %arg_1 DescriptorSet 1
|
||||
OpDecorate %arg_1 Binding 1
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
@@ -127,11 +104,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%25 = OpTypeSampler
|
||||
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
|
||||
@@ -141,28 +118,26 @@
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%46 = OpConstantNull %v3float
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
|
||||
%v2float = OpTypeVector %float 2
|
||||
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
|
||||
%float_0_5 = OpConstant %float 0.5
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%80 = OpConstantNull %v2float
|
||||
%79 = OpConstantNull %v2float
|
||||
%float_1 = OpConstant %float 1
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%int = OpTypeInt 32 1
|
||||
%91 = OpConstantNull %int
|
||||
%92 = OpConstantComposite %v2float %float_0_5 %float_0_5
|
||||
%float_1 = OpConstant %float 1
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%114 = OpTypeSampledImage %11
|
||||
%129 = OpConstantNull %uint
|
||||
%147 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||
%113 = OpTypeSampledImage %11
|
||||
%128 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%161 = OpTypeFunction %void
|
||||
%165 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%146 = OpTypeFunction %void
|
||||
%150 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%179 = OpTypeFunction %v4float
|
||||
%163 = OpTypeFunction %v4float
|
||||
%gammaCorrection = OpFunction %v3float None %26
|
||||
%v = OpFunctionParameter %v3float
|
||||
%params = OpFunctionParameter %GammaTransferParams
|
||||
@@ -205,131 +180,115 @@
|
||||
%smp = OpFunctionParameter %25
|
||||
%coord = OpFunctionParameter %v2float
|
||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||
%75 = OpLabel
|
||||
%78 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%85 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%97 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%104 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%74 = OpLabel
|
||||
%77 = OpVariable %_ptr_Function_v2float Function %79
|
||||
%96 = OpVariable %_ptr_Function_v2float Function %79
|
||||
%103 = OpVariable %_ptr_Function_v2float Function %79
|
||||
%color = OpVariable %_ptr_Function_v3float Function %46
|
||||
%81 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
||||
%77 = OpFSub %v2float %coord %81
|
||||
%82 = OpCompositeExtract %mat2v2float %params_0 6
|
||||
%83 = OpVectorTimesMatrix %v2float %77 %82
|
||||
%86 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
||||
%84 = OpFAdd %v2float %83 %86
|
||||
%80 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
||||
%76 = OpFSub %v2float %coord %80
|
||||
%81 = OpCompositeExtract %float %76 0
|
||||
%82 = OpCompositeExtract %float %76 1
|
||||
%84 = OpCompositeConstruct %v3float %81 %82 %float_1
|
||||
%85 = OpCompositeExtract %mat2v3float %params_0 6
|
||||
%86 = OpVectorTimesMatrix %v2float %84 %85
|
||||
%88 = OpImageQuerySizeLod %v2uint %plane0 %91
|
||||
%87 = OpConvertUToF %v2float %88
|
||||
%93 = OpFDiv %v2float %92 %87
|
||||
%98 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||
%96 = OpFSub %v2float %98 %93
|
||||
%94 = OpExtInst %v2float %32 NClamp %84 %93 %96
|
||||
%100 = OpImageQuerySizeLod %v2uint %plane1 %91
|
||||
%99 = OpConvertUToF %v2float %100
|
||||
%101 = OpFDiv %v2float %92 %99
|
||||
%105 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||
%103 = OpFSub %v2float %105 %101
|
||||
%102 = OpExtInst %v2float %32 NClamp %84 %101 %103
|
||||
%107 = OpCompositeExtract %uint %params_0 0
|
||||
%109 = OpIEqual %bool %107 %uint_1
|
||||
OpSelectionMerge %110 None
|
||||
OpBranchConditional %109 %111 %112
|
||||
%111 = OpLabel
|
||||
%115 = OpSampledImage %114 %plane0 %smp
|
||||
%113 = OpImageSampleExplicitLod %v4float %115 %94 Lod %8
|
||||
%116 = OpVectorShuffle %v3float %113 %113 0 1 2
|
||||
OpStore %color %116
|
||||
OpBranch %110
|
||||
%112 = OpLabel
|
||||
%118 = OpSampledImage %114 %plane0 %smp
|
||||
%117 = OpImageSampleExplicitLod %v4float %118 %94 Lod %8
|
||||
%119 = OpCompositeExtract %float %117 0
|
||||
%121 = OpSampledImage %114 %plane1 %smp
|
||||
%120 = OpImageSampleExplicitLod %v4float %121 %102 Lod %8
|
||||
%122 = OpVectorShuffle %v2float %120 %120 0 1
|
||||
%123 = OpCompositeExtract %float %122 0
|
||||
%124 = OpCompositeExtract %float %122 1
|
||||
%125 = OpCompositeConstruct %v4float %119 %123 %124 %float_1
|
||||
%126 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%127 = OpVectorTimesMatrix %v3float %125 %126
|
||||
OpStore %color %127
|
||||
OpBranch %110
|
||||
%97 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||
%95 = OpFSub %v2float %97 %93
|
||||
%94 = OpExtInst %v2float %32 NClamp %86 %93 %95
|
||||
%99 = OpImageQuerySizeLod %v2uint %plane1 %91
|
||||
%98 = OpConvertUToF %v2float %99
|
||||
%100 = OpFDiv %v2float %92 %98
|
||||
%104 = OpCompositeConstruct %v2float %float_1 %float_1
|
||||
%102 = OpFSub %v2float %104 %100
|
||||
%101 = OpExtInst %v2float %32 NClamp %86 %100 %102
|
||||
%106 = OpCompositeExtract %uint %params_0 0
|
||||
%108 = OpIEqual %bool %106 %uint_1
|
||||
OpSelectionMerge %109 None
|
||||
OpBranchConditional %108 %110 %111
|
||||
%110 = OpLabel
|
||||
%128 = OpCompositeExtract %uint %params_0 1
|
||||
%130 = OpIEqual %bool %128 %129
|
||||
OpSelectionMerge %131 None
|
||||
OpBranchConditional %130 %132 %131
|
||||
%132 = OpLabel
|
||||
%134 = OpLoad %v3float %color
|
||||
%135 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%133 = OpFunctionCall %v3float %gammaCorrection %134 %135
|
||||
OpStore %color %133
|
||||
%136 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%137 = OpLoad %v3float %color
|
||||
%138 = OpMatrixTimesVector %v3float %136 %137
|
||||
OpStore %color %138
|
||||
%140 = OpLoad %v3float %color
|
||||
%141 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%139 = OpFunctionCall %v3float %gammaCorrection %140 %141
|
||||
OpStore %color %139
|
||||
OpBranch %131
|
||||
%114 = OpSampledImage %113 %plane0 %smp
|
||||
%112 = OpImageSampleExplicitLod %v4float %114 %94 Lod %8
|
||||
%115 = OpVectorShuffle %v3float %112 %112 0 1 2
|
||||
OpStore %color %115
|
||||
OpBranch %109
|
||||
%111 = OpLabel
|
||||
%117 = OpSampledImage %113 %plane0 %smp
|
||||
%116 = OpImageSampleExplicitLod %v4float %117 %94 Lod %8
|
||||
%118 = OpCompositeExtract %float %116 0
|
||||
%120 = OpSampledImage %113 %plane1 %smp
|
||||
%119 = OpImageSampleExplicitLod %v4float %120 %101 Lod %8
|
||||
%121 = OpVectorShuffle %v2float %119 %119 0 1
|
||||
%122 = OpCompositeExtract %float %121 0
|
||||
%123 = OpCompositeExtract %float %121 1
|
||||
%124 = OpCompositeConstruct %v4float %118 %122 %123 %float_1
|
||||
%125 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%126 = OpVectorTimesMatrix %v3float %124 %125
|
||||
OpStore %color %126
|
||||
OpBranch %109
|
||||
%109 = OpLabel
|
||||
%127 = OpCompositeExtract %uint %params_0 1
|
||||
%129 = OpIEqual %bool %127 %128
|
||||
OpSelectionMerge %130 None
|
||||
OpBranchConditional %129 %131 %130
|
||||
%131 = OpLabel
|
||||
%142 = OpLoad %v3float %color
|
||||
%143 = OpCompositeExtract %float %142 0
|
||||
%144 = OpCompositeExtract %float %142 1
|
||||
%145 = OpCompositeExtract %float %142 2
|
||||
%146 = OpCompositeConstruct %v4float %143 %144 %145 %float_1
|
||||
OpReturnValue %146
|
||||
%133 = OpLoad %v3float %color
|
||||
%134 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%132 = OpFunctionCall %v3float %gammaCorrection %133 %134
|
||||
OpStore %color %132
|
||||
%135 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%136 = OpLoad %v3float %color
|
||||
%137 = OpMatrixTimesVector %v3float %135 %136
|
||||
OpStore %color %137
|
||||
%139 = OpLoad %v3float %color
|
||||
%140 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%138 = OpFunctionCall %v3float %gammaCorrection %139 %140
|
||||
OpStore %color %138
|
||||
OpBranch %130
|
||||
%130 = OpLabel
|
||||
%141 = OpLoad %v3float %color
|
||||
%142 = OpCompositeExtract %float %141 0
|
||||
%143 = OpCompositeExtract %float %141 1
|
||||
%144 = OpCompositeExtract %float %141 2
|
||||
%145 = OpCompositeConstruct %v4float %142 %143 %144 %float_1
|
||||
OpReturnValue %145
|
||||
OpFunctionEnd
|
||||
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %147
|
||||
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||
%150 = OpLabel
|
||||
%151 = OpCompositeExtract %uint %val 0
|
||||
%152 = OpCompositeExtract %uint %val 1
|
||||
%153 = OpCompositeExtract %mat3v4float %val 2
|
||||
%154 = OpCompositeExtract %GammaTransferParams %val 3
|
||||
%155 = OpCompositeExtract %GammaTransferParams %val 4
|
||||
%156 = OpCompositeExtract %mat3v3float %val 5
|
||||
%157 = OpCompositeExtract %v2float %val 6
|
||||
%158 = OpCompositeExtract %v2float %val 7
|
||||
%159 = OpCompositeConstruct %mat2v2float %157 %158
|
||||
%160 = OpCompositeConstruct %ExternalTextureParams %151 %152 %153 %154 %155 %156 %159
|
||||
OpReturnValue %160
|
||||
OpFunctionEnd
|
||||
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %161
|
||||
%164 = OpLabel
|
||||
%arg_2 = OpVariable %_ptr_Function_v2float Function %80
|
||||
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %146
|
||||
%149 = OpLabel
|
||||
%arg_2 = OpVariable %_ptr_Function_v2float Function %79
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
OpStore %arg_2 %165
|
||||
%168 = OpLoad %11 %arg_0
|
||||
%169 = OpLoad %11 %ext_tex_plane_1
|
||||
%170 = OpLoad %25 %arg_1
|
||||
%171 = OpLoad %v2float %arg_2
|
||||
%175 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||
%176 = OpLoad %ExternalTextureParams_std140 %175
|
||||
%172 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %176
|
||||
%167 = OpFunctionCall %v4float %textureSampleExternal %168 %169 %170 %171 %172
|
||||
OpStore %res %167
|
||||
OpStore %arg_2 %150
|
||||
%153 = OpLoad %11 %arg_0
|
||||
%154 = OpLoad %11 %ext_tex_plane_1
|
||||
%155 = OpLoad %25 %arg_1
|
||||
%156 = OpLoad %v2float %arg_2
|
||||
%159 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
||||
%160 = OpLoad %ExternalTextureParams %159
|
||||
%152 = OpFunctionCall %v4float %textureSampleExternal %153 %154 %155 %156 %160
|
||||
OpStore %res %152
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %179
|
||||
%181 = OpLabel
|
||||
%182 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
%vertex_main_inner = OpFunction %v4float None %163
|
||||
%165 = OpLabel
|
||||
%166 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %161
|
||||
%184 = OpLabel
|
||||
%185 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %185
|
||||
%vertex_main = OpFunction %void None %146
|
||||
%168 = OpLabel
|
||||
%169 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %169
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %161
|
||||
%187 = OpLabel
|
||||
%188 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
%fragment_main = OpFunction %void None %146
|
||||
%171 = OpLabel
|
||||
%172 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %161
|
||||
%190 = OpLabel
|
||||
%191 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
%compute_main = OpFunction %void None %146
|
||||
%174 = OpLabel
|
||||
%175 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -50,14 +50,14 @@ float4 textureLoad2d(Texture2D<float4> tint_symbol, Texture2D<float4> ext_tex_pl
|
||||
return textureLoadExternal(tint_symbol, ext_tex_plane_1_1, coords, ext_tex_params_1);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_4(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_4(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_6(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_6(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -66,30 +66,28 @@ GammaTransferParams tint_symbol_6(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_12 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_12;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_8(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_10(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_2(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_2(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_13 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
|
||||
return tint_symbol_13;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
}
|
||||
|
||||
void doTextureLoad() {
|
||||
|
||||
@@ -15,12 +15,12 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
float3x3 gamutConversionMatrix;
|
||||
float2x2 rotationMatrix;
|
||||
float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
|
||||
cbuffer cbuffer_ext_tex_params : register(b2, space1) {
|
||||
uint4 ext_tex_params[12];
|
||||
uint4 ext_tex_params[13];
|
||||
};
|
||||
Texture2D<float4> arg_0 : register(t0, space1);
|
||||
|
||||
@@ -50,14 +50,14 @@ float4 textureLoad2d(Texture2D<float4> tint_symbol, Texture2D<float4> ext_tex_pl
|
||||
return textureLoadExternal(tint_symbol, ext_tex_plane_1_1, coords, ext_tex_params_1);
|
||||
}
|
||||
|
||||
float3x4 tint_symbol_4(uint4 buffer[12], uint offset) {
|
||||
float3x4 tint_symbol_4(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_1 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_2 = ((offset + 32u)) / 4;
|
||||
return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
|
||||
}
|
||||
|
||||
GammaTransferParams tint_symbol_6(uint4 buffer[12], uint offset) {
|
||||
GammaTransferParams tint_symbol_6(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_3 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_4 = ((offset + 4u)) / 4;
|
||||
const uint scalar_offset_5 = ((offset + 8u)) / 4;
|
||||
@@ -66,30 +66,28 @@ GammaTransferParams tint_symbol_6(uint4 buffer[12], uint offset) {
|
||||
const uint scalar_offset_8 = ((offset + 20u)) / 4;
|
||||
const uint scalar_offset_9 = ((offset + 24u)) / 4;
|
||||
const uint scalar_offset_10 = ((offset + 28u)) / 4;
|
||||
const GammaTransferParams tint_symbol_12 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_12;
|
||||
const GammaTransferParams tint_symbol_11 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
|
||||
return tint_symbol_11;
|
||||
}
|
||||
|
||||
float3x3 tint_symbol_8(uint4 buffer[12], uint offset) {
|
||||
float3x3 tint_symbol_8(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_11 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_12 = ((offset + 16u)) / 4;
|
||||
const uint scalar_offset_13 = ((offset + 32u)) / 4;
|
||||
return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
|
||||
}
|
||||
|
||||
float2x2 tint_symbol_10(uint4 buffer[12], uint offset) {
|
||||
float2x3 tint_symbol_10(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_14 = ((offset + 0u)) / 4;
|
||||
uint4 ubo_load = buffer[scalar_offset_14 / 4];
|
||||
const uint scalar_offset_15 = ((offset + 8u)) / 4;
|
||||
uint4 ubo_load_1 = buffer[scalar_offset_15 / 4];
|
||||
return float2x2(asfloat(((scalar_offset_14 & 2) ? ubo_load.zw : ubo_load.xy)), asfloat(((scalar_offset_15 & 2) ? ubo_load_1.zw : ubo_load_1.xy)));
|
||||
const uint scalar_offset_15 = ((offset + 16u)) / 4;
|
||||
return float2x3(asfloat(buffer[scalar_offset_14 / 4].xyz), asfloat(buffer[scalar_offset_15 / 4].xyz));
|
||||
}
|
||||
|
||||
ExternalTextureParams tint_symbol_2(uint4 buffer[12], uint offset) {
|
||||
ExternalTextureParams tint_symbol_2(uint4 buffer[13], uint offset) {
|
||||
const uint scalar_offset_16 = ((offset + 0u)) / 4;
|
||||
const uint scalar_offset_17 = ((offset + 4u)) / 4;
|
||||
const ExternalTextureParams tint_symbol_13 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
|
||||
return tint_symbol_13;
|
||||
const ExternalTextureParams tint_symbol_12 = {buffer[scalar_offset_16 / 4][scalar_offset_16 % 4], buffer[scalar_offset_17 / 4][scalar_offset_17 % 4], tint_symbol_4(buffer, (offset + 16u)), tint_symbol_6(buffer, (offset + 64u)), tint_symbol_6(buffer, (offset + 96u)), tint_symbol_8(buffer, (offset + 128u)), tint_symbol_10(buffer, (offset + 176u))};
|
||||
return tint_symbol_12;
|
||||
}
|
||||
|
||||
void doTextureLoad() {
|
||||
|
||||
@@ -18,22 +18,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -64,12 +53,8 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_2;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void doTextureLoad() {
|
||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
|
||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
@@ -106,22 +91,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -152,12 +126,8 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_2;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void doTextureLoad() {
|
||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
|
||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
@@ -188,22 +158,11 @@ struct ExternalTextureParams {
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
mat2 rotationMatrix;
|
||||
mat2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
struct ExternalTextureParams_std140 {
|
||||
uint numPlanes;
|
||||
uint doYuvToRgbConversionOnly;
|
||||
mat3x4 yuvToRgbConversionMatrix;
|
||||
GammaTransferParams gammaDecodeParams;
|
||||
GammaTransferParams gammaEncodeParams;
|
||||
mat3 gamutConversionMatrix;
|
||||
vec2 rotationMatrix_0;
|
||||
vec2 rotationMatrix_1;
|
||||
};
|
||||
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_std140_ubo {
|
||||
ExternalTextureParams_std140 inner;
|
||||
layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
|
||||
ExternalTextureParams inner;
|
||||
} ext_tex_params;
|
||||
|
||||
vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
|
||||
@@ -234,12 +193,8 @@ vec4 textureLoad2d(highp sampler2D tint_symbol_1, highp sampler2D ext_tex_plane_
|
||||
|
||||
uniform highp sampler2D arg_0_1;
|
||||
uniform highp sampler2D ext_tex_plane_1_2;
|
||||
ExternalTextureParams conv_ExternalTextureParams(ExternalTextureParams_std140 val) {
|
||||
return ExternalTextureParams(val.numPlanes, val.doYuvToRgbConversionOnly, val.yuvToRgbConversionMatrix, val.gammaDecodeParams, val.gammaEncodeParams, val.gamutConversionMatrix, mat2(val.rotationMatrix_0, val.rotationMatrix_1));
|
||||
}
|
||||
|
||||
void doTextureLoad() {
|
||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, conv_ExternalTextureParams(ext_tex_params.inner), ivec2(0));
|
||||
vec4 res = textureLoad2d(arg_0_1, ext_tex_plane_1_2, ext_tex_params.inner, ivec2(0));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
||||
@@ -33,7 +33,7 @@ struct ExternalTextureParams {
|
||||
/* 0x0040 */ GammaTransferParams gammaDecodeParams;
|
||||
/* 0x0060 */ GammaTransferParams gammaEncodeParams;
|
||||
/* 0x0080 */ float3x3 gamutConversionMatrix;
|
||||
/* 0x00b0 */ float2x2 rotationMatrix;
|
||||
/* 0x00b0 */ float2x3 coordTransformationMatrix;
|
||||
};
|
||||
|
||||
float3 gammaCorrection(float3 v, GammaTransferParams params) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 163
|
||||
; Bound: 147
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%29 = OpExtInstImport "GLSL.std.450"
|
||||
@@ -14,13 +14,13 @@
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %ext_tex_plane_1 "ext_tex_plane_1"
|
||||
OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140"
|
||||
OpMemberName %ext_tex_params_block_std140 0 "inner"
|
||||
OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140"
|
||||
OpMemberName %ExternalTextureParams_std140 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams"
|
||||
OpName %ext_tex_params_block "ext_tex_params_block"
|
||||
OpMemberName %ext_tex_params_block 0 "inner"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpName %GammaTransferParams "GammaTransferParams"
|
||||
OpMemberName %GammaTransferParams 0 "G"
|
||||
OpMemberName %GammaTransferParams 1 "A"
|
||||
@@ -30,23 +30,14 @@
|
||||
OpMemberName %GammaTransferParams 5 "E"
|
||||
OpMemberName %GammaTransferParams 6 "F"
|
||||
OpMemberName %GammaTransferParams 7 "padding"
|
||||
OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams_std140 6 "rotationMatrix_0"
|
||||
OpMemberName %ExternalTextureParams_std140 7 "rotationMatrix_1"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
||||
OpName %ext_tex_params "ext_tex_params"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %gammaCorrection "gammaCorrection"
|
||||
OpName %v "v"
|
||||
OpName %params "params"
|
||||
OpName %ExternalTextureParams "ExternalTextureParams"
|
||||
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
||||
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
||||
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
||||
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
||||
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
||||
OpMemberName %ExternalTextureParams 6 "rotationMatrix"
|
||||
OpName %textureLoadExternal "textureLoadExternal"
|
||||
OpName %plane0 "plane0"
|
||||
OpName %plane1 "plane1"
|
||||
@@ -58,8 +49,6 @@
|
||||
OpName %ext_tex_plane_1_1 "ext_tex_plane_1_1"
|
||||
OpName %ext_tex_params_1 "ext_tex_params_1"
|
||||
OpName %coords "coords"
|
||||
OpName %conv_ExternalTextureParams "conv_ExternalTextureParams"
|
||||
OpName %val "val"
|
||||
OpName %doTextureLoad "doTextureLoad"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
@@ -70,14 +59,14 @@
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
OpDecorate %ext_tex_plane_1 DescriptorSet 1
|
||||
OpDecorate %ext_tex_plane_1 Binding 1
|
||||
OpDecorate %ext_tex_params_block_std140 Block
|
||||
OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64
|
||||
OpDecorate %ext_tex_params_block Block
|
||||
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %GammaTransferParams 0 Offset 0
|
||||
OpMemberDecorate %GammaTransferParams 1 Offset 4
|
||||
OpMemberDecorate %GammaTransferParams 2 Offset 8
|
||||
@@ -86,30 +75,18 @@
|
||||
OpMemberDecorate %GammaTransferParams 5 Offset 20
|
||||
OpMemberDecorate %GammaTransferParams 6 Offset 24
|
||||
OpMemberDecorate %GammaTransferParams 7 Offset 28
|
||||
OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
||||
OpMemberDecorate %ExternalTextureParams 1 Offset 4
|
||||
OpMemberDecorate %ExternalTextureParams 2 Offset 16
|
||||
OpMemberDecorate %ExternalTextureParams 2 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 3 Offset 64
|
||||
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
||||
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
||||
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
||||
OpMemberDecorate %ExternalTextureParams 6 Offset 176
|
||||
OpMemberDecorate %ExternalTextureParams 6 ColMajor
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8
|
||||
OpMemberDecorate %ExternalTextureParams 6 MatrixStride 16
|
||||
OpDecorate %ext_tex_params NonWritable
|
||||
OpDecorate %ext_tex_params DescriptorSet 1
|
||||
OpDecorate %ext_tex_params Binding 2
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
@@ -126,11 +103,11 @@
|
||||
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%v2float = OpTypeVector %float 2
|
||||
%ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float
|
||||
%ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140
|
||||
%_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
||||
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
||||
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
||||
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
||||
%23 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
||||
%bool = OpTypeBool
|
||||
@@ -139,22 +116,20 @@
|
||||
%43 = OpConstantNull %v3float
|
||||
%int = OpTypeInt 32 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v2float
|
||||
%63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%82 = OpConstantNull %int
|
||||
%80 = OpConstantNull %int
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%95 = OpConstantNull %uint
|
||||
%113 = OpTypeFunction %v4float %11 %11 %ExternalTextureParams %v2int
|
||||
%121 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140
|
||||
%94 = OpConstantNull %uint
|
||||
%112 = OpTypeFunction %v4float %11 %11 %ExternalTextureParams %v2int
|
||||
%void = OpTypeVoid
|
||||
%135 = OpTypeFunction %void
|
||||
%120 = OpTypeFunction %void
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140
|
||||
%147 = OpConstantNull %v2int
|
||||
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
||||
%131 = OpConstantNull %v2int
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%150 = OpTypeFunction %v4float
|
||||
%134 = OpTypeFunction %v4float
|
||||
%gammaCorrection = OpFunction %v3float None %23
|
||||
%v = OpFunctionParameter %v3float
|
||||
%params = OpFunctionParameter %GammaTransferParams
|
||||
@@ -196,111 +171,95 @@
|
||||
%plane1 = OpFunctionParameter %11
|
||||
%coord = OpFunctionParameter %v2int
|
||||
%params_0 = OpFunctionParameter %ExternalTextureParams
|
||||
%73 = OpLabel
|
||||
%71 = OpLabel
|
||||
%color = OpVariable %_ptr_Function_v3float Function %43
|
||||
%75 = OpCompositeExtract %uint %params_0 0
|
||||
%77 = OpIEqual %bool %75 %uint_1
|
||||
OpSelectionMerge %78 None
|
||||
OpBranchConditional %77 %79 %80
|
||||
%79 = OpLabel
|
||||
%81 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%83 = OpVectorShuffle %v3float %81 %81 0 1 2
|
||||
OpStore %color %83
|
||||
OpBranch %78
|
||||
%80 = OpLabel
|
||||
%84 = OpImageFetch %v4float %plane0 %coord Lod %82
|
||||
%85 = OpCompositeExtract %float %84 0
|
||||
%86 = OpImageFetch %v4float %plane1 %coord Lod %82
|
||||
%87 = OpVectorShuffle %v2float %86 %86 0 1
|
||||
%88 = OpCompositeExtract %float %87 0
|
||||
%89 = OpCompositeExtract %float %87 1
|
||||
%91 = OpCompositeConstruct %v4float %85 %88 %89 %float_1
|
||||
%92 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%93 = OpVectorTimesMatrix %v3float %91 %92
|
||||
OpStore %color %93
|
||||
OpBranch %78
|
||||
%73 = OpCompositeExtract %uint %params_0 0
|
||||
%75 = OpIEqual %bool %73 %uint_1
|
||||
OpSelectionMerge %76 None
|
||||
OpBranchConditional %75 %77 %78
|
||||
%77 = OpLabel
|
||||
%79 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%81 = OpVectorShuffle %v3float %79 %79 0 1 2
|
||||
OpStore %color %81
|
||||
OpBranch %76
|
||||
%78 = OpLabel
|
||||
%94 = OpCompositeExtract %uint %params_0 1
|
||||
%96 = OpIEqual %bool %94 %95
|
||||
OpSelectionMerge %97 None
|
||||
OpBranchConditional %96 %98 %97
|
||||
%98 = OpLabel
|
||||
%100 = OpLoad %v3float %color
|
||||
%101 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%99 = OpFunctionCall %v3float %gammaCorrection %100 %101
|
||||
OpStore %color %99
|
||||
%102 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%103 = OpLoad %v3float %color
|
||||
%104 = OpMatrixTimesVector %v3float %102 %103
|
||||
OpStore %color %104
|
||||
%106 = OpLoad %v3float %color
|
||||
%107 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%105 = OpFunctionCall %v3float %gammaCorrection %106 %107
|
||||
OpStore %color %105
|
||||
OpBranch %97
|
||||
%82 = OpImageFetch %v4float %plane0 %coord Lod %80
|
||||
%83 = OpCompositeExtract %float %82 0
|
||||
%84 = OpImageFetch %v4float %plane1 %coord Lod %80
|
||||
%86 = OpVectorShuffle %v2float %84 %84 0 1
|
||||
%87 = OpCompositeExtract %float %86 0
|
||||
%88 = OpCompositeExtract %float %86 1
|
||||
%90 = OpCompositeConstruct %v4float %83 %87 %88 %float_1
|
||||
%91 = OpCompositeExtract %mat3v4float %params_0 2
|
||||
%92 = OpVectorTimesMatrix %v3float %90 %91
|
||||
OpStore %color %92
|
||||
OpBranch %76
|
||||
%76 = OpLabel
|
||||
%93 = OpCompositeExtract %uint %params_0 1
|
||||
%95 = OpIEqual %bool %93 %94
|
||||
OpSelectionMerge %96 None
|
||||
OpBranchConditional %95 %97 %96
|
||||
%97 = OpLabel
|
||||
%108 = OpLoad %v3float %color
|
||||
%109 = OpCompositeExtract %float %108 0
|
||||
%110 = OpCompositeExtract %float %108 1
|
||||
%111 = OpCompositeExtract %float %108 2
|
||||
%112 = OpCompositeConstruct %v4float %109 %110 %111 %float_1
|
||||
OpReturnValue %112
|
||||
%99 = OpLoad %v3float %color
|
||||
%100 = OpCompositeExtract %GammaTransferParams %params_0 3
|
||||
%98 = OpFunctionCall %v3float %gammaCorrection %99 %100
|
||||
OpStore %color %98
|
||||
%101 = OpCompositeExtract %mat3v3float %params_0 5
|
||||
%102 = OpLoad %v3float %color
|
||||
%103 = OpMatrixTimesVector %v3float %101 %102
|
||||
OpStore %color %103
|
||||
%105 = OpLoad %v3float %color
|
||||
%106 = OpCompositeExtract %GammaTransferParams %params_0 4
|
||||
%104 = OpFunctionCall %v3float %gammaCorrection %105 %106
|
||||
OpStore %color %104
|
||||
OpBranch %96
|
||||
%96 = OpLabel
|
||||
%107 = OpLoad %v3float %color
|
||||
%108 = OpCompositeExtract %float %107 0
|
||||
%109 = OpCompositeExtract %float %107 1
|
||||
%110 = OpCompositeExtract %float %107 2
|
||||
%111 = OpCompositeConstruct %v4float %108 %109 %110 %float_1
|
||||
OpReturnValue %111
|
||||
OpFunctionEnd
|
||||
%textureLoad2d = OpFunction %v4float None %113
|
||||
%textureLoad2d = OpFunction %v4float None %112
|
||||
%texture = OpFunctionParameter %11
|
||||
%ext_tex_plane_1_1 = OpFunctionParameter %11
|
||||
%ext_tex_params_1 = OpFunctionParameter %ExternalTextureParams
|
||||
%coords = OpFunctionParameter %v2int
|
||||
%119 = OpLabel
|
||||
%120 = OpFunctionCall %v4float %textureLoadExternal %texture %ext_tex_plane_1_1 %coords %ext_tex_params_1
|
||||
OpReturnValue %120
|
||||
%118 = OpLabel
|
||||
%119 = OpFunctionCall %v4float %textureLoadExternal %texture %ext_tex_plane_1_1 %coords %ext_tex_params_1
|
||||
OpReturnValue %119
|
||||
OpFunctionEnd
|
||||
%conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %121
|
||||
%val = OpFunctionParameter %ExternalTextureParams_std140
|
||||
%124 = OpLabel
|
||||
%125 = OpCompositeExtract %uint %val 0
|
||||
%126 = OpCompositeExtract %uint %val 1
|
||||
%127 = OpCompositeExtract %mat3v4float %val 2
|
||||
%128 = OpCompositeExtract %GammaTransferParams %val 3
|
||||
%129 = OpCompositeExtract %GammaTransferParams %val 4
|
||||
%130 = OpCompositeExtract %mat3v3float %val 5
|
||||
%131 = OpCompositeExtract %v2float %val 6
|
||||
%132 = OpCompositeExtract %v2float %val 7
|
||||
%133 = OpCompositeConstruct %mat2v2float %131 %132
|
||||
%134 = OpCompositeConstruct %ExternalTextureParams %125 %126 %127 %128 %129 %130 %133
|
||||
OpReturnValue %134
|
||||
OpFunctionEnd
|
||||
%doTextureLoad = OpFunction %void None %135
|
||||
%138 = OpLabel
|
||||
%doTextureLoad = OpFunction %void None %120
|
||||
%123 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
%140 = OpLoad %11 %arg_0
|
||||
%141 = OpLoad %11 %ext_tex_plane_1
|
||||
%145 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0
|
||||
%146 = OpLoad %ExternalTextureParams_std140 %145
|
||||
%142 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %146
|
||||
%139 = OpFunctionCall %v4float %textureLoad2d %140 %141 %142 %147
|
||||
OpStore %res %139
|
||||
%125 = OpLoad %11 %arg_0
|
||||
%126 = OpLoad %11 %ext_tex_plane_1
|
||||
%129 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
||||
%130 = OpLoad %ExternalTextureParams %129
|
||||
%124 = OpFunctionCall %v4float %textureLoad2d %125 %126 %130 %131
|
||||
OpStore %res %124
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %150
|
||||
%152 = OpLabel
|
||||
%153 = OpFunctionCall %void %doTextureLoad
|
||||
%vertex_main_inner = OpFunction %v4float None %134
|
||||
%136 = OpLabel
|
||||
%137 = OpFunctionCall %void %doTextureLoad
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %135
|
||||
%155 = OpLabel
|
||||
%156 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %156
|
||||
%vertex_main = OpFunction %void None %120
|
||||
%139 = OpLabel
|
||||
%140 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %140
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %135
|
||||
%158 = OpLabel
|
||||
%159 = OpFunctionCall %void %doTextureLoad
|
||||
%fragment_main = OpFunction %void None %120
|
||||
%142 = OpLabel
|
||||
%143 = OpFunctionCall %void %doTextureLoad
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %135
|
||||
%161 = OpLabel
|
||||
%162 = OpFunctionCall %void %doTextureLoad
|
||||
%compute_main = OpFunction %void None %120
|
||||
%145 = OpLabel
|
||||
%146 = OpFunctionCall %void %doTextureLoad
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user