Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
033ae8a5
Commit
033ae8a5
authored
Oct 30, 2019
by
clayjohn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When framebuffer allocation fails for MSAA in GLES2 revert to normal without ERR_FAIL
parent
924db5fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
rasterizer_storage_gles2.cpp
drivers/gles2/rasterizer_storage_gles2.cpp
+23
-6
No files found.
drivers/gles2/rasterizer_storage_gles2.cpp
View file @
033ae8a5
...
...
@@ -4742,16 +4742,33 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
GLenum
status
=
glCheckFramebufferStatus
(
GL_FRAMEBUFFER
);
if
(
status
!=
GL_FRAMEBUFFER_COMPLETE
)
{
// Delete allocated resources and default to no MSAA
WARN_PRINT_ONCE
(
"Cannot allocate back framebuffer for MSAA"
);
printf
(
"err status: %x
\n
"
,
status
);
_render_target_clear
(
rt
);
ERR_FAIL_COND
(
status
!=
GL_FRAMEBUFFER_COMPLETE
);
config
.
multisample_supported
=
false
;
rt
->
multisample_active
=
false
;
glDeleteFramebuffers
(
1
,
&
rt
->
multisample_fbo
);
rt
->
multisample_fbo
=
0
;
glDeleteRenderbuffers
(
1
,
&
rt
->
multisample_depth
);
rt
->
multisample_depth
=
0
;
#ifdef ANDROID_ENABLED
glDeleteTextures
(
1
,
&
rt
->
multisample_color
);
#else
glDeleteRenderbuffers
(
1
,
&
rt
->
multisample_color
);
#endif
rt
->
multisample_color
=
0
;
}
glBindRenderbuffer
(
GL_RENDERBUFFER
,
0
);
glBindFramebuffer
(
GL_FRAMEBUFFER
,
0
);
#ifdef ANDROID_ENABLED
glBindTexture
(
GL_TEXTURE_2D
,
0
);
#endif
}
else
#endif
#endif
// JAVASCRIPT_ENABLED
{
rt
->
multisample_active
=
false
;
}
...
...
@@ -4987,10 +5004,10 @@ void RasterizerStorageGLES2::_render_target_clear(RenderTarget *rt) {
glDeleteRenderbuffers
(
1
,
&
rt
->
multisample_depth
);
rt
->
multisample_depth
=
0
;
#ifdef GLES_OVER_GL
glDeleteRenderbuffers
(
1
,
&
rt
->
multisample_color
);
#else
#ifdef ANDROID_ENABLED
glDeleteTextures
(
1
,
&
rt
->
multisample_color
);
#else
glDeleteRenderbuffers
(
1
,
&
rt
->
multisample_color
);
#endif
rt
->
multisample_color
=
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment