Commit 0456c5d5 by Nicolas Capens Committed by Nicolas Capens

Remove unused shader compiler code.

BUG=14600811 Change-Id: I09f18c61e94b46592e2c0bd1905a668c94ed1c16 Reviewed-on: https://swiftshader-review.googlesource.com/1080Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent bf65575e
...@@ -114,9 +114,6 @@ bool TCompiler::compile(const char* const shaderStrings[], ...@@ -114,9 +114,6 @@ bool TCompiler::compile(const char* const shaderStrings[],
if (success && (compileOptions & SH_VALIDATE_LOOP_INDEXING)) if (success && (compileOptions & SH_VALIDATE_LOOP_INDEXING))
success = validateLimitations(root); success = validateLimitations(root);
if (success && (compileOptions & SH_ATTRIBUTES_UNIFORMS))
collectAttribsUniforms(root);
if (success && (compileOptions & SH_INTERMEDIATE_TREE)) if (success && (compileOptions & SH_INTERMEDIATE_TREE))
intermediate.outputTree(root); intermediate.outputTree(root);
...@@ -181,9 +178,6 @@ void TCompiler::clearResults() ...@@ -181,9 +178,6 @@ void TCompiler::clearResults()
infoSink.info.erase(); infoSink.info.erase();
infoSink.obj.erase(); infoSink.obj.erase();
infoSink.debug.erase(); infoSink.debug.erase();
attribs.clear();
uniforms.clear();
} }
bool TCompiler::validateCallDepth(TIntermNode *root, TInfoSink &infoSink) bool TCompiler::validateCallDepth(TIntermNode *root, TInfoSink &infoSink)
...@@ -220,12 +214,6 @@ bool TCompiler::validateLimitations(TIntermNode* root) { ...@@ -220,12 +214,6 @@ bool TCompiler::validateLimitations(TIntermNode* root) {
return validate.numErrors() == 0; return validate.numErrors() == 0;
} }
void TCompiler::collectAttribsUniforms(TIntermNode* root)
{
CollectAttribsUniforms collect(attribs, uniforms);
root->traverse(&collect);
}
const TExtensionBehavior& TCompiler::getExtensionBehavior() const const TExtensionBehavior& TCompiler::getExtensionBehavior() const
{ {
return extensionBehavior; return extensionBehavior;
......
...@@ -123,14 +123,12 @@ ...@@ -123,14 +123,12 @@
<ClCompile Include="parseConst.cpp" /> <ClCompile Include="parseConst.cpp" />
<ClCompile Include="ParseHelper.cpp" /> <ClCompile Include="ParseHelper.cpp" />
<ClCompile Include="PoolAlloc.cpp" /> <ClCompile Include="PoolAlloc.cpp" />
<ClCompile Include="QualifierAlive.cpp" />
<ClCompile Include="RemoveTree.cpp" /> <ClCompile Include="RemoveTree.cpp" />
<ClCompile Include="ShaderLang.cpp" /> <ClCompile Include="ShaderLang.cpp" />
<ClCompile Include="SymbolTable.cpp" /> <ClCompile Include="SymbolTable.cpp" />
<ClCompile Include="TranslatorASM.cpp" /> <ClCompile Include="TranslatorASM.cpp" />
<ClCompile Include="util.cpp" /> <ClCompile Include="util.cpp" />
<ClCompile Include="ValidateLimitations.cpp" /> <ClCompile Include="ValidateLimitations.cpp" />
<ClCompile Include="VariableInfo.cpp" />
<ClCompile Include="glslang_lex.cpp" /> <ClCompile Include="glslang_lex.cpp" />
<ClCompile Include="glslang_tab.cpp" /> <ClCompile Include="glslang_tab.cpp" />
</ItemGroup> </ItemGroup>
...@@ -194,7 +192,6 @@ ...@@ -194,7 +192,6 @@
<ClInclude Include="ParseHelper.h" /> <ClInclude Include="ParseHelper.h" />
<ClInclude Include="PoolAlloc.h" /> <ClInclude Include="PoolAlloc.h" />
<ClInclude Include="Pragma.h" /> <ClInclude Include="Pragma.h" />
<ClInclude Include="QualifierAlive.h" />
<ClInclude Include="RemoveTree.h" /> <ClInclude Include="RemoveTree.h" />
<ClInclude Include="ShHandle.h" /> <ClInclude Include="ShHandle.h" />
<ClInclude Include="SymbolTable.h" /> <ClInclude Include="SymbolTable.h" />
...@@ -202,7 +199,6 @@ ...@@ -202,7 +199,6 @@
<ClInclude Include="Types.h" /> <ClInclude Include="Types.h" />
<ClInclude Include="util.h" /> <ClInclude Include="util.h" />
<ClInclude Include="ValidateLimitations.h" /> <ClInclude Include="ValidateLimitations.h" />
<ClInclude Include="VariableInfo.h" />
<ClInclude Include="glslang_tab.h" /> <ClInclude Include="glslang_tab.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -50,9 +50,6 @@ ...@@ -50,9 +50,6 @@
<ClCompile Include="PoolAlloc.cpp"> <ClCompile Include="PoolAlloc.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="QualifierAlive.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="RemoveTree.cpp"> <ClCompile Include="RemoveTree.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
...@@ -68,9 +65,6 @@ ...@@ -68,9 +65,6 @@
<ClCompile Include="ValidateLimitations.cpp"> <ClCompile Include="ValidateLimitations.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="VariableInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="glslang_lex.cpp"> <ClCompile Include="glslang_lex.cpp">
<Filter>Source Files\generated</Filter> <Filter>Source Files\generated</Filter>
</ClCompile> </ClCompile>
...@@ -142,9 +136,6 @@ ...@@ -142,9 +136,6 @@
<ClInclude Include="PoolAlloc.h"> <ClInclude Include="PoolAlloc.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="QualifierAlive.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="RemoveTree.h"> <ClInclude Include="RemoveTree.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
...@@ -163,9 +154,6 @@ ...@@ -163,9 +154,6 @@
<ClInclude Include="ValidateLimitations.h"> <ClInclude Include="ValidateLimitations.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="VariableInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="glslang_tab.h"> <ClInclude Include="glslang_tab.h">
<Filter>Header Files\generated</Filter> <Filter>Header Files\generated</Filter>
</ClInclude> </ClInclude>
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <algorithm> #include <algorithm>
#include "compiler/localintermediate.h" #include "compiler/localintermediate.h"
#include "compiler/QualifierAlive.h"
#include "compiler/RemoveTree.h" #include "compiler/RemoveTree.h"
#include "compiler/SymbolTable.h" #include "compiler/SymbolTable.h"
......
//
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "compiler/intermediate.h"
class TAliveTraverser : public TIntermTraverser {
public:
TAliveTraverser(TQualifier q) : TIntermTraverser(true, false, false, true), found(false), qualifier(q)
{
}
bool wasFound() { return found; }
protected:
bool found;
TQualifier qualifier;
void visitSymbol(TIntermSymbol*);
bool visitSelection(Visit, TIntermSelection*);
};
//
// Report whether or not a variable of the given qualifier type
// is guaranteed written. Not always possible to determine if
// it is written conditionally.
//
// ?? It does not do this well yet, this is just a place holder
// that simply determines if it was reference at all, anywhere.
//
bool QualifierWritten(TIntermNode* node, TQualifier qualifier)
{
TAliveTraverser it(qualifier);
if (node)
node->traverse(&it);
return it.wasFound();
}
void TAliveTraverser::visitSymbol(TIntermSymbol* node)
{
//
// If it's what we're looking for, record it.
//
if (node->getQualifier() == qualifier)
found = true;
}
bool TAliveTraverser::visitSelection(Visit preVisit, TIntermSelection* node)
{
if (wasFound())
return false;
return true;
}
//
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
bool QualifierWritten(TIntermNode* root, TQualifier);
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "compiler/ExtensionBehavior.h" #include "compiler/ExtensionBehavior.h"
#include "compiler/InfoSink.h" #include "compiler/InfoSink.h"
#include "compiler/SymbolTable.h" #include "compiler/SymbolTable.h"
#include "compiler/VariableInfo.h"
class TCompiler; class TCompiler;
...@@ -55,8 +54,6 @@ public: ...@@ -55,8 +54,6 @@ public:
// Get results of the last compilation. // Get results of the last compilation.
TInfoSink& getInfoSink() { return infoSink; } TInfoSink& getInfoSink() { return infoSink; }
const TVariableInfoList& getAttribs() const { return attribs; }
const TVariableInfoList& getUniforms() const { return uniforms; }
protected: protected:
ShShaderType getShaderType() const { return shaderType; } ShShaderType getShaderType() const { return shaderType; }
...@@ -70,8 +67,6 @@ protected: ...@@ -70,8 +67,6 @@ protected:
// Returns true if the given shader does not exceed the minimum // Returns true if the given shader does not exceed the minimum
// functionality mandated in GLSL 1.0 spec Appendix A. // functionality mandated in GLSL 1.0 spec Appendix A.
bool validateLimitations(TIntermNode *root); bool validateLimitations(TIntermNode *root);
// Collect info for all attribs and uniforms.
void collectAttribsUniforms(TIntermNode *root);
// Translate to object code. // Translate to object code.
virtual bool translate(TIntermNode *root) = 0; virtual bool translate(TIntermNode *root) = 0;
// Get built-in extensions with default behavior. // Get built-in extensions with default behavior.
...@@ -91,8 +86,6 @@ private: ...@@ -91,8 +86,6 @@ private:
// Results of compilation. // Results of compilation.
TInfoSink infoSink; // Output sink. TInfoSink infoSink; // Output sink.
TVariableInfoList attribs; // Active attributes in the compiled shader.
TVariableInfoList uniforms; // Active uniforms in the compiled shader.
}; };
// //
......
...@@ -18,58 +18,6 @@ ...@@ -18,58 +18,6 @@
#include <limits.h> #include <limits.h>
// //
// This is the platform independent interface between an OGL driver
// and the shading language compiler.
//
static bool checkActiveUniformAndAttribMaxLengths(const ShHandle handle,
int expectedValue)
{
int activeUniformLimit = 0;
ShGetInfo(handle, SH_ACTIVE_UNIFORM_MAX_LENGTH, &activeUniformLimit);
int activeAttribLimit = 0;
ShGetInfo(handle, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, &activeAttribLimit);
return (expectedValue == activeUniformLimit && expectedValue == activeAttribLimit);
}
static void getVariableInfo(ShShaderInfo varType,
const ShHandle handle,
int index,
int* length,
int* size,
ShDataType* type,
char* name)
{
if (!handle || !size || !type || !name)
return;
ASSERT((varType == SH_ACTIVE_ATTRIBUTES) ||
(varType == SH_ACTIVE_UNIFORMS));
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
TCompiler* compiler = base->getAsCompiler();
if (compiler == 0)
return;
const TVariableInfoList& varList = varType == SH_ACTIVE_ATTRIBUTES ?
compiler->getAttribs() : compiler->getUniforms();
if (index < 0 || index >= static_cast<int>(varList.size()))
return;
const TVariableInfo& varInfo = varList[index];
if (length) *length = varInfo.name.size();
*size = varInfo.size;
*type = varInfo.type;
// This size must match that queried by
// SH_ACTIVE_UNIFORM_MAX_LENGTH and SH_ACTIVE_ATTRIBUTE_MAX_LENGTH
// in ShGetInfo, below.
int activeUniformAndAttribLength = 1 + MAX_SYMBOL_NAME_LEN;
ASSERT(checkActiveUniformAndAttribMaxLengths(handle, activeUniformAndAttribLength));
strncpy(name, varInfo.name.c_str(), activeUniformAndAttribLength);
name[activeUniformAndAttribLength - 1] = 0;
}
//
// Driver must call this first, once, before doing any other // Driver must call this first, once, before doing any other
// compiler operations. // compiler operations.
// //
...@@ -194,15 +142,9 @@ void ShGetInfo(const ShHandle handle, ShShaderInfo pname, int* params) ...@@ -194,15 +142,9 @@ void ShGetInfo(const ShHandle handle, ShShaderInfo pname, int* params)
case SH_OBJECT_CODE_LENGTH: case SH_OBJECT_CODE_LENGTH:
*params = compiler->getInfoSink().obj.size() + 1; *params = compiler->getInfoSink().obj.size() + 1;
break; break;
case SH_ACTIVE_UNIFORMS:
*params = compiler->getUniforms().size();
break;
case SH_ACTIVE_UNIFORM_MAX_LENGTH: case SH_ACTIVE_UNIFORM_MAX_LENGTH:
*params = 1 + MAX_SYMBOL_NAME_LEN; *params = 1 + MAX_SYMBOL_NAME_LEN;
break; break;
case SH_ACTIVE_ATTRIBUTES:
*params = compiler->getAttribs().size();
break;
case SH_ACTIVE_ATTRIBUTE_MAX_LENGTH: case SH_ACTIVE_ATTRIBUTE_MAX_LENGTH:
*params = 1 + MAX_SYMBOL_NAME_LEN; *params = 1 + MAX_SYMBOL_NAME_LEN;
break; break;
...@@ -241,25 +183,3 @@ void ShGetObjectCode(const ShHandle handle, char* objCode) ...@@ -241,25 +183,3 @@ void ShGetObjectCode(const ShHandle handle, char* objCode)
TInfoSink& infoSink = compiler->getInfoSink(); TInfoSink& infoSink = compiler->getInfoSink();
strcpy(objCode, infoSink.obj.c_str()); strcpy(objCode, infoSink.obj.c_str());
} }
void ShGetActiveAttrib(const ShHandle handle,
int index,
int* length,
int* size,
ShDataType* type,
char* name)
{
getVariableInfo(SH_ACTIVE_ATTRIBUTES,
handle, index, length, size, type, name);
}
void ShGetActiveUniform(const ShHandle handle,
int index,
int* length,
int* size,
ShDataType* type,
char* name)
{
getVariableInfo(SH_ACTIVE_UNIFORMS,
handle, index, length, size, type, name);
}
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "compiler/VariableInfo.h"
static TString arrayBrackets(int index)
{
TStringStream stream;
stream << "[" << index << "]";
return stream.str();
}
// Returns the data type for an attribute or uniform.
static ShDataType getVariableDataType(const TType& type)
{
switch (type.getBasicType()) {
case EbtFloat:
if (type.isMatrix()) {
switch (type.getNominalSize()) {
case 2: return SH_FLOAT_MAT2;
case 3: return SH_FLOAT_MAT3;
case 4: return SH_FLOAT_MAT4;
default: UNREACHABLE();
}
} else if (type.isVector()) {
switch (type.getNominalSize()) {
case 2: return SH_FLOAT_VEC2;
case 3: return SH_FLOAT_VEC3;
case 4: return SH_FLOAT_VEC4;
default: UNREACHABLE();
}
} else {
return SH_FLOAT;
}
case EbtInt:
if (type.isMatrix()) {
UNREACHABLE();
} else if (type.isVector()) {
switch (type.getNominalSize()) {
case 2: return SH_INT_VEC2;
case 3: return SH_INT_VEC3;
case 4: return SH_INT_VEC4;
default: UNREACHABLE();
}
} else {
return SH_INT;
}
case EbtBool:
if (type.isMatrix()) {
UNREACHABLE();
} else if (type.isVector()) {
switch (type.getNominalSize()) {
case 2: return SH_BOOL_VEC2;
case 3: return SH_BOOL_VEC3;
case 4: return SH_BOOL_VEC4;
default: UNREACHABLE();
}
} else {
return SH_BOOL;
}
case EbtSampler2D: return SH_SAMPLER_2D;
case EbtSamplerCube: return SH_SAMPLER_CUBE;
case EbtSamplerExternalOES: return SH_SAMPLER_EXTERNAL_OES;
default: UNREACHABLE();
}
return SH_NONE;
}
static void getBuiltInVariableInfo(const TType& type,
const TString& name,
TVariableInfoList& infoList);
static void getUserDefinedVariableInfo(const TType& type,
const TString& name,
TVariableInfoList& infoList);
// Returns info for an attribute or uniform.
static void getVariableInfo(const TType& type,
const TString& name,
TVariableInfoList& infoList)
{
if (type.getBasicType() == EbtStruct) {
if (type.isArray()) {
for (int i = 0; i < type.getArraySize(); ++i) {
TString lname = name + arrayBrackets(i);
getUserDefinedVariableInfo(type, lname, infoList);
}
} else {
getUserDefinedVariableInfo(type, name, infoList);
}
} else {
getBuiltInVariableInfo(type, name, infoList);
}
}
void getBuiltInVariableInfo(const TType& type,
const TString& name,
TVariableInfoList& infoList)
{
ASSERT(type.getBasicType() != EbtStruct);
TVariableInfo varInfo;
if (type.isArray()) {
varInfo.name = (name + "[0]").c_str();
varInfo.size = type.getArraySize();
} else {
varInfo.name = name.c_str();
varInfo.size = 1;
}
varInfo.type = getVariableDataType(type);
infoList.push_back(varInfo);
}
void getUserDefinedVariableInfo(const TType& type,
const TString& name,
TVariableInfoList& infoList)
{
ASSERT(type.getBasicType() == EbtStruct);
const TTypeList* structure = type.getStruct();
for (size_t i = 0; i < structure->size(); ++i) {
const TType* fieldType = (*structure)[i].type;
getVariableInfo(*fieldType,
name + "." + fieldType->getFieldName(),
infoList);
}
}
CollectAttribsUniforms::CollectAttribsUniforms(TVariableInfoList& attribs,
TVariableInfoList& uniforms)
: mAttribs(attribs),
mUniforms(uniforms)
{
}
// We are only interested in attribute and uniform variable declaration.
void CollectAttribsUniforms::visitSymbol(TIntermSymbol*)
{
}
void CollectAttribsUniforms::visitConstantUnion(TIntermConstantUnion*)
{
}
bool CollectAttribsUniforms::visitBinary(Visit, TIntermBinary*)
{
return false;
}
bool CollectAttribsUniforms::visitUnary(Visit, TIntermUnary*)
{
return false;
}
bool CollectAttribsUniforms::visitSelection(Visit, TIntermSelection*)
{
return false;
}
bool CollectAttribsUniforms::visitAggregate(Visit, TIntermAggregate* node)
{
bool visitChildren = false;
switch (node->getOp())
{
case EOpSequence:
// We need to visit sequence children to get to variable declarations.
visitChildren = true;
break;
case EOpDeclaration: {
const TIntermSequence& sequence = node->getSequence();
TQualifier qualifier = sequence.front()->getAsTyped()->getQualifier();
if (qualifier == EvqAttribute || qualifier == EvqUniform)
{
TVariableInfoList& infoList = qualifier == EvqAttribute ?
mAttribs : mUniforms;
for (TIntermSequence::const_iterator i = sequence.begin();
i != sequence.end(); ++i)
{
const TIntermSymbol* variable = (*i)->getAsSymbolNode();
// The only case in which the sequence will not contain a
// TIntermSymbol node is initialization. It will contain a
// TInterBinary node in that case. Since attributes and unifroms
// cannot be initialized in a shader, we must have only
// TIntermSymbol nodes in the sequence.
ASSERT(variable != NULL);
getVariableInfo(variable->getType(),
variable->getSymbol(),
infoList);
}
}
break;
}
default: break;
}
return visitChildren;
}
bool CollectAttribsUniforms::visitLoop(Visit, TIntermLoop*)
{
return false;
}
bool CollectAttribsUniforms::visitBranch(Visit, TIntermBranch*)
{
return false;
}
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef COMPILER_VARIABLE_INFO_H_
#define COMPILER_VARIABLE_INFO_H_
#include "GLSLANG/ShaderLang.h"
#include "compiler/intermediate.h"
// Provides information about a variable.
// It is currently being used to store info about active attribs and uniforms.
struct TVariableInfo {
TPersistString name;
ShDataType type;
int size;
};
typedef std::vector<TVariableInfo> TVariableInfoList;
// Traverses intermediate tree to collect all attributes and uniforms.
class CollectAttribsUniforms : public TIntermTraverser {
public:
CollectAttribsUniforms(TVariableInfoList& attribs,
TVariableInfoList& uniforms);
virtual void visitSymbol(TIntermSymbol*);
virtual void visitConstantUnion(TIntermConstantUnion*);
virtual bool visitBinary(Visit, TIntermBinary*);
virtual bool visitUnary(Visit, TIntermUnary*);
virtual bool visitSelection(Visit, TIntermSelection*);
virtual bool visitAggregate(Visit, TIntermAggregate*);
virtual bool visitLoop(Visit, TIntermLoop*);
virtual bool visitBranch(Visit, TIntermBranch*);
private:
TVariableInfoList& mAttribs;
TVariableInfoList& mUniforms;
};
#endif // COMPILER_VARIABLE_INFO_H_
...@@ -36,33 +36,9 @@ typedef enum { ...@@ -36,33 +36,9 @@ typedef enum {
} ShShaderSpec; } ShShaderSpec;
typedef enum { typedef enum {
SH_NONE = 0,
SH_INT = 0x1404,
SH_FLOAT = 0x1406,
SH_FLOAT_VEC2 = 0x8B50,
SH_FLOAT_VEC3 = 0x8B51,
SH_FLOAT_VEC4 = 0x8B52,
SH_INT_VEC2 = 0x8B53,
SH_INT_VEC3 = 0x8B54,
SH_INT_VEC4 = 0x8B55,
SH_BOOL = 0x8B56,
SH_BOOL_VEC2 = 0x8B57,
SH_BOOL_VEC3 = 0x8B58,
SH_BOOL_VEC4 = 0x8B59,
SH_FLOAT_MAT2 = 0x8B5A,
SH_FLOAT_MAT3 = 0x8B5B,
SH_FLOAT_MAT4 = 0x8B5C,
SH_SAMPLER_2D = 0x8B5E,
SH_SAMPLER_CUBE = 0x8B60,
SH_SAMPLER_EXTERNAL_OES = 0x8D66
} ShDataType;
typedef enum {
SH_INFO_LOG_LENGTH = 0x8B84, SH_INFO_LOG_LENGTH = 0x8B84,
SH_OBJECT_CODE_LENGTH = 0x8B88, // GL_SHADER_SOURCE_LENGTH SH_OBJECT_CODE_LENGTH = 0x8B88, // GL_SHADER_SOURCE_LENGTH
SH_ACTIVE_UNIFORMS = 0x8B86,
SH_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, SH_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87,
SH_ACTIVE_ATTRIBUTES = 0x8B89,
SH_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A SH_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A
} ShShaderInfo; } ShShaderInfo;
...@@ -216,60 +192,6 @@ void ShGetInfoLog(const ShHandle handle, char* infoLog); ...@@ -216,60 +192,6 @@ void ShGetInfoLog(const ShHandle handle, char* infoLog);
// ShGetInfo with SH_OBJECT_CODE_LENGTH. // ShGetInfo with SH_OBJECT_CODE_LENGTH.
void ShGetObjectCode(const ShHandle handle, char* objCode); void ShGetObjectCode(const ShHandle handle, char* objCode);
// Returns information about an active attribute variable.
// Parameters:
// handle: Specifies the compiler
// index: Specifies the index of the attribute variable to be queried.
// length: Returns the number of characters actually written in the string
// indicated by name (excluding the null terminator) if a value other
// than NULL is passed.
// size: Returns the size of the attribute variable.
// type: Returns the data type of the attribute variable.
// name: Returns a null terminated string containing the name of the
// attribute variable. It is assumed that name has enough memory to
// accomodate the attribute variable name. The size of the buffer
// required to store the attribute variable name can be obtained by
// calling ShGetInfo with SH_ACTIVE_ATTRIBUTE_MAX_LENGTH.
// mappedName: Returns a null terminated string containing the mapped name of
// the attribute variable, It is assumed that mappedName has enough
// memory (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care
// about the mapped name. If the name is not mapped, then name and
// mappedName are the same.
void ShGetActiveAttrib(const ShHandle handle,
int index,
int* length,
int* size,
ShDataType* type,
char* name,
char* mappedName);
// Returns information about an active uniform variable.
// Parameters:
// handle: Specifies the compiler
// index: Specifies the index of the uniform variable to be queried.
// length: Returns the number of characters actually written in the string
// indicated by name (excluding the null terminator) if a value
// other than NULL is passed.
// size: Returns the size of the uniform variable.
// type: Returns the data type of the uniform variable.
// name: Returns a null terminated string containing the name of the
// uniform variable. It is assumed that name has enough memory to
// accomodate the uniform variable name. The size of the buffer required
// to store the uniform variable name can be obtained by calling
// ShGetInfo with SH_ACTIVE_UNIFORMS_MAX_LENGTH.
// mappedName: Returns a null terminated string containing the mapped name of
// the uniform variable, It is assumed that mappedName has enough
// memory (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care
// about the mapped name. If the name is not mapped, then name and
// mappedName are the same.
void ShGetActiveUniform(const ShHandle handle,
int index,
int* length,
int* size,
ShDataType* type,
char* name,
char* mappedName);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -171,8 +171,6 @@ ...@@ -171,8 +171,6 @@
<Unit filename="../compiler/PoolAlloc.cpp" /> <Unit filename="../compiler/PoolAlloc.cpp" />
<Unit filename="../compiler/PoolAlloc.h" /> <Unit filename="../compiler/PoolAlloc.h" />
<Unit filename="../compiler/Pragma.h" /> <Unit filename="../compiler/Pragma.h" />
<Unit filename="../compiler/QualifierAlive.cpp" />
<Unit filename="../compiler/QualifierAlive.h" />
<Unit filename="../compiler/RemoveTree.cpp" /> <Unit filename="../compiler/RemoveTree.cpp" />
<Unit filename="../compiler/RemoveTree.h" /> <Unit filename="../compiler/RemoveTree.h" />
<Unit filename="../compiler/ShHandle.h" /> <Unit filename="../compiler/ShHandle.h" />
...@@ -184,8 +182,6 @@ ...@@ -184,8 +182,6 @@
<Unit filename="../compiler/Types.h" /> <Unit filename="../compiler/Types.h" />
<Unit filename="../compiler/ValidateLimitations.cpp" /> <Unit filename="../compiler/ValidateLimitations.cpp" />
<Unit filename="../compiler/ValidateLimitations.h" /> <Unit filename="../compiler/ValidateLimitations.h" />
<Unit filename="../compiler/VariableInfo.cpp" />
<Unit filename="../compiler/VariableInfo.h" />
<Unit filename="../compiler/debug.cpp" /> <Unit filename="../compiler/debug.cpp" />
<Unit filename="../compiler/debug.h" /> <Unit filename="../compiler/debug.h" />
<Unit filename="../compiler/glslang.h" /> <Unit filename="../compiler/glslang.h" />
......
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