aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-11-29 15:29:41 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-29 21:17:42 +0000
commit8b7a7ddea344eed96f095652359c5c86349f86d0 (patch)
treeff1461e2e4644308b194a91aa1eca97c00dcc944 /src/gpu
parentf1dd677c3a4c7bb7e72dbfb77a0124c51b19aa7c (diff)
Remove caps image storage caps hack.
This was necessary because the number of fragment image storages couldn't be queried in shading language neutral code. We are no longer shading language neutral and this can be queried. Change-Id: I065a38688919e7cdb1482877a232cb004c8f1511 Reviewed-on: https://skia-review.googlesource.com/5315 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp6
-rw-r--r--src/gpu/gl/GrGLGpu.cpp1
2 files changed, 1 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index f961a4b7c0..ec0f6288b4 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -343,12 +343,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
shaderCaps->fMaxGeometryImageStorages);
shaderCaps->fMaxFragmentImageStorages = SkTMin(maxUnits,
shaderCaps->fMaxFragmentImageStorages);
- // HACK: Currently we only use images in a unit test in the fragment shader. The individual
- // stage image limits aren't exposed through GrShaderCaps. Soon GrShaderCaps and GrGLSLCaps
- // will merge and the test can look for fragment support.
- if (!shaderCaps->fMaxFragmentImageStorages) {
- shaderCaps->fImageLoadStoreSupport = false;
- }
}
/**************************************************************************
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 81fb835356..67414a4957 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -561,6 +561,7 @@ void GrGLGpu::onResetContext(uint32_t resetBits) {
fHWBufferTextures[b].fKnownBound = false;
}
for (int i = 0; i < fHWBoundImageStorages.count(); ++i) {
+ SkASSERT(this->caps()->shaderCaps()->imageLoadStoreSupport());
fHWBoundImageStorages[i].fTextureUniqueID.makeInvalid();
}
}