OSDN Git Service

Remove VertexProcessor shader constants mechanism
authorChris Forbes <chrisforbes@google.com>
Sun, 10 Feb 2019 20:58:46 +0000 (20:58 +0000)
committerChris Forbes <chrisforbes@google.com>
Fri, 15 Feb 2019 19:32:32 +0000 (19:32 +0000)
Bug: b/124177079
Change-Id: I5293ed6c564219f7a47baea7b62240b3104bd1f9
Reviewed-on: https://swiftshader-review.googlesource.com/c/24592
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>

src/Device/VertexProcessor.cpp
src/Device/VertexProcessor.hpp

index 854c023..16a38d0 100644 (file)
@@ -92,39 +92,6 @@ namespace sw
                }
        }
 
-       void VertexProcessor::setFloatConstant(unsigned int index, const float value[4])
-       {
-               if(index < VERTEX_UNIFORM_VECTORS)
-               {
-                       c[index][0] = value[0];
-                       c[index][1] = value[1];
-                       c[index][2] = value[2];
-                       c[index][3] = value[3];
-               }
-               else ASSERT(false);
-       }
-
-       void VertexProcessor::setIntegerConstant(unsigned int index, const int integer[4])
-       {
-               if(index < 16)
-               {
-                       i[index][0] = integer[0];
-                       i[index][1] = integer[1];
-                       i[index][2] = integer[2];
-                       i[index][3] = integer[3];
-               }
-               else ASSERT(false);
-       }
-
-       void VertexProcessor::setBooleanConstant(unsigned int index, int boolean)
-       {
-               if(index < 16)
-               {
-                       b[index] = boolean != 0;
-               }
-               else ASSERT(false);
-       }
-
        void VertexProcessor::setUniformBuffer(int index, sw::Resource* buffer, int offset)
        {
                uniformBufferInfo[index].buffer = buffer;
index b9c6590..362f766 100644 (file)
@@ -91,10 +91,6 @@ namespace sw
                void setInputStream(int index, const Stream &stream);
                void resetInputStreams();
 
-               void setFloatConstant(unsigned int index, const float value[4]);
-               void setIntegerConstant(unsigned int index, const int integer[4]);
-               void setBooleanConstant(unsigned int index, int boolean);
-
                void setUniformBuffer(int index, sw::Resource* uniformBuffer, int offset);
                void lockUniformBuffers(byte** u, sw::Resource* uniformBuffers[]);
 
@@ -133,11 +129,6 @@ namespace sw
 
                void setRoutineCacheSize(int cacheSize);
 
-               // Shader constants
-               float4 c[VERTEX_UNIFORM_VECTORS + 1];   // One extra for indices out of range, c[VERTEX_UNIFORM_VECTORS] = {0, 0, 0, 0}
-               int4 i[16];
-               bool b[16];
-
                float pointSizeMin;
                float pointSizeMax;