aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLProgram.cpp6
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.cpp3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index ec08bf4634..9750e7047d 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -170,7 +170,7 @@ void GrGLProgram::bindTextures(const GrResourceIOProcessor& processor,
for (int i = 0; i < processor.numTextureSamplers(); ++i) {
const GrResourceIOProcessor::TextureSampler& sampler = processor.textureSampler(i);
fGpu->bindTexture((*nextTexSamplerIdx)++, sampler.params(),
- allowSRGBInputs, static_cast<GrGLTexture*>(sampler.texture()));
+ allowSRGBInputs, static_cast<GrGLTexture*>(sampler.peekTexture()));
}
for (int i = 0; i < processor.numBuffers(); ++i) {
const GrResourceIOProcessor::BufferAccess& access = processor.bufferAccess(i);
@@ -180,7 +180,7 @@ void GrGLProgram::bindTextures(const GrResourceIOProcessor& processor,
for (int i = 0; i < processor.numImageStorages(); ++i) {
const GrResourceIOProcessor::ImageStorageAccess& access = processor.imageStorageAccess(i);
fGpu->bindImageStorage((*nextImageStorageIdx)++, access.ioType(),
- static_cast<GrGLTexture *>(access.texture()));
+ static_cast<GrGLTexture *>(access.peekTexture()));
}
}
@@ -188,6 +188,6 @@ void GrGLProgram::generateMipmaps(const GrResourceIOProcessor& processor, bool a
for (int i = 0; i < processor.numTextureSamplers(); ++i) {
const GrResourceIOProcessor::TextureSampler& sampler = processor.textureSampler(i);
fGpu->generateMipmaps(sampler.params(), allowSRGBInputs,
- static_cast<GrGLTexture*>(sampler.texture()));
+ static_cast<GrGLTexture*>(sampler.peekTexture()));
}
}
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index f63e56b7d1..dda2ac13ba 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -8,6 +8,7 @@
#include "GrGLProgramBuilder.h"
#include "GrAutoLocaleSetter.h"
+#include "GrContext.h"
#include "GrCoordTransform.h"
#include "GrGLProgramBuilder.h"
#include "GrProgramDesc.h"
@@ -32,7 +33,7 @@ GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrPipeline& pipeline,
const GrPrimitiveProcessor& primProc,
GrProgramDesc* desc,
GrGLGpu* gpu) {
- SkASSERT(!pipeline.isBad() && !primProc.isBad());
+ SkASSERT(!pipeline.isBad() && primProc.instantiate(gpu->getContext()->resourceProvider()));
ATRACE_ANDROID_FRAMEWORK("Shader Compile");
GrAutoLocaleSetter als("C");