Re: [Mesa-dev] [PATCH 0/6] glsl: Add support for switch statements
On Fri, 17 Jun 2011 17:43:14 -0700, Dan McCabe zen3d.li...@gmail.com wrote: break; // implicit exit from loop at end of switch } while (true); Seems like this could just be } while (false); as I don't see any way the loop could go around more than once. -- keith.pack...@intel.com pgpD9dWnmhI7Q.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/4 resend] glx: Allow a context-specific fallback for glXGetProcAddress
In applegl, GLX advertises the same extensions provided by OpenGL.framework even if such extensions are not provided by glapi. This allows a client to get access to such API. Signed-off-by: Jeremy Huddleston jerem...@apple.com --- src/glx/applegl_glx.c |9 + src/glx/dri2_glx.c |1 + src/glx/dri_glx.c |1 + src/glx/drisw_glx.c|1 + src/glx/glxclient.h|2 +- src/glx/glxcmds.c |6 ++ src/glx/indirect_glx.c |1 + 7 files changed, 20 insertions(+), 1 deletions(-) diff --git origin/master/src/glx/applegl_glx.c origin/master/src/glx/applegl_glx.c index 4bf4672..8766c88 100644 --- origin/master/src/glx/applegl_glx.c +++ origin/master/src/glx/applegl_glx.c @@ -34,10 +34,12 @@ #if defined(GLX_USE_APPLEGL) #include stdbool.h +#include dlfcn.h #include glxclient.h #include apple_glx_context.h #include apple_glx.h +#include apple_cgl.h #include glx_error.h static void @@ -82,6 +84,12 @@ applegl_wait_x(struct glx_context *gc) apple_glx_waitx(dpy, gc-driContext); } +static void * +applegl_get_proc_address(const char *symbol) +{ + return dlsym(apple_cgl_get_dl_handle(), symbol); +} + static const struct glx_context_vtable applegl_context_vtable = { applegl_destroy_context, applegl_bind_context, @@ -91,6 +99,7 @@ static const struct glx_context_vtable applegl_context_vtable = { DRI_glXUseXFont, NULL, /* bind_tex_image, */ NULL, /* release_tex_image, */ + applegl_get_proc_address, }; struct glx_context * diff --git origin/master/src/glx/dri2_glx.c origin/master/src/glx/dri2_glx.c index e7c18ff..80e4da3 100644 --- origin/master/src/glx/dri2_glx.c +++ origin/master/src/glx/dri2_glx.c @@ -767,6 +767,7 @@ static const struct glx_context_vtable dri2_context_vtable = { DRI_glXUseXFont, dri2_bind_tex_image, dri2_release_tex_image, + NULL, /* get_proc_address */ }; static void diff --git origin/master/src/glx/dri_glx.c origin/master/src/glx/dri_glx.c index d59784c..6f3b2b8 100644 --- origin/master/src/glx/dri_glx.c +++ origin/master/src/glx/dri_glx.c @@ -558,6 +558,7 @@ static const struct glx_context_vtable dri_context_vtable = { DRI_glXUseXFont, NULL, NULL, + NULL, /* get_proc_address */ }; static struct glx_context * diff --git origin/master/src/glx/drisw_glx.c origin/master/src/glx/drisw_glx.c index 0075695..07d4955 100644 --- origin/master/src/glx/drisw_glx.c +++ origin/master/src/glx/drisw_glx.c @@ -296,6 +296,7 @@ static const struct glx_context_vtable drisw_context_vtable = { DRI_glXUseXFont, NULL, NULL, + NULL, /* get_proc_address */ }; static struct glx_context * diff --git origin/master/src/glx/glxclient.h origin/master/src/glx/glxclient.h index 88a6edd..0641528 100644 --- origin/master/src/glx/glxclient.h +++ origin/master/src/glx/glxclient.h @@ -224,7 +224,7 @@ struct glx_context_vtable { GLXDrawable drawable, int buffer, const int *attrib_list); void (*release_tex_image)(Display * dpy, GLXDrawable drawable, int buffer); - + void * (*get_proc_address)(const char *symbol); }; extern void diff --git origin/master/src/glx/glxcmds.c origin/master/src/glx/glxcmds.c index cd8bc97..e6816ea 100644 --- origin/master/src/glx/glxcmds.c +++ origin/master/src/glx/glxcmds.c @@ -2521,6 +2521,12 @@ _X_EXPORT void (*glXGetProcAddressARB(const GLubyte * procName)) (void) #endif if (!f) f = (gl_function) _glapi_get_proc_address((const char *) procName); + if (!f) { + struct glx_context *gc = __glXGetCurrentContext(); + + if (gc != NULL gc-vtable-get_proc_address != NULL) +f = gc-vtable-get_proc_address((const char *) procName); + } } return f; } diff --git origin/master/src/glx/indirect_glx.c origin/master/src/glx/indirect_glx.c index b4f16c7..7b542dd 100644 --- origin/master/src/glx/indirect_glx.c +++ origin/master/src/glx/indirect_glx.c @@ -335,6 +335,7 @@ static const struct glx_context_vtable indirect_context_vtable = { indirect_use_x_font, indirect_bind_tex_image, indirect_release_tex_image, + NULL, /* get_proc_address */ }; /** -- 1.7.5.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/6] configure.ac: remove redundant option --enable-gallium-egl
On Thu, Jun 16, 2011 at 7:02 AM, Chia-I Wu olva...@gmail.com wrote: On Thu, Jun 16, 2011 at 10:20 AM, Marek Olšák mar...@gmail.com wrote: Why not to use egl_dri2 for all drivers, the classic and gallium ones? Why not to build a single fully-replaceable binary for a driver, like classic swrast_dri.so can be replaced by swrastg_dri.so from Gallium? Like radeon_drv.so from xf86-video-ati can be replaced by r300_drv.so from Gallium? I thought it had been agreed long ago that Gallium is a private unstable interface inside drivers and shouldn't be exposed publicly in any way. With that, I see no reason for egl_gallium.so to exist. egl_gallium supports OpenVG and some EGL extensions not supported by egl_dri2. SCons's build of egl_gallium does not expose any internal interface. I can(/should have) adjust autoconf-based build not to too. OK, I didn't know about that. Maybe we can have egl_dri2 enabled and egl_gallium disabled when --enable-egl, and has the option to enable egl_gallium? Then maybe have --enable-openvg depend on egl_gallium? Sounds good. Marek ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 38454] New: [KMS] ATI RV280 ennoying many OpenGL troubles
https://bugs.freedesktop.org/show_bug.cgi?id=38454 Summary: [KMS] ATI RV280 ennoying many OpenGL troubles Product: Mesa Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: major Priority: medium Component: Mesa core AssignedTo: mesa-dev@lists.freedesktop.org ReportedBy: sagittar...@laposte.net Created an attachment (id=48142) -- (https://bugs.freedesktop.org/attachment.cgi?id=48142) Xorg conf, log and screenshots Mageia Distro 1: x11-driver-video-ati-6.14.1-4.mga1 2.6.38.7-desktop-1.mga mesa git Just come to build mesa git again and here are the troubles I've noticed: - spectex displays black screen and works only if Disabling HW TCL support is true - projtex do not work properly (the girl is dark, objects too), it needs disabling HW TCL support too - lobdias does not display properly - fbo_firecube broken : Error: unable to get usable FBO combination! - blender fonts are blurry (bug 38070) I've build mesa git for 32 bits linux architecture too on my x86_64 system giving parameters to autogen.sh : –enable-glx-tls –enable-32-bit –with-dri-driverdir=/opt/xorg/lib/dri –libdir=/opt/xorg/lib CC= »gcc -m32″ CXX= »c++ -m32″ Here is the result: # ldconfig -p | grep libGL.so libGL.so.1 (libc6,x86-64, Système d'exploitation ABI : Linux 2.4.20) = /opt/xorg/lib64/libGL.so.1 libGL.so.1 (libc6,x86-64) = /usr/lib64/libGL.so.1 libGL.so.1 (libc6, Système d'exploitation ABI : Linux 2.4.20) = /opt/xorg/lib/libGL.so.1 libGL.so.1 (libc6) = /usr/lib/libGL.so.1 libGL.so (libc6,x86-64, Système d'exploitation ABI : Linux 2.4.20) = /opt/xorg/lib64/libGL.so libGL.so (libc6,x86-64) = /usr/lib64/libGL.so libGL.so (libc6, Système d'exploitation ABI : Linux 2.4.20) = /opt/xorg/lib/libGL.so libGL.so (libc6) = /usr/lib/libGL.so I wanted to be able to use proprietary software DraftSight. But it is really unusable. Even on stock distro, windows, dialogboxes and menus (KDE and Gnome) just few ms before displaying correctly, show horizontal black stripes on white background. Running software with LIBGL_DEBUG=1 does not give any error. I whish I could help. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/6] configure.ac: remove redundant option --enable-gallium-egl
On Tue, Jun 14, 2011 at 10:35 PM, Benjamin Franzke benjaminfran...@googlemail.com wrote: Removing this flag seems right to me, but always building the egl state tracker when gallium and egl is enabled not. So when --with-state-trackers is also removed, we'd need a new --with-egl-drivers=auto|gallium,dri2,glx or so. I decided to add back --enable-gallium-egl as a temporary way to enable/disable egl_gallium. Does the attached patch look okay to you? Is the help string correct? Please review. Marek 0001-configure.ac-add-back-enable-gallium-egl.patch Description: application/pgp-keys ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 8/8] i965: Enable extension GL_ARB_shader_texture_lod.
On Fri, 17 Jun 2011 20:01:28 -0700, Kenneth Graunke kenn...@whitecape.org wrote: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36987 Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel/intel_extensions.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 3fd987a..64c996c 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -172,6 +172,7 @@ static const struct dri_extension brw_extensions[] = { { GL_ARB_occlusion_query,GL_ARB_occlusion_query_functions }, { GL_ARB_point_sprite,NULL }, { GL_ARB_seamless_cube_map, NULL }, + { GL_ARB_shader_texture_lod, NULL }, { GL_ARB_shadow, NULL }, #ifdef TEXTURE_FLOAT_ENABLED { GL_ARB_texture_float, NULL }, Update relnotes in this patch, and you get: Reviewed-by: Eric Anholt e...@anholt.net pgpgmFttYJLQf.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/mesa: try the app's texture format first before using the internal format.
2011/6/17 Stéphane Marchesin stephane.marche...@gmail.com: 2011/6/17 Brian Paul bri...@vmware.com: On 06/17/2011 12:34 PM, Stéphane Marchesin wrote: If we can find it, that means we don't need to do texture format conversion and therefore we get fast texture uploads for natively supported formats. --- src/mesa/state_tracker/st_format.c | 25 + 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 3583571..e39d835 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -615,16 +615,16 @@ static struct format_mapping format_map[] = { { PIPE_FORMAT_B10G10R10A2_UNORM, DEFAULT_RGBA_FORMATS } }, { - { 4, GL_RGBA, GL_RGBA8, 0 }, - { DEFAULT_RGBA_FORMATS, 0 } - }, - { { GL_BGRA, 0 }, { PIPE_FORMAT_B8G8R8A8_UNORM, DEFAULT_RGBA_FORMATS } }, { + { 4, GL_RGBA, GL_RGBA8, 0 }, + { PIPE_FORMAT_R8G8B8A8_UNORM, DEFAULT_RGBA_FORMATS } + }, + { { 3, GL_RGB, GL_RGB8, 0 }, - { DEFAULT_RGB_FORMATS, 0 } + { PIPE_FORMAT_R8G8B8X8_UNORM, DEFAULT_RGB_FORMATS } }, We should just add PIPE_FORMAT_R8G8B8A8_UNORM to DEFAULT_RGBA_FORMATS. Well, if we do that, we have RGBA8 taking precedence in the BGRA case also, which now makes BGRA transfers slow because there is format conversion going on... I guess what I want is the following: implement RGBA8 and BGRA8 in the driver, and when apps request a texture we try to use a format that require no conversion. Right. IIRC, a number of the legacy DRI drivers have code that looks at the user's glTexImage format and type and try to choose a hardware format to avoid swizzling, etc (when there's a choice in hw formats). We've never had that in the gallium state tracker. Looks like st_choose_format() needs to be a bit smarter. Off-hand, I guess we could have another table that exactly maps particular format/type/internalFormat combinations to PIPE_FORMATs. Or maybe just some hard-wired code for the common cases. More below... I don't think this is right. The internalFormat is more important the format parameter. Suppose the user called glTexImage(internalFormat=GL_RGBA32F_ARB, format=GL_RGBA, type=GL_FLOAT). We can't choose the hw format based on format=GL_RGBA since we won't get the float format the user wants. Hmm you're right. So the reason is that I implemented native RGBA support in i915g (it currently only has BGRA), but it doesn't get used because BGRA gets used instead in all cases. I guess right now I'd like to see the BGRA driver format used when the user gives us RGBA/BGRA and the RGBA format used when the user gives us RGBA/RGBA (that would avoid conversion in both cases). Should I just add a heuristic for that or do we want to be more generic? Can you think of other cases we want to handle? I just want to avoid the conversion overhead for those basic formats. Take a look at the legacy DRI drivers. I think radeon_texture.c has code that examines format/type/internalFormat to choose the hw format. Maybe you can re-use that or make something nicer that does the same thing. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/6] configure.ac: remove redundant option --enable-gallium-egl
On Sun, Jun 19, 2011 at 4:00 AM, Marek Olšák mar...@gmail.com wrote: On Tue, Jun 14, 2011 at 10:35 PM, Benjamin Franzke benjaminfran...@googlemail.com wrote: Removing this flag seems right to me, but always building the egl state tracker when gallium and egl is enabled not. So when --with-state-trackers is also removed, we'd need a new --with-egl-drivers=auto|gallium,dri2,glx or so. I decided to add back --enable-gallium-egl as a temporary way to enable/disable egl_gallium. Does the attached patch look okay to you? Is the help string correct? Please review. I did not look at the whole series, but this patch looks good to me. Thanks for working on this. Marek -- o...@lunarg.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] mesa: Don't clamp GetTexImage results post RGB-L if !ClampReadColor.
Fixes oglconform failure about our ARB_texture_float GetTexImage. Note that clamping does not appear in the Conversion to L stage of the GL 3.2 spec, and the next stage of Final conversion does clamping according to CLAMP_READ_COLOR. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36892 --- src/mesa/main/texgetimage.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 26c2ff9..fa6535e 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -254,7 +254,15 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions, * containing negative values to unsigned format. */ if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) { - transferOps |= IMAGE_CLAMP_BIT; + /* Apply ARB_color_buffer_float clamping control. Note that we + * don't use _ClampReadColor because we care about the + * float-ness of the texture, not the fb. + */ + if (ctx-Color.ClampReadColor == GL_TRUE || + (ctx-Color.ClampReadColor == GL_FIXED_ONLY + _mesa_get_format_datatype(texImage-TexFormat) != GL_FLOAT)) { +transferOps |= IMAGE_CLAMP_BIT; + } } else if (!type_with_negative_values(type) (dataType == GL_FLOAT || -- 1.7.5.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev