diff options
author | 2017-04-04 10:15:51 -0400 | |
---|---|---|
committer | 2017-04-04 15:27:44 +0000 | |
commit | ab015efc48c462ffdffebb45c02cd19efb254983 (patch) | |
tree | 0b120fe0e4238f89f7e4bb73a88a00301ecf1378 /src/gpu/vk/GrVkPipelineState.cpp | |
parent | 19aff5dd5cd83141f12c234c4255a35f63e564cd (diff) |
Move the ability to access textures, buffers, and image storages out from GrProcessor.
GrXferProcessor can no longer use this functionality so it is moved to a new intermediate class inherited by GrFragmentProcessor and GrPrimitiveProcessor.
Change-Id: I4f30c89bdceb2d77b602bf0646107e0780881c26
Reviewed-on: https://skia-review.googlesource.com/11202
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/vk/GrVkPipelineState.cpp')
-rw-r--r-- | src/gpu/vk/GrVkPipelineState.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp index b689866be2..4ce7681b15 100644 --- a/src/gpu/vk/GrVkPipelineState.cpp +++ b/src/gpu/vk/GrVkPipelineState.cpp @@ -172,12 +172,13 @@ void GrVkPipelineState::abandonGPUResources() { } } -static void append_texture_bindings(const GrProcessor& processor, - SkTArray<const GrProcessor::TextureSampler*>* textureBindings) { +static void append_texture_bindings( + const GrResourceIOProcessor& processor, + SkTArray<const GrResourceIOProcessor::TextureSampler*>* textureBindings) { // We don't support image storages in VK. SkASSERT(!processor.numImageStorages()); if (int numTextureSamplers = processor.numTextureSamplers()) { - const GrProcessor::TextureSampler** bindings = + const GrResourceIOProcessor::TextureSampler** bindings = textureBindings->push_back_n(numTextureSamplers); int i = 0; do { @@ -195,7 +196,7 @@ void GrVkPipelineState::setData(GrVkGpu* gpu, this->setRenderTargetState(pipeline.getRenderTarget()); - SkSTArray<8, const GrProcessor::TextureSampler*> textureBindings; + SkSTArray<8, const GrResourceIOProcessor::TextureSampler*> textureBindings; fGeometryProcessor->setData(fDataManager, primProc, GrFragmentProcessor::CoordTransformIter(pipeline)); @@ -217,7 +218,7 @@ void GrVkPipelineState::setData(GrVkGpu* gpu, SkIPoint offset; GrTexture* dstTexture = pipeline.dstTexture(&offset); fXferProcessor->setData(fDataManager, pipeline.getXferProcessor(), dstTexture, offset); - GrProcessor::TextureSampler dstTextureSampler; + GrResourceIOProcessor::TextureSampler dstTextureSampler; if (dstTexture) { dstTextureSampler.reset(dstTexture); textureBindings.push_back(&dstTextureSampler); @@ -313,7 +314,7 @@ void GrVkPipelineState::writeUniformBuffers(const GrVkGpu* gpu) { void GrVkPipelineState::writeSamplers( GrVkGpu* gpu, - const SkTArray<const GrProcessor::TextureSampler*>& textureBindings, + const SkTArray<const GrResourceIOProcessor::TextureSampler*>& textureBindings, bool allowSRGBInputs) { SkASSERT(fNumSamplers == textureBindings.count()); |