aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-11-23 01:02:43 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-23 01:02:57 +0000
commit59dc41175d99d0a31c046aec0c26c4d82a3a3574 (patch)
tree5e1d050baec746da7f2fd2a83a128ab4e9d9cd1b /src/gpu/GrProcessor.cpp
parent83a3b390dbeafb703af9b34049220e88834d10be (diff)
Revert "Initial OpenGL Image support."
This reverts commit be34882042048db096baca32ddf4a8b472529804. Reason for revert: Test failures and shader compilation issues on Android. Original change's description: > Initial OpenGL Image support. > > This change along with recently landed changes is enough to make the new unit test work and not much else. imageLoad is support but not stores or any other image functions (atomics). Barriers in the shading language or the GL API are not yet hooked up. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4182 > > Change-Id: I5958b7c89e40ae5ee05f7bbaca3b3738162fe5ce > Reviewed-on: https://skia-review.googlesource.com/4182 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I29a2502c296ae39ed9a999957800414ae46e6f0f Reviewed-on: https://skia-review.googlesource.com/5129 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrProcessor.cpp')
-rw-r--r--src/gpu/GrProcessor.cpp45
1 files changed, 3 insertions, 42 deletions
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 738ff13e51..1e100e41fa 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -122,12 +122,7 @@ void GrProcessor::addTextureSampler(const TextureSampler* access) {
void GrProcessor::addBufferAccess(const BufferAccess* access) {
fBufferAccesses.push_back(access);
- this->addGpuResource(access->programBuffer());
-}
-
-void GrProcessor::addImageStorageAccess(const ImageStorageAccess* access) {
- fImageStorageAccesses.push_back(access);
- this->addGpuResource(access->programTexture());
+ this->addGpuResource(access->getProgramBuffer());
}
void* GrProcessor::operator new(size_t size) {
@@ -138,10 +133,9 @@ void GrProcessor::operator delete(void* target) {
return MemoryPoolAccessor().pool()->release(target);
}
-bool GrProcessor::hasSameSamplersAndAccesses(const GrProcessor &that) const {
+bool GrProcessor::hasSameSamplers(const GrProcessor& that) const {
if (this->numTextureSamplers() != that.numTextureSamplers() ||
- this->numBuffers() != that.numBuffers() ||
- this->numImageStorages() != that.numImageStorages()) {
+ this->numBuffers() != that.numBuffers()) {
return false;
}
for (int i = 0; i < this->numTextureSamplers(); ++i) {
@@ -154,11 +148,6 @@ bool GrProcessor::hasSameSamplersAndAccesses(const GrProcessor &that) const {
return false;
}
}
- for (int i = 0; i < this->numImageStorages(); ++i) {
- if (this->imageStorageAccess(i) != that.imageStorageAccess(i)) {
- return false;
- }
- }
return true;
}
@@ -200,34 +189,6 @@ void GrProcessor::TextureSampler::reset(GrTexture* texture,
///////////////////////////////////////////////////////////////////////////////////////////////////
-GrProcessor::ImageStorageAccess::ImageStorageAccess(sk_sp<GrTexture> texture, GrIOType ioType,
- GrShaderFlags visibility) {
- SkASSERT(texture);
- fTexture.set(texture.release(), ioType);
- fVisibility = visibility;
- // We currently infer this from the config. However, we could allow the client to specify
- // a format that is different but compatible with the config.
- switch (fTexture.get()->config()) {
- case kRGBA_8888_GrPixelConfig:
- fFormat = GrImageStorageFormat::kRGBA8;
- break;
- case kRGBA_8888_sint_GrPixelConfig:
- fFormat = GrImageStorageFormat::kRGBA8i;
- break;
- case kRGBA_half_GrPixelConfig:
- fFormat = GrImageStorageFormat::kRGBA16f;
- break;
- case kRGBA_float_GrPixelConfig:
- fFormat = GrImageStorageFormat::kRGBA32f;
- break;
- default:
- SkFAIL("Config is not (yet) supported as image storage.");
- break;
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
// Initial static variable from GrXPFactory
int32_t GrXPFactory::gCurrXPFClassID =
GrXPFactory::kIllegalXPFClassID;