Commit 46485086 by Nicolas Capens

Implement EXT_shader_texture_lod

BUG=angle:551 Change-Id: I81d7574a15861f1b24ddf6147cf71adbf20e10f3 Reviewed-on: https://chromium-review.googlesource.com/194960Tested-by: 's avatarNicolas Capens <nicolascapens@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 04296f85
...@@ -37,7 +37,7 @@ extern "C" { ...@@ -37,7 +37,7 @@ extern "C" {
// Version number for shader translation API. // Version number for shader translation API.
// It is incremented every time the API changes. // It is incremented every time the API changes.
#define ANGLE_SH_VERSION 122 #define ANGLE_SH_VERSION 123
// //
// The names of the following enums have been derived by replacing GL prefix // The names of the following enums have been derived by replacing GL prefix
...@@ -284,6 +284,7 @@ typedef struct ...@@ -284,6 +284,7 @@ typedef struct
int ARB_texture_rectangle; int ARB_texture_rectangle;
int EXT_draw_buffers; int EXT_draw_buffers;
int EXT_frag_depth; int EXT_frag_depth;
int EXT_shader_texture_lod;
// Set to 1 if highp precision is supported in the fragment language. // Set to 1 if highp precision is supported in the fragment language.
// Default is 0. // Default is 0.
......
...@@ -126,6 +126,7 @@ int main(int argc, char* argv[]) ...@@ -126,6 +126,7 @@ int main(int argc, char* argv[])
case 'i': resources.OES_EGL_image_external = 1; break; case 'i': resources.OES_EGL_image_external = 1; break;
case 'd': resources.OES_standard_derivatives = 1; break; case 'd': resources.OES_standard_derivatives = 1; break;
case 'r': resources.ARB_texture_rectangle = 1; break; case 'r': resources.ARB_texture_rectangle = 1; break;
case 'l': resources.EXT_shader_texture_lod = 1; break;
default: failCode = EFailUsage; default: failCode = EFailUsage;
} }
} else { } else {
...@@ -231,7 +232,8 @@ void usage() ...@@ -231,7 +232,8 @@ void usage()
" -b=h11 : output HLSL11 code\n" " -b=h11 : output HLSL11 code\n"
" -x=i : enable GL_OES_EGL_image_external\n" " -x=i : enable GL_OES_EGL_image_external\n"
" -x=d : enable GL_OES_EGL_standard_derivatives\n" " -x=d : enable GL_OES_EGL_standard_derivatives\n"
" -x=r : enable ARB_texture_rectangle\n"); " -x=r : enable ARB_texture_rectangle\n"
" -x=l : enable EXT_shader_texture_lod\n");
} }
// //
......
...@@ -351,6 +351,17 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI ...@@ -351,6 +351,17 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DRectProj", sampler2DRect, float4); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DRectProj", sampler2DRect, float4);
} }
if (resources.EXT_shader_texture_lod)
{
/* The *Grad* variants are new to both vertex and fragment shaders; the fragment
* shader specific pieces are added separately below.
*/
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DGradEXT", sampler2D, float2, float2, float2);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DProjGradEXT", sampler2D, float3, float2, float2);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DProjGradEXT", sampler2D, float4, float2, float2);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "textureCubeGradEXT", samplerCube, float3, float3, float3);
}
if (type == SH_FRAGMENT_SHADER) if (type == SH_FRAGMENT_SHADER)
{ {
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2D", sampler2D, float2, float1); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2D", sampler2D, float2, float1);
...@@ -364,7 +375,7 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI ...@@ -364,7 +375,7 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float2, "dFdx", float2); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float2, "dFdx", float2);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float3, "dFdx", float3); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float3, "dFdx", float3);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "dFdx", float4); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "dFdx", float4);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float1, "dFdy", float1); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float1, "dFdy", float1);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float2, "dFdy", float2); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float2, "dFdy", float2);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float3, "dFdy", float3); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float3, "dFdy", float3);
...@@ -375,6 +386,14 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI ...@@ -375,6 +386,14 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float3, "fwidth", float3); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float3, "fwidth", float3);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "fwidth", float4); symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "fwidth", float4);
} }
if (resources.EXT_shader_texture_lod)
{
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DLodEXT", sampler2D, float2, float1);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DProjLodEXT", sampler2D, float3, float1);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "texture2DProjLodEXT", sampler2D, float4, float1);
symbolTable.insertBuiltIn(ESSL1_BUILTINS, float4, "textureCubeLodEXT", samplerCube, float3, float1);
}
} }
if(type == SH_VERTEX_SHADER) if(type == SH_VERTEX_SHADER)
...@@ -668,7 +687,7 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec, ...@@ -668,7 +687,7 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
symbolTable.relateToOperator(COMMON_BUILTINS, "faceforward", EOpFaceForward); symbolTable.relateToOperator(COMMON_BUILTINS, "faceforward", EOpFaceForward);
symbolTable.relateToOperator(COMMON_BUILTINS, "reflect", EOpReflect); symbolTable.relateToOperator(COMMON_BUILTINS, "reflect", EOpReflect);
symbolTable.relateToOperator(COMMON_BUILTINS, "refract", EOpRefract); symbolTable.relateToOperator(COMMON_BUILTINS, "refract", EOpRefract);
symbolTable.relateToOperator(COMMON_BUILTINS, "any", EOpAny); symbolTable.relateToOperator(COMMON_BUILTINS, "any", EOpAny);
symbolTable.relateToOperator(COMMON_BUILTINS, "all", EOpAll); symbolTable.relateToOperator(COMMON_BUILTINS, "all", EOpAll);
symbolTable.relateToOperator(COMMON_BUILTINS, "not", EOpVectorLogicalNot); symbolTable.relateToOperator(COMMON_BUILTINS, "not", EOpVectorLogicalNot);
...@@ -678,7 +697,8 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec, ...@@ -678,7 +697,8 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
case SH_VERTEX_SHADER: case SH_VERTEX_SHADER:
break; break;
case SH_FRAGMENT_SHADER: case SH_FRAGMENT_SHADER:
if (resources.OES_standard_derivatives) { if (resources.OES_standard_derivatives)
{
symbolTable.relateToOperator(ESSL1_BUILTINS, "dFdx", EOpDFdx); symbolTable.relateToOperator(ESSL1_BUILTINS, "dFdx", EOpDFdx);
symbolTable.relateToOperator(ESSL1_BUILTINS, "dFdy", EOpDFdy); symbolTable.relateToOperator(ESSL1_BUILTINS, "dFdy", EOpDFdy);
symbolTable.relateToOperator(ESSL1_BUILTINS, "fwidth", EOpFwidth); symbolTable.relateToOperator(ESSL1_BUILTINS, "fwidth", EOpFwidth);
...@@ -687,6 +707,12 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec, ...@@ -687,6 +707,12 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
symbolTable.relateToExtension(ESSL1_BUILTINS, "dFdy", "GL_OES_standard_derivatives"); symbolTable.relateToExtension(ESSL1_BUILTINS, "dFdy", "GL_OES_standard_derivatives");
symbolTable.relateToExtension(ESSL1_BUILTINS, "fwidth", "GL_OES_standard_derivatives"); symbolTable.relateToExtension(ESSL1_BUILTINS, "fwidth", "GL_OES_standard_derivatives");
} }
if (resources.EXT_shader_texture_lod)
{
symbolTable.relateToExtension(ESSL1_BUILTINS, "texture2DLodEXT", "GL_EXT_shader_texture_lod");
symbolTable.relateToExtension(ESSL1_BUILTINS, "texture2DProjLodEXT", "GL_EXT_shader_texture_lod");
symbolTable.relateToExtension(ESSL1_BUILTINS, "textureCubeLodEXT", "GL_EXT_shader_texture_lod");
}
break; break;
default: break; default: break;
} }
...@@ -695,6 +721,13 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec, ...@@ -695,6 +721,13 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
symbolTable.relateToOperator(ESSL3_BUILTINS, "dFdy", EOpDFdy); symbolTable.relateToOperator(ESSL3_BUILTINS, "dFdy", EOpDFdy);
symbolTable.relateToOperator(ESSL3_BUILTINS, "fwidth", EOpFwidth); symbolTable.relateToOperator(ESSL3_BUILTINS, "fwidth", EOpFwidth);
if (resources.EXT_shader_texture_lod)
{
symbolTable.relateToExtension(ESSL1_BUILTINS, "texture2DGradEXT", "GL_EXT_shader_texture_lod");
symbolTable.relateToExtension(ESSL1_BUILTINS, "texture2DProjGradEXT", "GL_EXT_shader_texture_lod");
symbolTable.relateToExtension(ESSL1_BUILTINS, "textureCubeGradEXT", "GL_EXT_shader_texture_lod");
}
// Finally add resource-specific variables. // Finally add resource-specific variables.
switch(type) { switch(type) {
case SH_FRAGMENT_SHADER: case SH_FRAGMENT_SHADER:
...@@ -722,4 +755,6 @@ void InitExtensionBehavior(const ShBuiltInResources& resources, ...@@ -722,4 +755,6 @@ void InitExtensionBehavior(const ShBuiltInResources& resources,
extBehavior["GL_EXT_draw_buffers"] = EBhUndefined; extBehavior["GL_EXT_draw_buffers"] = EBhUndefined;
if (resources.EXT_frag_depth) if (resources.EXT_frag_depth)
extBehavior["GL_EXT_frag_depth"] = EBhUndefined; extBehavior["GL_EXT_frag_depth"] = EBhUndefined;
if (resources.EXT_shader_texture_lod)
extBehavior["GL_EXT_shader_texture_lod"] = EBhUndefined;
} }
...@@ -34,3 +34,24 @@ void TOutputGLSL::visitSymbol(TIntermSymbol* node) ...@@ -34,3 +34,24 @@ void TOutputGLSL::visitSymbol(TIntermSymbol* node)
TOutputGLSLBase::visitSymbol(node); TOutputGLSLBase::visitSymbol(node);
} }
} }
TString TOutputGLSL::translateTextureFunction(TString& name)
{
static const char *simpleRename[] = {
"texture2DLodEXT", "texture2DLod",
"texture2DProjLodEXT", "texture2DProjLod",
"textureCubeLodEXT", "textureCubeLod",
"texture2DGradEXT", "texture2DGradARB",
"texture2DProjGradEXT", "texture2DProjGradARB",
"textureCubeGradEXT", "textureCubeGradARB",
NULL, NULL
};
for (int i = 0; simpleRename[i] != NULL; i += 2) {
if (name == simpleRename[i]) {
return simpleRename[i+1];
}
}
return name;
}
...@@ -22,6 +22,7 @@ public: ...@@ -22,6 +22,7 @@ public:
protected: protected:
virtual bool writeVariablePrecision(TPrecision); virtual bool writeVariablePrecision(TPrecision);
virtual void visitSymbol(TIntermSymbol* node); virtual void visitSymbol(TIntermSymbol* node);
virtual TString translateTextureFunction(TString& name);
}; };
#endif // CROSSCOMPILERGLSL_OUTPUTGLSL_H_ #endif // CROSSCOMPILERGLSL_OUTPUTGLSL_H_
...@@ -801,7 +801,9 @@ TString TOutputGLSLBase::hashFunctionName(const TString& mangled_name) ...@@ -801,7 +801,9 @@ TString TOutputGLSLBase::hashFunctionName(const TString& mangled_name)
{ {
TString name = TFunction::unmangleName(mangled_name); TString name = TFunction::unmangleName(mangled_name);
if (mSymbolTable.findBuiltIn(mangled_name, mShaderVersion) != NULL || name == "main") if (mSymbolTable.findBuiltIn(mangled_name, mShaderVersion) != NULL || name == "main")
return name; {
return translateTextureFunction(name);
}
return hashName(name); return hashName(name);
} }
......
...@@ -51,6 +51,8 @@ protected: ...@@ -51,6 +51,8 @@ protected:
TString hashVariableName(const TString& name); TString hashVariableName(const TString& name);
// Same as hashName(), but without hashing built-in functions. // Same as hashName(), but without hashing built-in functions.
TString hashFunctionName(const TString& mangled_name); TString hashFunctionName(const TString& mangled_name);
// Used to translate function names for differences between ESSL and GLSL
virtual TString translateTextureFunction(TString& name) { return name; }
private: private:
bool structDeclared(const TStructure* structure) const; bool structDeclared(const TStructure* structure) const;
......
...@@ -2494,11 +2494,12 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -2494,11 +2494,12 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
textureFunction.method = TextureFunction::IMPLICIT; textureFunction.method = TextureFunction::IMPLICIT;
textureFunction.proj = true; textureFunction.proj = true;
} }
else if (name == "texture2DLod" || name == "textureCubeLod" || name == "textureLod") else if (name == "texture2DLod" || name == "textureCubeLod" || name == "textureLod" ||
name == "texture2DLodEXT" || name == "textureCubeLodEXT")
{ {
textureFunction.method = TextureFunction::LOD; textureFunction.method = TextureFunction::LOD;
} }
else if (name == "texture2DProjLod" || name == "textureProjLod") else if (name == "texture2DProjLod" || name == "textureProjLod" || name == "texture2DProjLodEXT")
{ {
textureFunction.method = TextureFunction::LOD; textureFunction.method = TextureFunction::LOD;
textureFunction.proj = true; textureFunction.proj = true;
...@@ -2523,11 +2524,6 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -2523,11 +2524,6 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
textureFunction.method = TextureFunction::LOD; textureFunction.method = TextureFunction::LOD;
textureFunction.offset = true; textureFunction.offset = true;
} }
else if (name == "textureProjLod")
{
textureFunction.method = TextureFunction::LOD;
textureFunction.proj = true;
}
else if (name == "textureProjLodOffset") else if (name == "textureProjLodOffset")
{ {
textureFunction.method = TextureFunction::LOD; textureFunction.method = TextureFunction::LOD;
...@@ -2543,7 +2539,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -2543,7 +2539,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
textureFunction.method = TextureFunction::FETCH; textureFunction.method = TextureFunction::FETCH;
textureFunction.offset = true; textureFunction.offset = true;
} }
else if (name == "textureGrad") else if (name == "textureGrad" || name == "texture2DGradEXT")
{ {
textureFunction.method = TextureFunction::GRAD; textureFunction.method = TextureFunction::GRAD;
} }
...@@ -2552,7 +2548,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -2552,7 +2548,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
textureFunction.method = TextureFunction::GRAD; textureFunction.method = TextureFunction::GRAD;
textureFunction.offset = true; textureFunction.offset = true;
} }
else if (name == "textureProjGrad") else if (name == "textureProjGrad" || name == "texture2DProjGradEXT" || name == "textureCubeGradEXT")
{ {
textureFunction.method = TextureFunction::GRAD; textureFunction.method = TextureFunction::GRAD;
textureFunction.proj = true; textureFunction.proj = true;
......
...@@ -89,6 +89,7 @@ void ShInitBuiltInResources(ShBuiltInResources* resources) ...@@ -89,6 +89,7 @@ void ShInitBuiltInResources(ShBuiltInResources* resources)
resources->ARB_texture_rectangle = 0; resources->ARB_texture_rectangle = 0;
resources->EXT_draw_buffers = 0; resources->EXT_draw_buffers = 0;
resources->EXT_frag_depth = 0; resources->EXT_frag_depth = 0;
resources->EXT_shader_texture_lod = 0;
// Disable highp precision in fragment shader by default. // Disable highp precision in fragment shader by default.
resources->FragmentPrecisionHigh = 0; resources->FragmentPrecisionHigh = 0;
......
...@@ -31,6 +31,9 @@ void TranslatorGLSL::translate(TIntermNode* root) { ...@@ -31,6 +31,9 @@ void TranslatorGLSL::translate(TIntermNode* root) {
// Write GLSL version. // Write GLSL version.
writeVersion(getShaderType(), root, sink); writeVersion(getShaderType(), root, sink);
// Write extension behaviour as needed
writeExtensionBehavior();
// Write emulated built-in functions if needed. // Write emulated built-in functions if needed.
getBuiltInFunctionEmulator().OutputEmulatedFunctionDefinition( getBuiltInFunctionEmulator().OutputEmulatedFunctionDefinition(
sink, false); sink, false);
...@@ -42,3 +45,20 @@ void TranslatorGLSL::translate(TIntermNode* root) { ...@@ -42,3 +45,20 @@ void TranslatorGLSL::translate(TIntermNode* root) {
TOutputGLSL outputGLSL(sink, getArrayIndexClampingStrategy(), getHashFunction(), getNameMap(), getSymbolTable(), getShaderVersion()); TOutputGLSL outputGLSL(sink, getArrayIndexClampingStrategy(), getHashFunction(), getNameMap(), getSymbolTable(), getShaderVersion());
root->traverse(&outputGLSL); root->traverse(&outputGLSL);
} }
void TranslatorGLSL::writeExtensionBehavior() {
TInfoSinkBase& sink = getInfoSink().obj;
const TExtensionBehavior& extensionBehavior = getExtensionBehavior();
for (TExtensionBehavior::const_iterator iter = extensionBehavior.begin();
iter != extensionBehavior.end(); ++iter) {
if (iter->second == EBhUndefined)
continue;
// For GLSL output, we don't need to emit most extensions explicitly,
// but some we need to translate.
if (iter->first == "GL_EXT_shader_texture_lod") {
sink << "#extension GL_ARB_shader_texture_lod : "
<< getBehaviorString(iter->second) << "\n";
}
}
}
\ No newline at end of file
...@@ -15,6 +15,9 @@ public: ...@@ -15,6 +15,9 @@ public:
protected: protected:
virtual void translate(TIntermNode* root); virtual void translate(TIntermNode* root);
private:
void writeExtensionBehavior();
}; };
#endif // COMPILER_TRANSLATORGLSL_H_ #endif // COMPILER_TRANSLATORGLSL_H_
...@@ -31,6 +31,15 @@ RestrictFragmentShaderTiming::RestrictFragmentShaderTiming(TInfoSinkBase& sink) ...@@ -31,6 +31,15 @@ RestrictFragmentShaderTiming::RestrictFragmentShaderTiming(TInfoSinkBase& sink)
mSamplingOps.insert("texture2DRect(1;vf2;"); mSamplingOps.insert("texture2DRect(1;vf2;");
mSamplingOps.insert("texture2DRectProj(1;vf3;"); mSamplingOps.insert("texture2DRectProj(1;vf3;");
mSamplingOps.insert("texture2DRectProj(1;vf4;"); mSamplingOps.insert("texture2DRectProj(1;vf4;");
// Sampling ops provided by EXT_shader_texture_lod.
mSamplingOps.insert("texture2DLodEXT(1;vf2;f1;");
mSamplingOps.insert("texture2DProjLodEXT(1;vf3;f1;");
mSamplingOps.insert("texture2DProjLodEXT(1;vf4;f1;");
mSamplingOps.insert("textureCubeLodEXT(1;vf4;f1;");
mSamplingOps.insert("texture2DGradEXT(1;vf2;vf2;vf2;");
mSamplingOps.insert("texture2DProjGradEXT(1;vf3;vf2;vf2;");
mSamplingOps.insert("texture2DProjGradEXT(1;vf4;vf2;vf2;");
mSamplingOps.insert("textureCubeGradEXT(1;vf3;vf3;vf3;");
} }
// FIXME(mvujovic): We do not know if the execution time of built-in operations like sin, pow, etc. // FIXME(mvujovic): We do not know if the execution time of built-in operations like sin, pow, etc.
......
...@@ -3812,6 +3812,7 @@ void Context::initExtensionString() ...@@ -3812,6 +3812,7 @@ void Context::initExtensionString()
mExtensionStringList.push_back("GL_EXT_read_format_bgra"); mExtensionStringList.push_back("GL_EXT_read_format_bgra");
mExtensionStringList.push_back("GL_EXT_robustness"); mExtensionStringList.push_back("GL_EXT_robustness");
mExtensionStringList.push_back("GL_EXT_shader_texture_lod");
if (supportsDXT1Textures()) if (supportsDXT1Textures())
{ {
......
...@@ -194,6 +194,7 @@ void Shader::initializeCompiler() ...@@ -194,6 +194,7 @@ void Shader::initializeCompiler()
resources.MaxDrawBuffers = mRenderer->getMaxRenderTargets(); resources.MaxDrawBuffers = mRenderer->getMaxRenderTargets();
resources.OES_standard_derivatives = mRenderer->getDerivativeInstructionSupport(); resources.OES_standard_derivatives = mRenderer->getDerivativeInstructionSupport();
resources.EXT_draw_buffers = mRenderer->getMaxRenderTargets() > 1; resources.EXT_draw_buffers = mRenderer->getMaxRenderTargets() > 1;
resources.EXT_shader_texture_lod = 1;
// resources.OES_EGL_image_external = mRenderer->getShareHandleSupport() ? 1 : 0; // TODO: commented out until the extension is actually supported. // resources.OES_EGL_image_external = mRenderer->getShareHandleSupport() ? 1 : 0; // TODO: commented out until the extension is actually supported.
resources.FragmentPrecisionHigh = 1; // Shader Model 2+ always supports FP24 (s16e7) which corresponds to highp resources.FragmentPrecisionHigh = 1; // Shader Model 2+ always supports FP24 (s16e7) which corresponds to highp
resources.EXT_frag_depth = 1; // Shader Model 2+ always supports explicit depth output resources.EXT_frag_depth = 1; // Shader Model 2+ always supports explicit depth output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment