Finish NV12 support via streams.
The main functionality for NV12 texture support through EGL streams has
been added. Updates to the compiler, texture code, and stream code were
added to support binding to external D3D11 NV12 textures. An end2end test
was also added to test sampling of YUV textures and converting to RGB.
There is also a new script to convert BMP files to an NV12 texture ready
to load into D3D11 for testing purposes.
BUG=angleproject:1332
Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0
Reviewed-on: https://chromium-review.googlesource.com/339454
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Ewell <ewell@google.com>
Reviewed-on: https://chromium-review.googlesource.com/341254
Reviewed-by: Ian Ewell <ewell@google.com>
diff --git a/src/compiler/translator/TextureFunctionHLSL.cpp b/src/compiler/translator/TextureFunctionHLSL.cpp
index 66b5ab8..b859310 100644
--- a/src/compiler/translator/TextureFunctionHLSL.cpp
+++ b/src/compiler/translator/TextureFunctionHLSL.cpp
@@ -235,6 +235,8 @@
return 3;
case EbtSampler2DArray:
return 3;
+ case EbtSamplerExternalOES:
+ return 2;
case EbtISampler2D:
return 2;
case EbtISampler3D:
@@ -344,6 +346,7 @@
case EbtUSampler2DArray:
case EbtSampler2DShadow:
case EbtSampler2DArrayShadow:
+ case EbtSamplerExternalOES:
out << ", float2 ddx, float2 ddy";
break;
case EbtSampler3D:
@@ -421,6 +424,8 @@
case EbtSampler2DArrayShadow:
out << ", int2 offset";
break;
+ case EbtSamplerExternalOES:
+ out << ", int2 offset";
default:
UNREACHABLE();
}
@@ -1040,6 +1045,7 @@
case EbtISamplerCube:
case EbtUSamplerCube:
case EbtSamplerCubeShadow:
+ case EbtSamplerExternalOES:
return "int2";
case EbtSampler3D:
case EbtISampler3D:
@@ -1061,6 +1067,7 @@
case EbtSampler3D:
case EbtSamplerCube:
case EbtSampler2DArray:
+ case EbtSamplerExternalOES:
return "float4";
case EbtISampler2D:
case EbtISampler3D: