Enable dual source blending for Vulkan

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1837213003

Review URL: https://codereview.chromium.org/1837213003
This commit is contained in:
egdaniel 2016-03-30 12:06:48 -07:00 committed by Commit bot
parent 128245c61d
commit d632bb4dfc
3 changed files with 10 additions and 4 deletions

View File

@ -62,7 +62,9 @@ void GrVkCaps::init(const GrContextOptions& contextOptions, const GrVkInterface*
this->initStencilFormats(vkInterface, physDev);
if (SkToBool(extensionFlags & kNV_glsl_shader_GrVkExtensionFlag)) {
fCanUseGLSLForShaderModule = true;
// Currently disabling this feature since it does not play well with validation layers which
// expect a SPIR-V shader
// fCanUseGLSLForShaderModule = true;
}
this->applyOptionsOverrides(contextOptions);
@ -147,10 +149,9 @@ void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceProperties& properties,
glslCaps->fShaderDerivativeSupport = true;
glslCaps->fGeometryShaderSupport = SkToBool(featureFlags & kGeometryShader_GrVkFeatureFlag);
#if 0
// For now disabling dual source blending till we get it hooked up in the rest of system
glslCaps->fDualSourceBlendingSupport = SkToBool(featureFlags & kDualSrcBlend_GrVkFeatureFlag);
#endif
glslCaps->fIntegerSupport = true;
glslCaps->fMaxVertexSamplers =

View File

@ -53,6 +53,10 @@ void GrVkPipelineStateBuilder::finalizeFragmentOutputColor(GrGLSLShaderVar& outp
outputColor.setLayoutQualifier("location = 0");
}
void GrVkPipelineStateBuilder::finalizeFragmentSecondaryColor(GrGLSLShaderVar& outputColor) {
outputColor.setLayoutQualifier("location = 1");
}
VkShaderStageFlags visibility_to_vk_stage_flags(uint32_t visibility) {
VkShaderStageFlags flags = 0;

View File

@ -43,6 +43,7 @@ public:
GrVkGpu* gpu() const { return fGpu; }
void finalizeFragmentOutputColor(GrGLSLShaderVar& outputColor) override;
void finalizeFragmentSecondaryColor(GrGLSLShaderVar& outputColor) override;
private:
GrVkPipelineStateBuilder(GrVkGpu*,