Index: src/gpu/vk/GrVkProgramDesc.cpp |
diff --git a/src/gpu/vk/GrVkProgramDesc.cpp b/src/gpu/vk/GrVkProgramDesc.cpp |
index 346dbb6baaeaa15695f9255f6303e8f445854bd4..32357cdfcc22ca80b770698a464a8bc3c121afb1 100644 |
--- a/src/gpu/vk/GrVkProgramDesc.cpp |
+++ b/src/gpu/vk/GrVkProgramDesc.cpp |
@@ -107,6 +107,7 @@ bool GrVkProgramDescBuilder::Build(GrProgramDesc* desc, |
vkDesc->key().reset(); |
return false; |
} |
+ GrProcessor::RequiredFeatures requiredFeatures = primProc.requiredFeatures(); |
for (int i = 0; i < pipeline.numFragmentProcessors(); ++i) { |
const GrFragmentProcessor& fp = pipeline.getFragmentProcessor(i); |
@@ -114,6 +115,7 @@ bool GrVkProgramDescBuilder::Build(GrProgramDesc* desc, |
vkDesc->key().reset(); |
return false; |
} |
+ requiredFeatures |= fp.requiredFeatures(); |
} |
const GrXferProcessor& xp = pipeline.getXferProcessor(); |
@@ -122,6 +124,7 @@ bool GrVkProgramDescBuilder::Build(GrProgramDesc* desc, |
vkDesc->key().reset(); |
return false; |
} |
+ requiredFeatures |= xp.requiredFeatures(); |
// --------DO NOT MOVE HEADER ABOVE THIS LINE-------------------------------------------------- |
// Because header is a pointer into the dynamic array, we can't push any new data into the key |
@@ -131,7 +134,7 @@ bool GrVkProgramDescBuilder::Build(GrProgramDesc* desc, |
// make sure any padding in the header is zeroed. |
memset(header, 0, kHeaderSize); |
- if (pipeline.readsFragPosition()) { |
+ if (requiredFeatures & GrProcessor::kFragmentPosition_RequiredFeature) { |
header->fFragPosKey = |
GrGLSLFragmentShaderBuilder::KeyForFragmentPosition(pipeline.getRenderTarget()); |
} else { |