On Mon, 2014-03-03 at 16:22 +0800, Chia-I Wu wrote: > The texture formats of winsys fbo are always linear becase the st manager > (st/dri for example) could not know the colorspace used. But it does not mean > that we cannot make the fbo sRGB-capable. By > > - setting rb->Visual.sRGBCapable to GL_TRUE when the pipe driver supports the > format in sRGB colorspace, > - giving rb an sRGB internal format, and > - updating code to check rb->Format instead of strb->texture->format, > > we should be good. > > Fixed bug 75226 for at least llvmpipe and ilo, with no piglit regression. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75226
The apitrace in that bug works with radeonsi as well with your change, but I'm getting an assertion failure in the X server (using glamor) running piglit, because st_pipe_format_to_mesa_format() doesn't handle PIPE_FORMAT_B8G8R8X8_SRGB: #0 _debug_assert_fail (expr=expr@entry=0x7f2461301a86 "0", file=file@entry=0x7f24612ad410 "../../../src/mesa/state_tracker/st_format.c", line=line@entry=752, function=function@entry=0x7f24612ad940 <__func__.34569> "st_pipe_format_to_mesa_format") at ../../../../src/gallium/auxiliary/util/u_debug.c:281 #1 0x00007f2460faaef9 in st_pipe_format_to_mesa_format (format=format@entry=PIPE_FORMAT_B8G8R8X8_SRGB) at ../../../src/mesa/state_tracker/st_format.c:752 #2 0x00007f2460f9fc8a in st_new_renderbuffer_fb (format=format@entry=PIPE_FORMAT_B8G8R8X8_SRGB, samples=0, sw=<optimized out>) at ../../../src/mesa/state_tracker/st_cb_fbo.c:295 #3 0x00007f2460fc5b15 in st_framebuffer_add_renderbuffer (stfb=stfb@entry=0xe2b630, idx=<optimized out>) at ../../../src/mesa/state_tracker/st_manager.c:314 #4 0x00007f2460fc6e41 in st_framebuffer_create (stfbi=0xe2b420, screen=0x782690) at ../../../src/mesa/state_tracker/st_manager.c:437 #5 st_framebuffer_reuse_or_create (screen=screen@entry=0x782690, fb=<optimized out>, stfbi=stfbi@entry=0xe2b420) at ../../../src/mesa/state_tracker/st_manager.c:707 #6 0x00007f2460fc6f26 in st_api_make_current (stapi=<optimized out>, stctxi=0xe1ae60, stdrawi=0xe2b420, streadi=0xe2b420) at ../../../src/mesa/state_tracker/st_manager.c:728 #7 0x00007f2461206f0b in dri_make_current (cPriv=<optimized out>, driDrawPriv=0xe2b3e0, driReadPriv=0xe2b3e0) at ../../../../../../src/gallium/state_trackers/dri/sw/dri_context.c:253 #8 0x00007f2460e4b252 in driBindContext (pcp=<optimized out>, pdp=0xe2b3e0, prp=<optimized out>) at ../../../../../src/mesa/drivers/dri/common/dri_util.c:543 #9 0x00007f24635096d0 in DoMakeCurrent (cl=0xb92850, drawId=12582916, readId=<optimized out>, contextId=<optimized out>, tag=<optimized out>) at ../../glx/glxcmds.c:643 #10 0x00007f246350d100 in __glXDispatch (client=<optimized out>) at ../../glx/glxext.c:606 #11 0x00000000004368fe in Dispatch () at ../../dix/dispatch.c:433 #12 0x000000000043a6ba in dix_main (argc=3, argv=0x7fff99253568, envp=<optimized out>) at ../../dix/main.c:294 -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev