Index: src/gpu/vk/GrVkPipelineStateDataManager.cpp |
diff --git a/src/gpu/vk/GrVkPipelineStateDataManager.cpp b/src/gpu/vk/GrVkPipelineStateDataManager.cpp |
index 638fdba365121c38e2c1bbac24b81b05c55f69b6..13b363fa8066a6864625387aa905cb70509a1a8f 100644 |
--- a/src/gpu/vk/GrVkPipelineStateDataManager.cpp |
+++ b/src/gpu/vk/GrVkPipelineStateDataManager.cpp |
@@ -54,6 +54,14 @@ void* GrVkPipelineStateDataManager::getBufferPtrAndMarkDirty(const Uniform& uni) |
return buffer; |
} |
+void GrVkPipelineStateDataManager::set1i(UniformHandle u, int32_t i) const { |
+ const Uniform& uni = fUniforms[u.toIndex()]; |
+ SkASSERT(uni.fType == kInt_GrSLType); |
+ SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount); |
+ void* buffer = this->getBufferPtrAndMarkDirty(uni); |
+ memcpy(buffer, &i, sizeof(int32_t)); |
+} |
+ |
void GrVkPipelineStateDataManager::set1f(UniformHandle u, float v0) const { |
const Uniform& uni = fUniforms[u.toIndex()]; |
SkASSERT(uni.fType == kFloat_GrSLType); |