Split Caps into Caps, Extensions and TextureFormatCaps.
Context now holds it's own Caps, Extensions and TextureFormat caps so that it
can modify them based on client version or work-arounds.
BUG=angle:658
Change-Id: Id71b6c89b7aa36e1f3dc42b0e4720eaed1851fb9
Reviewed-on: https://chromium-review.googlesource.com/206480
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libGLESv2/DynamicHLSL.cpp b/src/libGLESv2/DynamicHLSL.cpp
index a4db907..1f1dc20 100644
--- a/src/libGLESv2/DynamicHLSL.cpp
+++ b/src/libGLESv2/DynamicHLSL.cpp
@@ -659,7 +659,7 @@
// - with a 3.0 context, the output color is copied to channel 0
// - with a 2.0 context, the output color is broadcast to all channels
const bool broadcast = (fragmentShader->mUsesFragColor && mRenderer->getCurrentClientVersion() < 3);
- const unsigned int numRenderTargets = (broadcast || usesMRT ? mRenderer->getCaps().maxDrawBuffers : 1);
+ const unsigned int numRenderTargets = (broadcast || usesMRT ? mRenderer->getRendererCaps().maxDrawBuffers : 1);
int shaderVersion = vertexShader->getShaderVersion();
@@ -996,6 +996,7 @@
std::string inLinkHLSL = generateVaryingLinkHLSL(inSemantics, varyingHLSL);
std::string outLinkHLSL = generateVaryingLinkHLSL(outSemantics, varyingHLSL);
+ // TODO(geofflang): use context's caps
geomHLSL += "uniform float4 dx_ViewCoords : register(c1);\n"
"\n"
"struct GS_INPUT\n" + inLinkHLSL + "\n" +
@@ -1017,8 +1018,8 @@
" float2(0.0f, 0.0f)\n"
"};\n"
"\n"
- "static float minPointSize = " + Str(mRenderer->getCaps().minAliasedPointSize) + ".0f;\n"
- "static float maxPointSize = " + Str(mRenderer->getCaps().maxAliasedPointSize) + ".0f;\n"
+ "static float minPointSize = " + Str(mRenderer->getRendererCaps().minAliasedPointSize) + ".0f;\n"
+ "static float maxPointSize = " + Str(mRenderer->getRendererCaps().maxAliasedPointSize) + ".0f;\n"
"\n"
"[maxvertexcount(4)]\n"
"void main(point GS_INPUT input[1], inout TriangleStream<GS_OUTPUT> outStream)\n"