[Mesa-dev] [Bug 91673] Segfault when calling glTexSubImage2D on storage texture to bound FBO
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Aug 19 05:45:24 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=91673
--- Comment #3 from Dongseong Hwang <dongseong.hwang at intel.com> ---
(In reply to Tapani Pälli from comment #2)
> With a bit of testing it seems things work fine if glTexStorage2D call is
> moved to happen right after first glBindTexture call (this is also how is
> being done in some Piglit tests). Maybe this will help you get forward while
> the bug is being fixed.
That's good hint for chromium.
Mesa crashes on updating immutable texture bound to FBO.
So following code doesn't crash
GLuint tex_;
GLuint fbo_;
glGenTextures(1, &tex_);
glBindTexture(GL_TEXTURE_2D, tex_);
glGenFramebuffers(1, &fbo_);
glBindFramebuffer(GL_FRAMEBUFFER, fbo_);
glFramebufferTexture2D(GL_FRAMEBUFFER,
GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D,
tex_,
0);
glBindTexture(GL_TEXTURE_2D, tex_);
glTexStorage2D(GL_TEXTURE_2D, 2, GL_RGBA8, 2, 2);
// hack to prevent crash
glFramebufferTexture2D(GL_FRAMEBUFFER,
GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D,
0,
0);
// not SEGFAULT lol
glTexSubImage2D(GL_TEXTURE_2D,
0,
0, 0,
2, 2,
GL_RGBA, GL_UNSIGNED_BYTE,
source_pixels);
glFramebufferTexture2D(GL_FRAMEBUFFER,
GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D,
tex_,
0);
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150819/ba2e0f58/attachment.html>
More information about the mesa-dev
mailing list