ShaderRenderCase: Remove m_name for the ShaderRenderCaseInstace class
authorPeter Gal <pgal.u-szeged@partner.samsung.com>
Mon, 31 Aug 2015 18:10:15 +0000 (20:10 +0200)
committerPeter Gal <pgal.u-szeged@partner.samsung.com>
Thu, 12 Nov 2015 18:52:42 +0000 (19:52 +0100)
This was initialy introduced to have unique names for the shaders, but as
it turns out that's not needed as each test case has it's own shader store.
Thus there will be no name collision.

external/vulkancts/modules/vulkan/shaderrendercase/vktShaderRenderCase.cpp
external/vulkancts/modules/vulkan/shaderrendercase/vktShaderRenderCase.hpp

index 47c6b47..a37875e 100644 (file)
@@ -292,11 +292,10 @@ void ShaderEvaluator::evaluate (ShaderEvalContext& ctx)
 
 // ShaderRenderCaseInstance.
 
-ShaderRenderCaseInstance::ShaderRenderCaseInstance (Context& context, const string& name, bool isVertexCase, ShaderEvaluator& evaluator, UniformSetupFunc uniformFunc, AttributeSetupFunc attribFunc)
+ShaderRenderCaseInstance::ShaderRenderCaseInstance (Context& context, bool isVertexCase, ShaderEvaluator& evaluator, UniformSetupFunc uniformFunc, AttributeSetupFunc attribFunc)
        : vkt::TestInstance(context)
        , m_clearColor(DEFAULT_CLEAR_COLOR)
        , memAlloc(m_context.getDeviceInterface(), m_context.getDevice(), getPhysicalDeviceMemoryProperties(m_context.getInstanceInterface(), m_context.getPhysicalDevice()))
-       , m_name(name)
        , m_isVertexCase(isVertexCase)
        , m_evaluator(evaluator)
        , m_uniformFunc(uniformFunc)
@@ -679,8 +678,8 @@ void ShaderRenderCaseInstance::render (Surface& result, const QuadGrid& quadGrid
 
        // Create shaders
        {
-               m_vertexShaderModule    = createShaderModule(vk, vkDevice, m_context.getBinaryCollection().get(m_name + "_vert"), 0);
-               m_fragmentShaderModule  = createShaderModule(vk, vkDevice, m_context.getBinaryCollection().get(m_name + "_frag"), 0);
+               m_vertexShaderModule    = createShaderModule(vk, vkDevice, m_context.getBinaryCollection().get("vert"), 0);
+               m_fragmentShaderModule  = createShaderModule(vk, vkDevice, m_context.getBinaryCollection().get("frag"), 0);
 
                const VkShaderCreateInfo vertexShaderParams =
                {
index 77d33e7..364d19f 100644 (file)
@@ -180,11 +180,11 @@ public:
        virtual                                 ~ShaderRenderCase       (void) {}
        virtual void                    initPrograms            (vk::ProgramCollection<glu::ProgramSources>& programCollection) const
                                                        {
-                                                               programCollection.add(m_name + "_vert") << glu::VertexSource(m_vertShaderSource);
-                                                               programCollection.add(m_name + "_frag") << glu::FragmentSource(m_fragShaderSource);
+                                                               programCollection.add("vert") << glu::VertexSource(m_vertShaderSource);
+                                                               programCollection.add("frag") << glu::FragmentSource(m_fragShaderSource);
                                                        }
 
-       virtual TestInstance*   createInstance          (Context& context) const { return new Instance(context, m_name, m_isVertexCase, *m_evaluator, m_uniformFunc, m_attribFunc); }
+       virtual TestInstance*   createInstance          (Context& context) const { return new Instance(context, m_isVertexCase, *m_evaluator, m_uniformFunc, m_attribFunc); }
 
 protected:
     std::string                                m_vertShaderSource;
@@ -205,7 +205,6 @@ class ShaderRenderCaseInstance : public vkt::TestInstance
 {
 public:
                                                                                                                ShaderRenderCaseInstance        (Context& context,
-                                                                                                                                                                       const std::string& name,
                                                                                                                                                                        bool isVertexCase,
                                                                                                                                                                        ShaderEvaluator& evaluator,
                                                                                                                                                                        UniformSetupFunc uniformFunc,
@@ -249,7 +248,6 @@ private:
                                                                                                                                                                        const tcu::Surface& refImage,
                                                                                                                                                                        float errorThreshold);
 
-       std::string                                                                                     m_name;
        bool                                                                                            m_isVertexCase;
        ShaderEvaluator&                                                                        m_evaluator;
        UniformSetupFunc                                                                        m_uniformFunc;