diff options
author | 2017-04-03 16:57:43 -0400 | |
---|---|---|
committer | 2017-04-03 21:35:47 +0000 | |
commit | 18dfa980765bee6a1ce7c5f430cb32f487da6590 (patch) | |
tree | f82444c520111b4710746480652fde74d2db3815 /src/gpu/vk/GrVkPipelineState.cpp | |
parent | b9c4a6fc7de252633f16d11c2df10ee6de16af03 (diff) |
Store the dst texture used by an XP in GrPipeline rather than in the XP.
This will allow the XP to be created before the dst texture.
Change-Id: I3e5bdfa8e5d47e58a3560792ce5cf3899d30a024
Reviewed-on: https://skia-review.googlesource.com/11011
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/vk/GrVkPipelineState.cpp')
-rw-r--r-- | src/gpu/vk/GrVkPipelineState.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp index 91fdc3f990..b689866be2 100644 --- a/src/gpu/vk/GrVkPipelineState.cpp +++ b/src/gpu/vk/GrVkPipelineState.cpp @@ -214,8 +214,14 @@ void GrVkPipelineState::setData(GrVkGpu* gpu, } SkASSERT(!fp && !glslFP); - fXferProcessor->setData(fDataManager, pipeline.getXferProcessor()); - append_texture_bindings(pipeline.getXferProcessor(), &textureBindings); + SkIPoint offset; + GrTexture* dstTexture = pipeline.dstTexture(&offset); + fXferProcessor->setData(fDataManager, pipeline.getXferProcessor(), dstTexture, offset); + GrProcessor::TextureSampler dstTextureSampler; + if (dstTexture) { + dstTextureSampler.reset(dstTexture); + textureBindings.push_back(&dstTextureSampler); + } // Get new descriptor sets if (fNumSamplers) { |