mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-05 19:55:37 +00:00
This reverts commit 857175e59b39e42fd21092fd4a96af9ea2c30297. Reason for revert: Suspected change for Dawn -> Chromium roll failures: * https://chromium-review.googlesource.com/c/chromium/src/+/3607875/ * https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/982037/overview * https://chrome-public-gold.skia.org/search?issue=3607875&crs=gerrit&patchsets=3&corpus=chrome-gpu Original change's description: > Add External Texture Gamma/Gamut Correction > > Adds configurable gamma and gamut correction in Tint's external texture > transform. Adds constants in Dawn to perform correct conversion from > BT.709 to sRGB. > > Bug: dawn:1082 > Change-Id: Id5eecc37f0224541bf36e2f9757e7e2047e4b66b > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87666 > Kokoro: Kokoro <noreply+kokoro@google.com> > Reviewed-by: Ben Clayton <bclayton@google.com> > Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com> TBR=cwallez@chromium.org,enga@chromium.org,brandon1.jones@intel.com,bclayton@google.com,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com Change-Id: Id3880e506172a18ff1258462c8c4cedb5c51c235 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: dawn:1082 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88001 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct ExternalTextureParams {
|
|
uint numPlanes;
|
|
float3x4 yuvToRgbConversionMatrix;
|
|
};
|
|
|
|
void textureDimensions_ba1481(texture2d<float, access::sample> tint_symbol_1) {
|
|
int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value [[position]];
|
|
};
|
|
|
|
float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
|
|
textureDimensions_ba1481(tint_symbol_2);
|
|
return float4();
|
|
}
|
|
|
|
vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
|
|
float4 const inner_result = vertex_main_inner(tint_symbol_3);
|
|
tint_symbol wrapper_result = {};
|
|
wrapper_result.value = inner_result;
|
|
return wrapper_result;
|
|
}
|
|
|
|
fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
|
|
textureDimensions_ba1481(tint_symbol_4);
|
|
return;
|
|
}
|
|
|
|
kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
|
|
textureDimensions_ba1481(tint_symbol_5);
|
|
return;
|
|
}
|
|
|