mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 09:25:25 +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
@@ -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