Revert of Fix setColocatedSampleLocations on ES and GL < 4.5 (patchset #2 id:20001 of https://codereview.chromium.org/1415503008/ )

Reason for revert:
Co-centered sample locations are not needed to do stencil clip with mixed samples.

Original issue's description:
> Fix setColocatedSampleLocations on ES and GL < 4.5
>
> Updates setColocatedSampleLocations to use glFramebufferParameteri
> when
> the DSA version glNamedFramebufferParameteri is not present.
>
> BUG=skia:
>
> Committed:
> https://skia.googlesource.com/skia/+/98cad6219b430eddf5528473311279f21dbd2e10

BUG=skia:

Review URL: https://codereview.chromium.org/1420883007
This commit is contained in:
cdalton 2015-11-11 15:03:45 -08:00 committed by Commit bot
parent cb8d719d7a
commit 24ddb0a4dd
6 changed files with 6 additions and 39 deletions

View File

@ -75,7 +75,6 @@ typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLEndQueryProc)(GrGLenum target);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLFinishProc)();
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLFlushProc)();
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLFlushMappedBufferRangeProc)(GrGLenum target, GrGLintptr offset, GrGLsizeiptr length);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLFramebufferParameteriProc)(GrGLenum target, GrGLenum pname, GrGLint param);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLFramebufferRenderbufferProc)(GrGLenum target, GrGLenum attachment, GrGLenum renderbuffertarget, GrGLuint renderbuffer);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLFramebufferTexture2DProc)(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLFramebufferTexture2DMultisampleProc)(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level, GrGLsizei samples);

View File

@ -205,7 +205,6 @@ public:
GLPtr<GrGLFinishProc> fFinish;
GLPtr<GrGLFlushProc> fFlush;
GLPtr<GrGLFlushMappedBufferRangeProc> fFlushMappedBufferRange;
GLPtr<GrGLFramebufferParameteriProc> fFramebufferParameteri;
GLPtr<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer;
GLPtr<GrGLFramebufferTexture2DProc> fFramebufferTexture2D;
GLPtr<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample;

View File

@ -269,10 +269,6 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
return nullptr;
}
if (glVer >= GR_GL_VER(4,3)) {
GET_PROC(FramebufferParameteri);
}
if (extensions.has("GL_NV_path_rendering")) {
GET_PROC_SUFFIX(MatrixLoadf, EXT);
GET_PROC_SUFFIX(MatrixLoadIdentity, EXT);
@ -628,11 +624,6 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
GET_PROC(CheckFramebufferStatus);
GET_PROC(DeleteFramebuffers);
GET_PROC(DeleteRenderbuffers);
if (version >= GR_GL_VER(3,1)) {
GET_PROC(FramebufferParameteri);
}
GET_PROC(FramebufferRenderbuffer);
GET_PROC(FramebufferTexture2D);

View File

@ -301,16 +301,9 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
ctxInfo.hasExtension("GL_OES_standard_derivatives");
}
if (kGL_GrGLStandard == standard) {
glslCaps->fProgrammableSampleLocationsSupport =
ctxInfo.version() >= GR_GL_VER(4, 3) &&
(ctxInfo.hasExtension("GL_ARB_sample_locations") ||
ctxInfo.hasExtension("GL_NV_sample_locations"));
} else {
glslCaps->fProgrammableSampleLocationsSupport =
ctxInfo.version() >= GR_GL_VER(3, 1) &&
ctxInfo.hasExtension("GL_NV_sample_locations");
}
glslCaps->fProgrammableSampleLocationsSupport =
ctxInfo.hasExtension("GL_NV_sample_locations") ||
ctxInfo.hasExtension("GL_ARB_sample_locations");
/**************************************************************************
* GrCaps fields

View File

@ -2043,17 +2043,9 @@ void GrGLGpu::setColocatedSampleLocations(GrRenderTarget* rt, bool useColocatedS
return;
}
if (kGL_GrGLStandard == this->glStandard() && this->glVersion() >= GR_GL_VER(4,5)) {
GL_CALL(NamedFramebufferParameteri(target->renderFBOID(),
GR_GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS,
useColocatedSampleLocations));
} else {
GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, target->renderFBOID()));
GL_CALL(FramebufferParameteri(GR_GL_FRAMEBUFFER,
GR_GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS,
useColocatedSampleLocations));
fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID;
}
GL_CALL(NamedFramebufferParameteri(target->renderFBOID(),
GR_GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS,
useColocatedSampleLocations));
target->flagAsUsingColocatedSampleLocations(useColocatedSampleLocations);
}

View File

@ -713,13 +713,6 @@ bool GrGLInterface::validate() const {
}
}
if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) ||
(kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) {
if (nullptr == fFunctions.fFramebufferParameteri) {
RETURN_FALSE_INTERFACE
}
}
if (kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,5)) {
if (nullptr == fFunctions.fNamedFramebufferParameteri) {
RETURN_FALSE_INTERFACE