Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 82c0fce

Browse files
author
jonahwilliams
committed
Comments and conditional.
1 parent 26a1b71 commit 82c0fce

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

impeller/renderer/backend/gles/capabilities_gles.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ CapabilitiesGLES::CapabilitiesGLES(const ProcTableGLES& gl) {
125125

126126
// We hard-code 4x MSAA, so let's make sure it's supported.
127127
GLint value = 0;
128-
gl.GetIntegerv(GL_MAX_SAMPLES_EXT, &value);
128+
gl.GetIntegerv(GL_MAX_SAMPLES, &value);
129129
supports_offscreen_msaa_ = value >= 4;
130130
} else if (desc->GetGlVersion().major_version >= 3 && desc->IsES()) {
131131
GLint value = 0;
132-
gl.GetIntegerv(GL_MAX_SAMPLES_EXT, &value);
132+
gl.GetIntegerv(GL_MAX_SAMPLES, &value);
133133
supports_offscreen_msaa_ = value >= 4;
134134
}
135135
is_es_ = desc->IsES();

impeller/renderer/backend/gles/render_pass_gles.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,11 @@ void RenderPassGLES::ResetGLState(const ProcTableGLES& gl) {
532532
gl.BindFramebuffer(GL_DRAW_FRAMEBUFFER, GL_NONE);
533533
gl.BindFramebuffer(GL_READ_FRAMEBUFFER, GL_NONE);
534534
gl.DeleteFramebuffers(1u, &resolve_fbo);
535+
// Rebind the original FBO so that we can discard it below.
536+
gl.BindFramebuffer(GL_FRAMEBUFFER, fbo);
535537
}
536538

537539
if (gl.DiscardFramebufferEXT.IsAvailable()) {
538-
gl.BindFramebuffer(GL_FRAMEBUFFER, fbo);
539540
std::vector<GLenum> attachments;
540541

541542
// TODO(130048): discarding stencil or depth on the default fbo causes Angle

impeller/renderer/backend/gles/texture_gles.cc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -457,27 +457,27 @@ void TextureGLES::InitializeContentsIfNecessary() const {
457457
// with regular GLES 3.0 multisampled renderbuffers/textures.
458458
if (gl.GetCapabilities()->SupportsImplicitResolvingMSAA()) {
459459
gl.RenderbufferStorageMultisampleEXT(
460-
GL_RENDERBUFFER, // target
461-
4, // samples
462-
render_buffer_format.value(), // internal format
463-
size.width, // width
464-
size.height // height
460+
/*target=*/GL_RENDERBUFFER, //
461+
/*samples=*/4, //
462+
/*internal_format=*/render_buffer_format.value(), //
463+
/*width=*/size.width, //
464+
/*height=*/size.height //
465465
);
466466
} else {
467467
gl.RenderbufferStorageMultisample(
468-
GL_RENDERBUFFER, // target
469-
4, // samples
470-
render_buffer_format.value(), // internal format
471-
size.width, // width
472-
size.height // height
468+
/*target=*/GL_RENDERBUFFER, //
469+
/*samples=*/4, //
470+
/*internal_format=*/render_buffer_format.value(), //
471+
/*width=*/size.width, //
472+
/*height=*/size.height //
473473
);
474474
}
475475
} else {
476476
gl.RenderbufferStorage(
477-
GL_RENDERBUFFER, // target
478-
render_buffer_format.value(), // internal format
479-
size.width, // width
480-
size.height // height
477+
/*target=*/GL_RENDERBUFFER, //
478+
/*internal_format=*/render_buffer_format.value(), //
479+
/*width=*/size.width, //
480+
/*height=*/size.height //
481481
);
482482
}
483483
}

0 commit comments

Comments
 (0)