Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Unified Diff: src/gpu/vk/GrVkPipelineStateDataManager.cpp

Issue 1896013003: Revert of Refactor how we store and use samplers in Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkPipelineStateDataManager.h ('k') | src/gpu/vk/GrVkUniformHandler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkPipelineStateDataManager.cpp
diff --git a/src/gpu/vk/GrVkPipelineStateDataManager.cpp b/src/gpu/vk/GrVkPipelineStateDataManager.cpp
index c72f209a218a8daef9c72384d2cb28f55be8279f..60d7d7fee85175e33534914b05afc0e6617f7ff6 100644
--- a/src/gpu/vk/GrVkPipelineStateDataManager.cpp
+++ b/src/gpu/vk/GrVkPipelineStateDataManager.cpp
@@ -32,10 +32,11 @@
uniform.fArrayCount = uniformInfo.fVariable.getArrayCount();
uniform.fType = uniformInfo.fVariable.getType();
);
- uniform.fBinding =
- (kVertex_GrShaderFlag == uniformInfo.fVisibility) ? GrVkUniformHandler::kVertexBinding
- : GrVkUniformHandler::kFragBinding;
+ uniform.fBinding = uniformInfo.fBinding;
uniform.fOffset = uniformInfo.fUBOffset;
+ SkDEBUGCODE(
+ uniform.fSetNumber = uniformInfo.fSetNumber;
+ );
}
}
@@ -58,6 +59,7 @@
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kFloat_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer = this->getBufferPtrAndMarkDirty(uni);
SkASSERT(sizeof(float) == 4);
memcpy(buffer, &v0, sizeof(float));
@@ -71,6 +73,7 @@
SkASSERT(arrayCount > 0);
SkASSERT(arrayCount <= uni.fArrayCount ||
(1 == arrayCount && GrGLSLShaderVar::kNonArray == uni.fArrayCount));
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer = this->getBufferPtrAndMarkDirty(uni);
SkASSERT(sizeof(float) == 4);
@@ -85,6 +88,7 @@
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec2f_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer = this->getBufferPtrAndMarkDirty(uni);
SkASSERT(sizeof(float) == 4);
float v[2] = { v0, v1 };
@@ -99,6 +103,7 @@
SkASSERT(arrayCount > 0);
SkASSERT(arrayCount <= uni.fArrayCount ||
(1 == arrayCount && GrGLSLShaderVar::kNonArray == uni.fArrayCount));
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer = this->getBufferPtrAndMarkDirty(uni);
SkASSERT(sizeof(float) == 4);
@@ -113,6 +118,7 @@
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec3f_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer = this->getBufferPtrAndMarkDirty(uni);
SkASSERT(sizeof(float) == 4);
float v[3] = { v0, v1, v2 };
@@ -127,6 +133,7 @@
SkASSERT(arrayCount > 0);
SkASSERT(arrayCount <= uni.fArrayCount ||
(1 == arrayCount && GrGLSLShaderVar::kNonArray == uni.fArrayCount));
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer = this->getBufferPtrAndMarkDirty(uni);
SkASSERT(sizeof(float) == 4);
@@ -145,6 +152,7 @@
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec4f_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer = this->getBufferPtrAndMarkDirty(uni);
SkASSERT(sizeof(float) == 4);
float v[4] = { v0, v1, v2, v3 };
@@ -159,6 +167,7 @@
SkASSERT(arrayCount > 0);
SkASSERT(arrayCount <= uni.fArrayCount ||
(1 == arrayCount && GrGLSLShaderVar::kNonArray == uni.fArrayCount));
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer = this->getBufferPtrAndMarkDirty(uni);
SkASSERT(sizeof(float) == 4);
@@ -205,6 +214,7 @@
SkASSERT(arrayCount > 0);
SkASSERT(arrayCount <= uni.fArrayCount ||
(1 == arrayCount && GrGLSLShaderVar::kNonArray == uni.fArrayCount));
+ SkASSERT(GrVkUniformHandler::kUniformBufferDescSet == uni.fSetNumber);
void* buffer;
if (GrVkUniformHandler::kVertexBinding == uni.fBinding) {
« no previous file with comments | « src/gpu/vk/GrVkPipelineStateDataManager.h ('k') | src/gpu/vk/GrVkUniformHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698