| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. | 
| 3 * | 3 * | 
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be | 
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. | 
| 6 */ | 6 */ | 
| 7 | 7 | 
| 8 #ifndef GrVkPipelineStateDataManager_DEFINED | 8 #ifndef GrVkPipelineStateDataManager_DEFINED | 
| 9 #define GrVkPipelineStateDataManager_DEFINED | 9 #define GrVkPipelineStateDataManager_DEFINED | 
| 10 | 10 | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 43 | 43 | 
| 44     // for nvpr only | 44     // for nvpr only | 
| 45     void setPathFragmentInputTransform(VaryingHandle u, int components, | 45     void setPathFragmentInputTransform(VaryingHandle u, int components, | 
| 46                                        const SkMatrix& matrix) const override { | 46                                        const SkMatrix& matrix) const override { | 
| 47         SkFAIL("Only supported in NVPR, which is not in vulkan"); | 47         SkFAIL("Only supported in NVPR, which is not in vulkan"); | 
| 48     } | 48     } | 
| 49 | 49 | 
| 50     // Returns true if either the vertex or fragment buffer needed to generate a
     new underlying | 50     // Returns true if either the vertex or fragment buffer needed to generate a
     new underlying | 
| 51     // VkBuffer object in order upload data. If true is returned, this is a sign
    al to the caller | 51     // VkBuffer object in order upload data. If true is returned, this is a sign
    al to the caller | 
| 52     // that they will need to update the descriptor set that is using these buff
    ers. | 52     // that they will need to update the descriptor set that is using these buff
    ers. | 
| 53     bool uploadUniformBuffers(const GrVkGpu* gpu, | 53     bool uploadUniformBuffers(GrVkGpu* gpu, | 
| 54                               GrVkUniformBuffer* vertexBuffer, | 54                               GrVkUniformBuffer* vertexBuffer, | 
| 55                               GrVkUniformBuffer* fragmentBuffer) const; | 55                               GrVkUniformBuffer* fragmentBuffer) const; | 
| 56 private: | 56 private: | 
| 57     struct Uniform { | 57     struct Uniform { | 
| 58         uint32_t fBinding; | 58         uint32_t fBinding; | 
| 59         uint32_t fOffset; | 59         uint32_t fOffset; | 
| 60         SkDEBUGCODE( | 60         SkDEBUGCODE( | 
| 61             GrSLType    fType; | 61             GrSLType    fType; | 
| 62             int         fArrayCount; | 62             int         fArrayCount; | 
| 63         ); | 63         ); | 
| 64     }; | 64     }; | 
| 65 | 65 | 
| 66     template<int N> inline void setMatrices(UniformHandle, int arrayCount, | 66     template<int N> inline void setMatrices(UniformHandle, int arrayCount, | 
| 67                                             const float matrices[]) const; | 67                                             const float matrices[]) const; | 
| 68 | 68 | 
| 69     void* getBufferPtrAndMarkDirty(const Uniform& uni) const; | 69     void* getBufferPtrAndMarkDirty(const Uniform& uni) const; | 
| 70 | 70 | 
| 71     uint32_t fVertexUniformSize; | 71     uint32_t fVertexUniformSize; | 
| 72     uint32_t fFragmentUniformSize; | 72     uint32_t fFragmentUniformSize; | 
| 73 | 73 | 
| 74     SkTArray<Uniform, true> fUniforms; | 74     SkTArray<Uniform, true> fUniforms; | 
| 75 | 75 | 
| 76     mutable SkAutoMalloc fVertexUniformData; | 76     mutable SkAutoMalloc fVertexUniformData; | 
| 77     mutable SkAutoMalloc fFragmentUniformData; | 77     mutable SkAutoMalloc fFragmentUniformData; | 
| 78     mutable bool         fVertexUniformsDirty; | 78     mutable bool         fVertexUniformsDirty; | 
| 79     mutable bool         fFragmentUniformsDirty; | 79     mutable bool         fFragmentUniformsDirty; | 
| 80 }; | 80 }; | 
| 81 | 81 | 
| 82 #endif | 82 #endif | 
| OLD | NEW | 
|---|