Commit f6be8d7c by Jamie Madill

Fix typo in "PixelShaderOuputVariable".

Change-Id: I2b223c9b80faa3ff2a0f94bd52ca73edf3d67cf7 Reviewed-on: https://chromium-review.googlesource.com/216273Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent f9479eff
...@@ -108,7 +108,7 @@ void GetDefaultInputLayoutFromShader(const std::vector<sh::Attribute> &shaderAtt ...@@ -108,7 +108,7 @@ void GetDefaultInputLayoutFromShader(const std::vector<sh::Attribute> &shaderAtt
} }
} }
std::vector<GLenum> GetDefaultOutputLayoutFromShader(const std::vector<rx::PixelShaderOuputVariable> &shaderOutputVars) std::vector<GLenum> GetDefaultOutputLayoutFromShader(const std::vector<rx::PixelShaderOutputVariable> &shaderOutputVars)
{ {
std::vector<GLenum> defaultPixelOutput(1); std::vector<GLenum> defaultPixelOutput(1);
...@@ -1537,7 +1537,7 @@ bool ProgramBinary::save(GLenum *binaryFormat, void *binary, GLsizei bufSize, GL ...@@ -1537,7 +1537,7 @@ bool ProgramBinary::save(GLenum *binaryFormat, void *binary, GLsizei bufSize, GL
stream.writeInt(mPixelShaderKey.size()); stream.writeInt(mPixelShaderKey.size());
for (size_t pixelShaderKeyIndex = 0; pixelShaderKeyIndex < mPixelShaderKey.size(); pixelShaderKeyIndex++) for (size_t pixelShaderKeyIndex = 0; pixelShaderKeyIndex < mPixelShaderKey.size(); pixelShaderKeyIndex++)
{ {
const rx::PixelShaderOuputVariable &variable = mPixelShaderKey[pixelShaderKeyIndex]; const rx::PixelShaderOutputVariable &variable = mPixelShaderKey[pixelShaderKeyIndex];
stream.writeInt(variable.type); stream.writeInt(variable.type);
stream.writeString(variable.name); stream.writeString(variable.name);
stream.writeString(variable.source); stream.writeString(variable.source);
......
...@@ -296,7 +296,7 @@ class ProgramBinary : public RefCountObject ...@@ -296,7 +296,7 @@ class ProgramBinary : public RefCountObject
std::string mPixelHLSL; std::string mPixelHLSL;
rx::D3DWorkaroundType mPixelWorkarounds; rx::D3DWorkaroundType mPixelWorkarounds;
bool mUsesFragDepth; bool mUsesFragDepth;
std::vector<rx::PixelShaderOuputVariable> mPixelShaderKey; std::vector<rx::PixelShaderOutputVariable> mPixelShaderKey;
std::vector<PixelExecutable *> mPixelExecutables; std::vector<PixelExecutable *> mPixelExecutables;
rx::ShaderExecutable *mGeometryExecutable; rx::ShaderExecutable *mGeometryExecutable;
......
...@@ -70,7 +70,7 @@ std::string HLSLTypeString(GLenum type) ...@@ -70,7 +70,7 @@ std::string HLSLTypeString(GLenum type)
return HLSLComponentTypeString(gl::VariableComponentType(type), gl::VariableComponentCount(type)); return HLSLComponentTypeString(gl::VariableComponentType(type), gl::VariableComponentCount(type));
} }
const rx::PixelShaderOuputVariable &GetOutputAtLocation(const std::vector<rx::PixelShaderOuputVariable> &outputVariables, const rx::PixelShaderOutputVariable &GetOutputAtLocation(const std::vector<rx::PixelShaderOutputVariable> &outputVariables,
unsigned int location) unsigned int location)
{ {
for (size_t variableIndex = 0; variableIndex < outputVariables.size(); ++variableIndex) for (size_t variableIndex = 0; variableIndex < outputVariables.size(); ++variableIndex)
...@@ -427,7 +427,7 @@ std::string DynamicHLSL::generateVertexShaderForInputLayout(const std::string &s ...@@ -427,7 +427,7 @@ std::string DynamicHLSL::generateVertexShaderForInputLayout(const std::string &s
return vertexHLSL; return vertexHLSL;
} }
std::string DynamicHLSL::generatePixelShaderForOutputSignature(const std::string &sourceShader, const std::vector<PixelShaderOuputVariable> &outputVariables, std::string DynamicHLSL::generatePixelShaderForOutputSignature(const std::string &sourceShader, const std::vector<PixelShaderOutputVariable> &outputVariables,
bool usesFragDepth, const std::vector<GLenum> &outputLayout) const bool usesFragDepth, const std::vector<GLenum> &outputLayout) const
{ {
const int shaderModel = mRenderer->getMajorShaderModel(); const int shaderModel = mRenderer->getMajorShaderModel();
...@@ -445,7 +445,7 @@ std::string DynamicHLSL::generatePixelShaderForOutputSignature(const std::string ...@@ -445,7 +445,7 @@ std::string DynamicHLSL::generatePixelShaderForOutputSignature(const std::string
{ {
unsigned int location = (binding - GL_COLOR_ATTACHMENT0); unsigned int location = (binding - GL_COLOR_ATTACHMENT0);
const PixelShaderOuputVariable &outputVariable = GetOutputAtLocation(outputVariables, location); const PixelShaderOutputVariable &outputVariable = GetOutputAtLocation(outputVariables, location);
declarationHLSL += " " + HLSLTypeString(outputVariable.type) + " " + outputVariable.name + declarationHLSL += " " + HLSLTypeString(outputVariable.type) + " " + outputVariable.name +
" : " + targetSemantic + Str(layoutIndex) + ";\n"; " : " + targetSemantic + Str(layoutIndex) + ";\n";
...@@ -662,7 +662,7 @@ bool DynamicHLSL::generateShaderLinkHLSL(InfoLog &infoLog, int registers, const ...@@ -662,7 +662,7 @@ bool DynamicHLSL::generateShaderLinkHLSL(InfoLog &infoLog, int registers, const
const std::vector<std::string>& transformFeedbackVaryings, const std::vector<std::string>& transformFeedbackVaryings,
std::vector<LinkedVarying> *linkedVaryings, std::vector<LinkedVarying> *linkedVaryings,
std::map<int, VariableLocation> *programOutputVars, std::map<int, VariableLocation> *programOutputVars,
std::vector<PixelShaderOuputVariable> *outPixelShaderKey, std::vector<PixelShaderOutputVariable> *outPixelShaderKey,
bool *outUsesFragDepth) const bool *outUsesFragDepth) const
{ {
if (pixelHLSL.empty() || vertexHLSL.empty()) if (pixelHLSL.empty() || vertexHLSL.empty())
...@@ -830,7 +830,7 @@ bool DynamicHLSL::generateShaderLinkHLSL(InfoLog &infoLog, int registers, const ...@@ -830,7 +830,7 @@ bool DynamicHLSL::generateShaderLinkHLSL(InfoLog &infoLog, int registers, const
{ {
for (unsigned int renderTargetIndex = 0; renderTargetIndex < numRenderTargets; renderTargetIndex++) for (unsigned int renderTargetIndex = 0; renderTargetIndex < numRenderTargets; renderTargetIndex++)
{ {
PixelShaderOuputVariable outputKeyVariable; PixelShaderOutputVariable outputKeyVariable;
outputKeyVariable.type = GL_FLOAT_VEC4; outputKeyVariable.type = GL_FLOAT_VEC4;
outputKeyVariable.name = "gl_Color" + Str(renderTargetIndex); outputKeyVariable.name = "gl_Color" + Str(renderTargetIndex);
outputKeyVariable.source = broadcast ? "gl_Color[0]" : "gl_Color[" + Str(renderTargetIndex) + "]"; outputKeyVariable.source = broadcast ? "gl_Color[0]" : "gl_Color[" + Str(renderTargetIndex) + "]";
...@@ -855,7 +855,7 @@ bool DynamicHLSL::generateShaderLinkHLSL(InfoLog &infoLog, int registers, const ...@@ -855,7 +855,7 @@ bool DynamicHLSL::generateShaderLinkHLSL(InfoLog &infoLog, int registers, const
ASSERT(outputVariable.staticUse); ASSERT(outputVariable.staticUse);
PixelShaderOuputVariable outputKeyVariable; PixelShaderOutputVariable outputKeyVariable;
outputKeyVariable.type = outputVariable.type; outputKeyVariable.type = outputVariable.type;
outputKeyVariable.name = variableName + elementString; outputKeyVariable.name = variableName + elementString;
outputKeyVariable.source = variableName + ArrayString(outputLocation.element); outputKeyVariable.source = variableName + ArrayString(outputLocation.element);
......
...@@ -45,7 +45,7 @@ class ShaderD3D; ...@@ -45,7 +45,7 @@ class ShaderD3D;
typedef const gl::PackedVarying *VaryingPacking[gl::IMPLEMENTATION_MAX_VARYING_VECTORS][4]; typedef const gl::PackedVarying *VaryingPacking[gl::IMPLEMENTATION_MAX_VARYING_VECTORS][4];
struct PixelShaderOuputVariable struct PixelShaderOutputVariable
{ {
GLenum type; GLenum type;
std::string name; std::string name;
...@@ -62,7 +62,7 @@ class DynamicHLSL ...@@ -62,7 +62,7 @@ class DynamicHLSL
rx::ShaderD3D *vertexShader, const std::vector<std::string>& transformFeedbackVaryings); rx::ShaderD3D *vertexShader, const std::vector<std::string>& transformFeedbackVaryings);
std::string generateVertexShaderForInputLayout(const std::string &sourceShader, const gl::VertexFormat inputLayout[], std::string generateVertexShaderForInputLayout(const std::string &sourceShader, const gl::VertexFormat inputLayout[],
const sh::Attribute shaderAttributes[]) const; const sh::Attribute shaderAttributes[]) const;
std::string generatePixelShaderForOutputSignature(const std::string &sourceShader, const std::vector<PixelShaderOuputVariable> &outputVariables, std::string generatePixelShaderForOutputSignature(const std::string &sourceShader, const std::vector<PixelShaderOutputVariable> &outputVariables,
bool usesFragDepth, const std::vector<GLenum> &outputLayout) const; bool usesFragDepth, const std::vector<GLenum> &outputLayout) const;
bool generateShaderLinkHLSL(gl::InfoLog &infoLog, int registers, const VaryingPacking packing, bool generateShaderLinkHLSL(gl::InfoLog &infoLog, int registers, const VaryingPacking packing,
std::string& pixelHLSL, std::string& vertexHLSL, std::string& pixelHLSL, std::string& vertexHLSL,
...@@ -70,7 +70,7 @@ class DynamicHLSL ...@@ -70,7 +70,7 @@ class DynamicHLSL
const std::vector<std::string>& transformFeedbackVaryings, const std::vector<std::string>& transformFeedbackVaryings,
std::vector<gl::LinkedVarying> *linkedVaryings, std::vector<gl::LinkedVarying> *linkedVaryings,
std::map<int, gl::VariableLocation> *programOutputVars, std::map<int, gl::VariableLocation> *programOutputVars,
std::vector<PixelShaderOuputVariable> *outPixelShaderKey, std::vector<PixelShaderOutputVariable> *outPixelShaderKey,
bool *outUsesFragDepth) const; bool *outUsesFragDepth) const;
std::string generateGeometryShaderHLSL(int registers, rx::ShaderD3D *fragmentShader, rx::ShaderD3D *vertexShader) const; std::string generateGeometryShaderHLSL(int registers, rx::ShaderD3D *fragmentShader, rx::ShaderD3D *vertexShader) const;
......
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