[Mesa-dev] [Bug 57852] swrast_dri.so.tmp: undefined reference to `clock_gettime'
https://bugs.freedesktop.org/show_bug.cgi?id=57852 Dave Airlie airl...@freedesktop.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #6 from Dave Airlie airl...@freedesktop.org --- should be fixed in master now. reopen if not. -- 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
[Mesa-dev] [PATCH] gallium/os: fixup os_time_get and os_time_get_nano
So it appears MacOSX doesn't have clock_gettime, so workaround that, and switch to using a consistent clock everywhere, (CLOCK_MONOTONIC in case of non-MacOSX UNIX). I'm sure there are more surprised lying in wait. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/auxiliary/os/os_time.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c index 4055125..d3fc805 100644 --- a/src/gallium/auxiliary/os/os_time.c +++ b/src/gallium/auxiliary/os/os_time.c @@ -46,11 +46,22 @@ #include os_time.h +#if defined(PIPE_OS_UNIX) !defined(PIPE_OS_APPLE) +/* MacOSX doesn't have clock_gettime, not sure about other UNIX/HURD */ +#define HAVE_CLOCK_GETTIME 1 +#endif +/* + * when we have clock_gettime use get nano to define time get, + * when we don't have it work vice-versa, should avoid extra + * conversions. + */ int64_t os_time_get(void) { -#if defined(PIPE_OS_UNIX) +#if defined(HAVE_CLOCK_GETTIME) + return os_time_get_nano() / 1000; +#elif defined(PIPE_UNIX) struct timeval tv; gettimeofday(tv, NULL); @@ -72,12 +83,11 @@ os_time_get(void) uint64_t os_time_get_nano(void) { -#if defined(PIPE_OS_UNIX) +#if defined(HAVE_CLOCK_GETTIME) struct timespec tv; - clock_gettime(CLOCK_REALTIME, tv); + clock_gettime(CLOCK_MONOTONIC, tv); return tv.tv_nsec + tv.tv_sec * 10LL; - -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) +#else return os_time_get() * 1000; #endif } -- 1.7.11.7 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] llvmpipe: Implement PIPE_QUERY_TIMESTAMP and PIPE_QUERY_TIME_ELAPSED.
On Mon, Dec 03, 2012 at 09:29:54AM -0800, Jose Fonseca wrote: - Original Message - On Mon, Dec 3, 2012 at 7:33 PM, Dave Airlie airl...@gmail.com wrote: diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c index 3e9d50a..4055125 100644 --- a/src/gallium/auxiliary/os/os_time.c +++ b/src/gallium/auxiliary/os/os_time.c @@ -36,6 +36,7 @@ #include pipe/p_config.h #if defined(PIPE_OS_UNIX) +# include time.h /* timeval */ # include sys/time.h /* timeval */ #elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) # include windows.h @@ -68,6 +69,20 @@ os_time_get(void) } +uint64_t +os_time_get_nano(void) +{ +#if defined(PIPE_OS_UNIX) + struct timespec tv; + clock_gettime(CLOCK_REALTIME, tv); + return tv.tv_nsec + tv.tv_sec * 10LL; + +#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) + return os_time_get() * 1000; +#endif +} I wonder if we should be using CLOCK_MONOTONIC_RAW (on new Linux) or CLOCK_MONOTONIC here, but I also wonder if we should do the same for os_time_get so they are the same clock. I ran some piglits on this, and it found it doesn't provide the screen-get_timestamp callback, but that looks like a trivial addition, though with that it still fails a test, I'll see if I can spot the problem. Okay the attached patch fixes up the piglit fails I see with this patch. feel free to merge it in. Merged and commited. Thanks! I think you're right about CLOCK_MONOTONIC. Not sure how to detect CLOCK_MONOTONIC_RAW run/compile time. So let's do that in a follow on change. I think that it is unnecessary to have two implementations of os_time_get_nano/os_time_get. os_time_get should be re-defined in term of os_time_get_nano, since it is more general. Fyi the kernel pageflip timestamping just switched to CLOCK_MONOTONIC for 3.8 by default (well, for those drivers that use the new timestamp event generation helpers). We've decided against _RAW since alsa/v4l also use the monotonic clock, leading to nice unified timestamps accross all things linux media. Hence I think pipe queries should do the same, just for consistency. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 03/10] r600g: transfers of MSAA color textures should do the resolve
On 04.12.2012 01:07, Marek Olšák wrote: so that ReadPixels and various fallbacks work. Err, shouldn't the state tracker do the resolve ? What if someone wants to read back the individual samples ? Yes, I know this adds a few complications, like how they are stored for the transfer (maybe read them with separate transfers ? - yes, slow), and that you get an extra copy because you won't be able to directly write to a staging resource, but I really dislike this implicit resolve ... --- src/gallium/drivers/r600/r600_texture.c | 37 ++- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 0054c5b..d6d1b3d 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -31,18 +31,38 @@ #include util/u_format_s3tc.h #include util/u_memory.h + /* Copy from a full GPU texture to a transfer's staging one. */ static void r600_copy_to_staging_texture(struct pipe_context *ctx, struct r600_transfer *rtransfer) { struct pipe_transfer *transfer = (struct pipe_transfer*)rtransfer; - struct pipe_resource *texture = transfer-resource; + struct pipe_resource *dst = rtransfer-staging-b.b; + struct pipe_resource *src = transfer-resource; - ctx-resource_copy_region(ctx, rtransfer-staging-b.b, - 0, 0, 0, 0, texture, transfer-level, - transfer-box); + if (src-nr_samples = 1) { + ctx-resource_copy_region(ctx, dst, 0, 0, 0, 0, + src, transfer-level, transfer-box); + } else { + /* Resolve the resource. */ + struct pipe_blit_info blit; + + memset(blit, 0, sizeof(blit)); + blit.src.resource = src; + blit.src.format = src-format; + blit.src.level = transfer-level; + blit.src.box = transfer-box; + blit.dst.resource = dst; + blit.dst.format = dst-format; + blit.dst.box.width = transfer-box.width; + blit.dst.box.height = transfer-box.height; + blit.dst.box.depth = transfer-box.depth; + blit.mask = PIPE_MASK_RGBA; + blit.filter = PIPE_TEX_FILTER_NEAREST; + + ctx-blit(ctx, blit); + } } - /* Copy from a transfer's staging texture to a full GPU one. */ static void r600_copy_from_staging_texture(struct pipe_context *ctx, struct r600_transfer *rtransfer) { @@ -715,6 +735,13 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx, */ struct r600_texture *staging_depth; + assert(rtex-resource.b.b.nr_samples = 1); + if (rtex-resource.b.b.nr_samples 1) { + R600_ERR(mapping MSAA zbuffer unimplemented\n); + FREE(trans); + return NULL; + } + if (!r600_init_flushed_depth_texture(ctx, texture, staging_depth)) { R600_ERR(failed to create temporary texture to hold untiled copy\n); FREE(trans); ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCHv2 automake] gallium/auxiliary: Add possibility to build libgallium shared.
On Die, 2012-12-04 at 02:45 +0100, Johannes Obermayr wrote: diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am index a4eee47..0e34bee 100644 --- a/src/gallium/auxiliary/Makefile.am +++ b/src/gallium/auxiliary/Makefile.am @@ -3,8 +3,16 @@ AUTOMAKE_OPTIONS = subdir-objects include Makefile.sources include $(top_srcdir)/src/gallium/Automake.inc +if HAVE_SHARED_GALLIUM + +lib_LTLIBRARIES = libgallium.la This should probably be something like libgallium-major-minor.la, so binaries from different versions can be used in parallel. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 03/10] r600g: transfers of MSAA color textures should do the resolve
It's the easiest approach and it's pretty much what Intel does. There's a lot of fallbacks which map textures and this makes them trivially work. Note that this is mainly for the window-system multi-sample framebuffer, which must implemented the same features as a single-sample one has. That means ReadPixels, CopyTex*Image and CopyPixels are allowed, unlike a multisample FBO which generates INVALID_OPERATION in those functions. Also radeons cannot map MSAA textures directly. r300 cannot map them at all, r600 can map only one sample at a time (or it would have to copy each sample to a separate layer). Marek On Tue, Dec 4, 2012 at 12:35 PM, Christoph Bumiller e0425...@student.tuwien.ac.at wrote: On 04.12.2012 01:07, Marek Olšák wrote: so that ReadPixels and various fallbacks work. Err, shouldn't the state tracker do the resolve ? What if someone wants to read back the individual samples ? Yes, I know this adds a few complications, like how they are stored for the transfer (maybe read them with separate transfers ? - yes, slow), and that you get an extra copy because you won't be able to directly write to a staging resource, but I really dislike this implicit resolve ... --- src/gallium/drivers/r600/r600_texture.c | 37 ++- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 0054c5b..d6d1b3d 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -31,18 +31,38 @@ #include util/u_format_s3tc.h #include util/u_memory.h + /* Copy from a full GPU texture to a transfer's staging one. */ static void r600_copy_to_staging_texture(struct pipe_context *ctx, struct r600_transfer *rtransfer) { struct pipe_transfer *transfer = (struct pipe_transfer*)rtransfer; - struct pipe_resource *texture = transfer-resource; + struct pipe_resource *dst = rtransfer-staging-b.b; + struct pipe_resource *src = transfer-resource; - ctx-resource_copy_region(ctx, rtransfer-staging-b.b, - 0, 0, 0, 0, texture, transfer-level, - transfer-box); + if (src-nr_samples = 1) { + ctx-resource_copy_region(ctx, dst, 0, 0, 0, 0, + src, transfer-level, transfer-box); + } else { + /* Resolve the resource. */ + struct pipe_blit_info blit; + + memset(blit, 0, sizeof(blit)); + blit.src.resource = src; + blit.src.format = src-format; + blit.src.level = transfer-level; + blit.src.box = transfer-box; + blit.dst.resource = dst; + blit.dst.format = dst-format; + blit.dst.box.width = transfer-box.width; + blit.dst.box.height = transfer-box.height; + blit.dst.box.depth = transfer-box.depth; + blit.mask = PIPE_MASK_RGBA; + blit.filter = PIPE_TEX_FILTER_NEAREST; + + ctx-blit(ctx, blit); + } } - /* Copy from a transfer's staging texture to a full GPU one. */ static void r600_copy_from_staging_texture(struct pipe_context *ctx, struct r600_transfer *rtransfer) { @@ -715,6 +735,13 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx, */ struct r600_texture *staging_depth; + assert(rtex-resource.b.b.nr_samples = 1); + if (rtex-resource.b.b.nr_samples 1) { + R600_ERR(mapping MSAA zbuffer unimplemented\n); + FREE(trans); + return NULL; + } + if (!r600_init_flushed_depth_texture(ctx, texture, staging_depth)) { R600_ERR(failed to create temporary texture to hold untiled copy\n); FREE(trans); ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/3] mesa: Disallow deprecated SNORM formats for renderbuffers
I'm okay with this patch. Reviewed-by: Marek Olšák mar...@gmail.com Marek On Tue, Dec 4, 2012 at 6:31 AM, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com The OpenGL 3.2 core profile spec says: The following base internal formats from table 3.11 are color-renderable: RED, RG, RGB, and RGBA. The sized internal formats from table 3.12 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable. The OpenGL 3.2 compatibility profile spec says (only ALPHA is added): The following base internal formats from table 3.16 are color-renderable: ALPHA, RED, RG, RGB, and RGBA. The sized internal formats from table 3.17 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable. Table 3.12 in the core profile spec and table 3.17 in the compatibility profile spec list SNORM formats as having a base internal format of RED, RG, RGB, or RGBA. From this we infer that they should also be color renderable. The OpenGL ES 3.0 spec says: An internal format is color-renderable if it is one of the formats from table 3.12 noted as color-renderable or if it is unsized format RGBA or RGB. No other formats, including compressed internal formats, are color-renderable. In the OpenGL ES 3.0 spec, none of the SNORM formats have color- renderable marked in table 3.12. The RGB I and UI formats also are not color-renderable in ES3, but we'll save that change for another patch. As a data point, NVIDIA's closed-source driver (version 304.64) rejects *all* SNORM formats for renderbuffers in an OpenGL 4.x compatibility profile. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Cc: Matt Turner matts...@gmail.com Cc: Marek Olšák mar...@gmail.com --- src/mesa/main/fbobject.c | 38 -- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index ce77b9f..ab53bac 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1169,35 +1169,23 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) return ctx-API != API_OPENGLES ctx-Extensions.ARB_texture_rg ? GL_RG : 0; /* signed normalized texture formats */ - case GL_R8_SNORM: - return ctx-Version = 30 - || (ctx-API == API_OPENGL_COMPAT ctx-Extensions.EXT_texture_snorm) - ? GL_RED : 0; case GL_RED_SNORM: + case GL_R8_SNORM: case GL_R16_SNORM: return _mesa_is_desktop_gl(ctx) ctx-Extensions.EXT_texture_snorm ? GL_RED : 0; - case GL_RG8_SNORM: - return ctx-Version = 30 - || (ctx-API == API_OPENGL_COMPAT ctx-Extensions.EXT_texture_snorm) - ? GL_RG : 0; case GL_RG_SNORM: + case GL_RG8_SNORM: case GL_RG16_SNORM: return _mesa_is_desktop_gl(ctx) ctx-Extensions.EXT_texture_snorm ? GL_RG : 0; - case GL_RGB8_SNORM: - return ctx-Version = 30 - || (ctx-API == API_OPENGL_COMPAT ctx-Extensions.EXT_texture_snorm) - ? GL_RGB : 0; case GL_RGB_SNORM: + case GL_RGB8_SNORM: case GL_RGB16_SNORM: return _mesa_is_desktop_gl(ctx) ctx-Extensions.EXT_texture_snorm ? GL_RGB : 0; - case GL_RGBA8_SNORM: - return ctx-Version = 30 - || (ctx-API == API_OPENGL_COMPAT ctx-Extensions.EXT_texture_snorm) - ? GL_RGBA : 0; case GL_RGBA_SNORM: + case GL_RGBA8_SNORM: case GL_RGBA16_SNORM: return _mesa_is_desktop_gl(ctx) ctx-Extensions.EXT_texture_snorm ? GL_RGBA : 0; @@ -1207,24 +1195,6 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) return ctx-API == API_OPENGL_COMPAT ctx-Extensions.EXT_texture_snorm ctx-Extensions.ARB_framebuffer_object ? GL_ALPHA : 0; - case GL_LUMINANCE_SNORM: - case GL_LUMINANCE8_SNORM: - case GL_LUMINANCE16_SNORM: - return ctx-API == API_OPENGL_COMPAT - ctx-Extensions.EXT_texture_snorm - ctx-Extensions.ARB_framebuffer_object ? GL_LUMINANCE : 0; - case GL_LUMINANCE_ALPHA_SNORM: - case GL_LUMINANCE8_ALPHA8_SNORM: - case GL_LUMINANCE16_ALPHA16_SNORM: - return ctx-API == API_OPENGL_COMPAT - ctx-Extensions.EXT_texture_snorm - ctx-Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0; - case GL_INTENSITY_SNORM: - case GL_INTENSITY8_SNORM: - case GL_INTENSITY16_SNORM: - return ctx-API == API_OPENGL_COMPAT - ctx-Extensions.EXT_texture_snorm - ctx-Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0; case GL_R16F: case GL_R32F: return ctx-Version = 30 -- 1.7.11.7
[Mesa-dev] [PATCH] clover: Install CL headers.
Note: This is a candidate for the stable branches. --- src/gallium/state_trackers/clover/Makefile.am | 10 ++ 1 Datei geändert, 10 Zeilen hinzugefügt(+) diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am index c37d010..f068164 100644 --- a/src/gallium/state_trackers/clover/Makefile.am +++ b/src/gallium/state_trackers/clover/Makefile.am @@ -74,3 +74,13 @@ libclover_la_SOURCES = \ api/event.cpp \ api/program.cpp \ api/kernel.cpp + +cldir = $(includedir)/CL +cl_HEADERS = \ + $(top_srcdir)/include/CL/cl.h \ + $(top_srcdir)/include/CL/cl_ext.h \ + $(top_srcdir)/include/CL/cl_gl.h \ + $(top_srcdir)/include/CL/cl_gl_ext.h \ + $(top_srcdir)/include/CL/cl_platform.h \ + $(top_srcdir)/include/CL/opencl.h \ + $(top_srcdir)/include/CL/cl.hpp \ -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] clover: Install CL headers.
Note: This is a candidate for the stable branches. --- v2: remove trailing \ in last line. --- src/gallium/state_trackers/clover/Makefile.am | 10 ++ 1 Datei geändert, 10 Zeilen hinzugefügt(+) diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am index c37d010..f068164 100644 --- a/src/gallium/state_trackers/clover/Makefile.am +++ b/src/gallium/state_trackers/clover/Makefile.am @@ -74,3 +74,13 @@ libclover_la_SOURCES = \ api/event.cpp \ api/program.cpp \ api/kernel.cpp + +cldir = $(includedir)/CL +cl_HEADERS = \ + $(top_srcdir)/include/CL/cl.h \ + $(top_srcdir)/include/CL/cl_ext.h \ + $(top_srcdir)/include/CL/cl_gl.h \ + $(top_srcdir)/include/CL/cl_gl_ext.h \ + $(top_srcdir)/include/CL/cl_platform.h \ + $(top_srcdir)/include/CL/opencl.h \ + $(top_srcdir)/include/CL/cl.hpp -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] gallium/os: fixup os_time_get and os_time_get_nano
Maybe we should be inclusive, i.e., only set HAVE_CLOCK_GETTIME on platforms we know it exists like linux. This is what apitrace has currently: https://github.com/apitrace/apitrace/blob/master/common/os_time.hpp#L64 . Either way, Reviewed-by: Jose Fonseca jfons...@vmware.com Jose - Original Message - So it appears MacOSX doesn't have clock_gettime, so workaround that, and switch to using a consistent clock everywhere, (CLOCK_MONOTONIC in case of non-MacOSX UNIX). I'm sure there are more surprised lying in wait. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/auxiliary/os/os_time.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c index 4055125..d3fc805 100644 --- a/src/gallium/auxiliary/os/os_time.c +++ b/src/gallium/auxiliary/os/os_time.c @@ -46,11 +46,22 @@ #include os_time.h +#if defined(PIPE_OS_UNIX) !defined(PIPE_OS_APPLE) +/* MacOSX doesn't have clock_gettime, not sure about other UNIX/HURD */ +#define HAVE_CLOCK_GETTIME 1 +#endif +/* + * when we have clock_gettime use get nano to define time get, + * when we don't have it work vice-versa, should avoid extra + * conversions. + */ int64_t os_time_get(void) { -#if defined(PIPE_OS_UNIX) +#if defined(HAVE_CLOCK_GETTIME) + return os_time_get_nano() / 1000; +#elif defined(PIPE_UNIX) struct timeval tv; gettimeofday(tv, NULL); @@ -72,12 +83,11 @@ os_time_get(void) uint64_t os_time_get_nano(void) { -#if defined(PIPE_OS_UNIX) +#if defined(HAVE_CLOCK_GETTIME) struct timespec tv; - clock_gettime(CLOCK_REALTIME, tv); + clock_gettime(CLOCK_MONOTONIC, tv); return tv.tv_nsec + tv.tv_sec * 10LL; - -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) +#else return os_time_get() * 1000; #endif } -- 1.7.11.7 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] gallivm: Generalize lp_build_mul and lp_build_lerp for signed normalized types.
From: José Fonseca jfons...@vmware.com This fixes fdo bug 57755 and most of the failures of piglit fbo-blending-formats GL_EXT_texture_snorm. GL_INTENSITY_SNORM is still failing, but problem is probably elsewhere, as GL_R8_SNORM works fine. --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 174 +-- 1 file changed, 82 insertions(+), 92 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 33b8f6d..4c6fd9e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -45,6 +45,8 @@ */ +#include float.h + #include util/u_memory.h #include util/u_debug.h #include util/u_math.h @@ -58,9 +60,9 @@ #include lp_bld_logic.h #include lp_bld_pack.h #include lp_bld_debug.h +#include lp_bld_bitarit.h #include lp_bld_arit.h -#include float.h #define EXP_POLY_DEGREE 5 @@ -679,8 +681,12 @@ lp_build_sub(struct lp_build_context *bld, } + /** - * Normalized 8bit multiplication. + * Normalized multiplication. + * + * There are several approaches here (using 8-bit normalized multiplication as + * an example): * * - alpha plus one * @@ -721,66 +727,56 @@ lp_build_sub(struct lp_build_context *bld, * http://www.stereopsis.com/doubleblend.html */ static LLVMValueRef -lp_build_mul_u8n(struct gallivm_state *gallivm, - struct lp_type i16_type, - LLVMValueRef a, LLVMValueRef b) +lp_build_mul_norm(struct gallivm_state *gallivm, + struct lp_type wide_type, + LLVMValueRef a, LLVMValueRef b) { LLVMBuilderRef builder = gallivm-builder; - LLVMValueRef c8; + struct lp_build_context bld; + unsigned bits; + LLVMValueRef shift; + LLVMValueRef half; LLVMValueRef ab; - assert(!i16_type.floating); - assert(lp_check_value(i16_type, a)); - assert(lp_check_value(i16_type, b)); + assert(!wide_type.floating); + assert(lp_check_value(wide_type, a)); + assert(lp_check_value(wide_type, b)); + + lp_build_context_init(bld, gallivm, wide_type); + + bits = wide_type.width / 2; + if (wide_type.sign) { + --bits; + } + + shift = lp_build_const_int_vec(gallivm, wide_type, bits); - c8 = lp_build_const_int_vec(gallivm, i16_type, 8); - #if 0 /* a*b/255 ~= (a*(b + 1)) 256 */ - b = LLVMBuildAdd(builder, b, lp_build_const_int_vec(gallium, i16_type, 1), ); + /* XXX: This would not work for signed types */ + assert(!wide_type.sign); + b = LLVMBuildAdd(builder, b, lp_build_const_int_vec(gallium, wide_type, 1), ); ab = LLVMBuildMul(builder, a, b, ); #else /* ab/255 ~= (ab + (ab 8) + 0x80) 8 */ ab = LLVMBuildMul(builder, a, b, ); - ab = LLVMBuildAdd(builder, ab, LLVMBuildLShr(builder, ab, c8, ), ); - ab = LLVMBuildAdd(builder, ab, lp_build_const_int_vec(gallivm, i16_type, 0x80), ); + ab = LLVMBuildAdd(builder, ab, LLVMBuildLShr(builder, ab, shift, ), ); + + /* Add rounding term */ + half = lp_build_const_int_vec(gallivm, wide_type, 1 (bits - 1)); + if (wide_type.sign) { + LLVMValueRef minus_half = LLVMBuildNeg(builder, half, ); + LLVMValueRef sign = lp_build_shr_imm(bld, half, wide_type.width - 1); + half = lp_build_select(bld, sign, minus_half, half); + } + ab = LLVMBuildAdd(builder, ab, half, ); #endif - ab = LLVMBuildLShr(builder, ab, c8, ); - - return ab; -} - -/** - * Normalized 16bit multiplication. - * - * Utilises same principle as above code. - */ -static LLVMValueRef -lp_build_mul_u16n(struct gallivm_state *gallivm, - struct lp_type i32_type, - LLVMValueRef a, LLVMValueRef b) -{ - LLVMBuilderRef builder = gallivm-builder; - LLVMValueRef c16; - LLVMValueRef ab; - - assert(!i32_type.floating); - assert(lp_check_value(i32_type, a)); - assert(lp_check_value(i32_type, b)); - - c16 = lp_build_const_int_vec(gallivm, i32_type, 16); - - /* ab/65535 ~= (ab + (ab 16) + 0x8000) 16 */ - ab = LLVMBuildMul(builder, a, b, ); - ab = LLVMBuildAdd(builder, ab, LLVMBuildLShr(builder, ab, c16, ), ); - ab = LLVMBuildAdd(builder, ab, lp_build_const_int_vec(gallivm, i32_type, 0x8000), ); - - ab = LLVMBuildLShr(builder, ab, c16, ); + ab = LLVMBuildLShr(builder, ab, shift, ); return ab; } @@ -812,41 +808,20 @@ lp_build_mul(struct lp_build_context *bld, if(a == bld-undef || b == bld-undef) return bld-undef; - if(!type.floating !type.fixed type.norm) { - if(type.width == 8) { - struct lp_type i16_type = lp_wider_type(type); - LLVMValueRef al, ah, bl, bh, abl, abh, ab; - - lp_build_unpack2(bld-gallivm, type, i16_type, a, al, ah); - lp_build_unpack2(bld-gallivm, type, i16_type, b, bl, bh); - - /* PMULLW, PSRLW, PADDW */ - abl = lp_build_mul_u8n(bld-gallivm, i16_type, al, bl); - abh = lp_build_mul_u8n(bld-gallivm, i16_type, ah, bh); - - ab =
Re: [Mesa-dev] [PATCH] scons: Require drm to build gallium/state_trackers/egl/x11/x11_screen.c.
I assume there won't be missing symbols without this file. If so then looks good to me. Jose - Original Message - x11_screen.c includes xf86drm.h, which comes from libdrm-dev. This patch fixes this build error. Compiling src/gallium/state_trackers/egl/x11/x11_screen.c ... src/gallium/state_trackers/egl/x11/x11_screen.c:30:21: fatal error: xf86drm.h: No such file or directory Signed-off-by: Vinson Lee v...@freedesktop.org --- src/gallium/state_trackers/egl/SConscript |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/egl/SConscript b/src/gallium/state_trackers/egl/SConscript index 68c7725..2f7ac7e 100644 --- a/src/gallium/state_trackers/egl/SConscript +++ b/src/gallium/state_trackers/egl/SConscript @@ -36,11 +36,13 @@ else: 'x11/native_x11.c', 'x11/native_dri2.c', 'x11/native_ximage.c', -'x11/x11_screen.c', 'x11/glxinit.c']) if env['drm']: env.Append(CPPDEFINES = ['GLX_DIRECT_RENDERING']) -sources.append(['#/src/glx/dri2.c']) +sources.append([ +'#/src/glx/dri2.c', +'x11/x11_screen.c', +]) if env['drm'] and False: # XXX: Disabled as it depends on gbm, which is not yet built with scons env.Append(CPPDEFINES = ['HAVE_DRM_BACKEND']) -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] automake/gallium: attempt to fix -lrt
Thanks for doing this. Jose - Original Message - From: Dave Airlie airl...@redhat.com I don't think this will fix all the cases, but it should be correct to start with. Signed-off-by: Dave Airlie airl...@redhat.com --- configure.ac | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 803c256..a133902 100644 --- a/configure.ac +++ b/configure.ac @@ -535,6 +535,11 @@ AC_CHECK_FUNC([dlopen], [DEFINES=$DEFINES -DHAVE_DLOPEN], [DEFINES=$DEFINES -DHAVE_DLOPEN; DLOPEN_LIBS=-ldl])]) AC_SUBST([DLOPEN_LIBS]) +AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=], + [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt], + [AC_MSG_ERROR([Couldn't find clock_gettime])])]) +AC_SUBST([CLOCK_LIB]) + dnl See if posix_memalign is available AC_CHECK_FUNC([posix_memalign], [DEFINES=$DEFINES -DHAVE_POSIX_MEMALIGN]) @@ -1121,7 +1126,7 @@ if test x$enable_dri = xyes; then # put all the necessary libs together DRI_LIB_DEPS=$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS -GALLIUM_DRI_LIB_DEPS=$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS +GALLIUM_DRI_LIB_DEPS=$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS fi AM_CONDITIONAL(NEED_LIBDRICORE, test -n $DRI_DIRS) AC_SUBST([DRI_DIRS]) @@ -1390,7 +1395,7 @@ if test x$enable_openvg = xyes; then CORE_DIRS=$CORE_DIRS mapi/vgapi GALLIUM_STATE_TRACKERS_DIRS=vega $GALLIUM_STATE_TRACKERS_DIRS HAVE_ST_VEGA=yes -VG_PC_LIB_PRIV=-lm $PTHREAD_LIBS $DLOPEN_LIBS +VG_PC_LIB_PRIV=-lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS AC_SUBST([VG_PC_LIB_PRIV]) fi -- 1.7.11.7 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/mesa: add null pointer check in st_renderbuffer_delete()
We'll leak strb-surface, but I suspect there is no solution other than fixing the use of surfaces by contexts that didn't create them. Reviewed-by: Jose Fonseca jfons...@vmware.com - Original Message - From: Brian Paul bri...@vmware.com In my testing I haven't found any cases where we get a null context pointer, but it might still be possible. Check for null just to be safe. Note: This is a candidate for the stable branches. --- src/mesa/state_tracker/st_cb_fbo.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 04907c9..ae280bf 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -228,10 +228,10 @@ static void st_renderbuffer_delete(struct gl_context *ctx, struct gl_renderbuffer *rb) { struct st_renderbuffer *strb = st_renderbuffer(rb); - struct st_context *st = st_context(ctx); - struct pipe_context *pipe = st-pipe; - - pipe_surface_release(pipe, strb-surface); + if (ctx) { + struct st_context *st = st_context(ctx); + pipe_surface_release(st-pipe, strb-surface); + } pipe_resource_reference(strb-texture, NULL); free(strb-data); _mesa_delete_renderbuffer(ctx, rb); -- 1.7.4.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/9] tgsi: Increase maximum number of temps to 4096.
From: José Fonseca jfons...@vmware.com To match Shader Model 4 limits, as specified in http://msdn.microsoft.com/en-us/library/windows/desktop/ff471378.aspx --- src/gallium/auxiliary/tgsi/tgsi_exec.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index fc1ee09..fbd28a2 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -128,7 +128,7 @@ struct tgsi_sampler float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]); }; -#define TGSI_EXEC_NUM_TEMPS 128 +#define TGSI_EXEC_NUM_TEMPS 4096 #define TGSI_EXEC_NUM_IMMEDIATES 256 #define TGSI_EXEC_NUM_TEMP_ARRAYS 8 -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/9] util/surface: Always use the surface format when clearing.
From: José Fonseca jfons...@vmware.com Not the texture format, as they might differ. --- src/gallium/auxiliary/util/u_surface.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index e99431e..5b42afd 100644 --- a/src/gallium/auxiliary/util/u_surface.c +++ b/src/gallium/auxiliary/util/u_surface.c @@ -266,13 +266,14 @@ util_clear_depth_stencil(struct pipe_context *pipe, unsigned dstx, unsigned dsty, unsigned width, unsigned height) { + enum pipe_format format = dst-format; struct pipe_transfer *dst_trans; ubyte *dst_map; boolean need_rmw = FALSE; if ((clear_flags PIPE_CLEAR_DEPTHSTENCIL) ((clear_flags PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) - util_format_is_depth_and_stencil(dst-format)) + util_format_is_depth_and_stencil(format)) need_rmw = TRUE; assert(dst-texture); @@ -289,14 +290,14 @@ util_clear_depth_stencil(struct pipe_context *pipe, if (dst_map) { unsigned dst_stride = dst_trans-stride; - uint64_t zstencil = util_pack64_z_stencil(dst-texture-format, + uint64_t zstencil = util_pack64_z_stencil(format, depth, stencil); unsigned i, j; assert(dst_trans-stride 0); - switch (util_format_get_blocksize(dst-format)) { + switch (util_format_get_blocksize(format)) { case 1: - assert(dst-format == PIPE_FORMAT_S8_UINT); + assert(format == PIPE_FORMAT_S8_UINT); if(dst_stride == width) memset(dst_map, (uint8_t) zstencil, height * width); else { @@ -307,7 +308,7 @@ util_clear_depth_stencil(struct pipe_context *pipe, } break; case 2: - assert(dst-format == PIPE_FORMAT_Z16_UNORM); + assert(format == PIPE_FORMAT_Z16_UNORM); for (i = 0; i height; i++) { uint16_t *row = (uint16_t *)dst_map; for (j = 0; j width; j++) @@ -326,10 +327,10 @@ util_clear_depth_stencil(struct pipe_context *pipe, } else { uint32_t dst_mask; -if (dst-format == PIPE_FORMAT_Z24_UNORM_S8_UINT) +if (format == PIPE_FORMAT_Z24_UNORM_S8_UINT) dst_mask = 0xff00; else { - assert(dst-format == PIPE_FORMAT_S8_UINT_Z24_UNORM); + assert(format == PIPE_FORMAT_S8_UINT_Z24_UNORM); dst_mask = 0xff; } if (clear_flags PIPE_CLEAR_DEPTH) -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/9] tgsi: Allow TXF from buffers.
From: José Fonseca jfons...@vmware.com There is more work necessary to properly support buffers in shaders, but this gets things a bit further along. --- src/gallium/auxiliary/tgsi/tgsi_exec.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 1b7150b..9f226c4 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -2061,6 +2061,7 @@ exec_txf(struct tgsi_exec_machine *mach, case TGSI_TEXTURE_1D_ARRAY: IFETCH(r[1], 0, TGSI_CHAN_Y); /* fallthrough */ + case TGSI_TEXTURE_BUFFER: case TGSI_TEXTURE_1D: case TGSI_TEXTURE_SHADOW1D: IFETCH(r[0], 0, TGSI_CHAN_X); -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 4/9] draw: Consider the geometry shader when choosing the vertex size.
From: José Fonseca jfons...@vmware.com A single vertex size is chosen for the whole pipeline. So the number of geometry shader outputs must also be taken in consideration. --- .../auxiliary/draw/draw_pt_fetch_shade_pipeline.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index 27420f0..053ea7d 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -59,12 +59,11 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; struct draw_context *draw = fpme-draw; struct draw_vertex_shader *vs = draw-vs.vertex_shader; + struct draw_geometry_shader *gs = draw-gs.geometry_shader; unsigned i; unsigned instance_id_index = ~0; - unsigned gs_out_prim = (draw-gs.geometry_shader ? - draw-gs.geometry_shader-output_primitive : - prim); + unsigned gs_out_prim = (gs ? gs-output_primitive : prim); /* Add one to num_outputs because the pipeline occasionally tags on * an additional texcoord, eg for AA lines. @@ -72,6 +71,10 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, unsigned nr = MAX2( vs-info.num_inputs, vs-info.num_outputs + 1 ); + if (gs) { + nr = MAX2(nr, gs-info.num_outputs + 1); + } + /* Scan for instanceID system value. */ for (i = 0; i vs-info.num_inputs; i++) { -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 5/9] draw: Use symbolic primitive names in debug output.
From: José Fonseca jfons...@vmware.com --- src/gallium/auxiliary/draw/draw_gs.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index 60e3952..ceaed11 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -424,9 +424,10 @@ int draw_geometry_shader_run(struct draw_geometry_shader *shader, __FUNCTION__, num_input_verts, num_in_primitives); debug_printf(\tlinear = %d, prim_info-count = %d\n, input_prim-linear, input_prim-count); - debug_printf(\tprimt pipe = %d, shader in = %d, shader out = %d, max out = %d\n, -input_prim-prim, shader-input_primitive, -shader-output_primitive, + debug_printf(\tprimt pipe = %s, shader in = %s, shader out = %s, max out = %d\n, +u_prim_name(input_prim-prim), +u_prim_name(shader-input_primitive), +u_prim_name(shader-output_primitive), shader-max_output_vertices); #endif -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 6/9] draw: Properly limit vertex buffer fetches on draw arrays.
From: José Fonseca jfons...@vmware.com We need to clamp vertex buffer fetch based on its size, not based on the user specified max index hint. This matches draw_pt_fetch_run() above. NOTE: This is a candidate for the stable branches. --- src/gallium/auxiliary/draw/draw_pt_fetch.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index a6cc183..9fab7b6 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -189,7 +189,7 @@ draw_pt_fetch_run_linear(struct pt_fetch *fetch, ((char *)draw-pt.user.vbuffer[i] + draw-pt.vertex_buffer[i].buffer_offset), draw-pt.vertex_buffer[i].stride, - draw-pt.user.max_index + draw-pt.user.eltBias); + draw-pt.max_index); } translate-run( translate, -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 7/9] util/u_draw: Skip rendering instead of aborting when excessive number of instances is found.
From: José Fonseca jfons...@vmware.com This is a temporary hack. I believe the only way of properly fixing this is to check buffer overflow just before fetching based on addresses, instead of number of vertices/instances. This change simply allows tests that stress buffer overflows to complete without asserting, and should not affect valid rendering. --- src/gallium/auxiliary/util/u_draw.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_draw.c b/src/gallium/auxiliary/util/u_draw.c index 5b3c412..83d9284 100644 --- a/src/gallium/auxiliary/util/u_draw.c +++ b/src/gallium/auxiliary/util/u_draw.c @@ -108,8 +108,15 @@ util_draw_max_index( else { /* Per-instance data. Simply make sure the state tracker didn't * request more instances than those that fit in the buffer */ -assert((info-start_instance + info-instance_count)/element-instance_divisor - = (buffer_max_index + 1)); +if ((info-start_instance + info-instance_count)/element-instance_divisor + (buffer_max_index + 1)) { + /* FIXME: We really should stop thinking in terms of maximum +* indices/instances and simply start clamping against buffer +* size. */ + debug_printf(%s: too many instances for vertex buffer\n, +__FUNCTION__); + return 0; +} } } } -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 8/9] translate: Fix the fetch function assertions.
From: José Fonseca jfons...@vmware.com fetch_rgba_float is NULL for integer formats, and vice-versa. --- .../auxiliary/translate/translate_generic.c|4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c index 72099af..894c168 100644 --- a/src/gallium/auxiliary/translate/translate_generic.c +++ b/src/gallium/auxiliary/translate/translate_generic.c @@ -806,7 +806,6 @@ struct translate *translate_generic_create( const struct translate_key *key ) util_format_description(key-element[i].input_format); assert(format_desc); - assert(format_desc-fetch_rgba_float); tg-attrib[i].type = key-element[i].type; @@ -820,11 +819,14 @@ struct translate *translate_generic_create( const struct translate_key *key ) } if (format_desc-channel[0].type == UTIL_FORMAT_TYPE_SIGNED) { +assert(format_desc-fetch_rgba_sint); tg-attrib[i].fetch = (fetch_func)format_desc-fetch_rgba_sint; } else { +assert(format_desc-fetch_rgba_uint); tg-attrib[i].fetch = (fetch_func)format_desc-fetch_rgba_uint; } } else { + assert(format_desc-fetch_rgba_float); tg-attrib[i].fetch = (fetch_func)format_desc-fetch_rgba_float; } -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 9/9] util/u_debug: Cleanup/fix debug_dump_image.
From: José Fonseca jfons...@vmware.com - Handle other formats. - Prevent CRLF on Windows. --- src/gallium/auxiliary/util/u_debug.c | 53 ++ src/gallium/auxiliary/util/u_debug.h |4 ++- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index b26192a..9993b67 100644 --- a/src/gallium/auxiliary/util/u_debug.c +++ b/src/gallium/auxiliary/util/u_debug.c @@ -436,7 +436,7 @@ void debug_funclog_enter_exit(const char* f, const int line, const char* file) #ifdef DEBUG /** - * Dump an image to a .raw or .ppm file (depends on OS). + * Dump an image to .ppm file. * \param format PIPE_FORMAT_x * \param cpp bytes per pixel * \param width width in pixels @@ -444,56 +444,47 @@ void debug_funclog_enter_exit(const char* f, const int line, const char* file) * \param stride row stride in bytes */ void debug_dump_image(const char *prefix, - unsigned format, unsigned cpp, + enum pipe_format format, unsigned cpp, unsigned width, unsigned height, unsigned stride, const void *data) { /* write a ppm file */ char filename[256]; + unsigned char *rgb8; FILE *f; util_snprintf(filename, sizeof(filename), %s.ppm, prefix); - f = fopen(filename, w); - if (f) { - int i, x, y; - int r, g, b; - const uint8_t *ptr = (uint8_t *) data; - - /* XXX this is a hack */ - switch (format) { - case PIPE_FORMAT_B8G8R8A8_UNORM: - r = 2; - g = 1; - b = 0; - break; - default: - r = 0; - g = 1; - b = 1; - } + rgb8 = MALLOC(height * width * 3); + if (!rgb8) { + return; + } + util_format_translate( + PIPE_FORMAT_R8G8B8_UNORM, + rgb8, width * 3, + 0, 0, + format, + data, stride, + 0, 0, width, height); + + /* Must be opened in binary mode or DOS line ending causes data +* to be read with one byte offset */ + f = fopen(filename, wb); + if (f) { fprintf(f, P6\n); fprintf(f, # ppm-file created by osdemo.c\n); fprintf(f, %i %i\n, width, height); fprintf(f, 255\n); - fclose(f); - - f = fopen(filename, ab); /* reopen in binary append mode */ - for (y = 0; y height; y++) { - for (x = 0; x width; x++) { -i = y * stride + x * cpp; -fputc(ptr[i + r], f); /* write red */ -fputc(ptr[i + g], f); /* write green */ -fputc(ptr[i + b], f); /* write blue */ - } - } + fwrite(rgb8, 1, height * width * 3, f); fclose(f); } else { fprintf(stderr, Can't open %s for writing\n, filename); } + + FREE(rgb8); } /* FIXME: dump resources, not surfaces... */ diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h index 3b42c2f..0eb7443 100644 --- a/src/gallium/auxiliary/util/u_debug.h +++ b/src/gallium/auxiliary/util/u_debug.h @@ -41,6 +41,8 @@ #include os/os_misc.h +#include pipe/p_format.h + #ifdef __cplusplus extern C { @@ -418,7 +420,7 @@ struct pipe_transfer; struct pipe_resource; void debug_dump_image(const char *prefix, - unsigned format, unsigned cpp, + enum pipe_format format, unsigned cpp, unsigned width, unsigned height, unsigned stride, const void *data); -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 5/9] draw: Use symbolic primitive names in debug output.
On 12/04/2012 07:13 AM, jfons...@vmware.com wrote: From: José Fonsecajfons...@vmware.com --- src/gallium/auxiliary/draw/draw_gs.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index 60e3952..ceaed11 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -424,9 +424,10 @@ int draw_geometry_shader_run(struct draw_geometry_shader *shader, __FUNCTION__, num_input_verts, num_in_primitives); debug_printf(\tlinear = %d, prim_info-count = %d\n, input_prim-linear, input_prim-count); - debug_printf(\tprimt pipe = %d, shader in = %d, shader out = %d, max out = %d\n, -input_prim-prim, shader-input_primitive, -shader-output_primitive, + debug_printf(\tprimt pipe = %s, shader in = %s, shader out = %s, max out = %d\n, +u_prim_name(input_prim-prim), +u_prim_name(shader-input_primitive), +u_prim_name(shader-output_primitive), shader-max_output_vertices); #endif The \tprimt pipe = %s part looks weird. How about \tprim type = %s -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 9/9] util/u_debug: Cleanup/fix debug_dump_image.
On 12/04/2012 07:13 AM, jfons...@vmware.com wrote: From: José Fonsecajfons...@vmware.com - Handle other formats. - Prevent CRLF on Windows. --- src/gallium/auxiliary/util/u_debug.c | 53 ++ src/gallium/auxiliary/util/u_debug.h |4 ++- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index b26192a..9993b67 100644 --- a/src/gallium/auxiliary/util/u_debug.c +++ b/src/gallium/auxiliary/util/u_debug.c @@ -436,7 +436,7 @@ void debug_funclog_enter_exit(const char* f, const int line, const char* file) #ifdef DEBUG /** - * Dump an image to a .raw or .ppm file (depends on OS). + * Dump an image to .ppm file. * \param format PIPE_FORMAT_x * \param cpp bytes per pixel * \param width width in pixels @@ -444,56 +444,47 @@ void debug_funclog_enter_exit(const char* f, const int line, const char* file) * \param stride row stride in bytes */ void debug_dump_image(const char *prefix, - unsigned format, unsigned cpp, + enum pipe_format format, unsigned cpp, unsigned width, unsigned height, unsigned stride, const void *data) { /* write a ppm file */ char filename[256]; + unsigned char *rgb8; FILE *f; util_snprintf(filename, sizeof(filename), %s.ppm, prefix); - f = fopen(filename, w); - if (f) { - int i, x, y; - int r, g, b; - const uint8_t *ptr = (uint8_t *) data; - - /* XXX this is a hack */ - switch (format) { - case PIPE_FORMAT_B8G8R8A8_UNORM: - r = 2; - g = 1; - b = 0; - break; - default: - r = 0; - g = 1; - b = 1; - } + rgb8 = MALLOC(height * width * 3); + if (!rgb8) { + return; + } + util_format_translate( + PIPE_FORMAT_R8G8B8_UNORM, + rgb8, width * 3, + 0, 0, + format, + data, stride, + 0, 0, width, height); + + /* Must be opened in binary mode or DOS line ending causes data +* to be read with one byte offset */ Minor nit: I'd put the closing */ on the next line. + f = fopen(filename, wb); + if (f) { fprintf(f, P6\n); fprintf(f, # ppm-file created by osdemo.c\n); s/osdemo.c/gallium/ fprintf(f, %i %i\n, width, height); fprintf(f, 255\n); - fclose(f); - - f = fopen(filename, ab); /* reopen in binary append mode */ - for (y = 0; y height; y++) { - for (x = 0; x width; x++) { -i = y * stride + x * cpp; -fputc(ptr[i + r], f); /* write red */ -fputc(ptr[i + g], f); /* write green */ -fputc(ptr[i + b], f); /* write blue */ - } - } + fwrite(rgb8, 1, height * width * 3, f); fclose(f); } else { fprintf(stderr, Can't open %s for writing\n, filename); } + + FREE(rgb8); } /* FIXME: dump resources, not surfaces... */ diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h index 3b42c2f..0eb7443 100644 --- a/src/gallium/auxiliary/util/u_debug.h +++ b/src/gallium/auxiliary/util/u_debug.h @@ -41,6 +41,8 @@ #include os/os_misc.h +#include pipe/p_format.h + #ifdef__cplusplus extern C { @@ -418,7 +420,7 @@ struct pipe_transfer; struct pipe_resource; void debug_dump_image(const char *prefix, - unsigned format, unsigned cpp, + enum pipe_format format, unsigned cpp, unsigned width, unsigned height, unsigned stride, const void *data); ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/9] tgsi: Increase maximum number of temps to 4096.
On 12/04/2012 07:13 AM, jfons...@vmware.com wrote: From: José Fonsecajfons...@vmware.com To match Shader Model 4 limits, as specified in http://msdn.microsoft.com/en-us/library/windows/desktop/ff471378.aspx --- src/gallium/auxiliary/tgsi/tgsi_exec.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index fc1ee09..fbd28a2 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -128,7 +128,7 @@ struct tgsi_sampler float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]); }; -#define TGSI_EXEC_NUM_TEMPS 128 +#define TGSI_EXEC_NUM_TEMPS 4096 #define TGSI_EXEC_NUM_IMMEDIATES 256 #define TGSI_EXEC_NUM_TEMP_ARRAYS 8 I had minor comments on #5 and #9. Reviewed-by: Brian Paul bri...@vmware.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 10/10] st/dri: implement MSAA for GLX/DRI2 framebuffers
On 12/03/2012 05:07 PM, Marek Olšák wrote: All MSAA buffers are allocated privately and resolved into the DRI-provided back and front buffers. If an MSAA visual is chosen, the buffers st/mesa receives are all multi-sample. st/mesa doesn't have access to the single-sample buffers in that case. I did a quick read-through of the series and it looks OK to me. Reviewed-by: Brian Paul bri...@vmware.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 57754] [swrast] Mesa 9.1-devel implementation error: Unable to delete renderbuffer, no context
https://bugs.freedesktop.org/show_bug.cgi?id=57754 Brian Paul brian.e.p...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Brian Paul brian.e.p...@gmail.com --- Fixed by 006918c0db77e945ac56b15bc64eba502b86d56c. -- 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] st/egl/drm: only unref the udev device if needed
Anyone interested? ;-) I would just push it, but I don't have the rights to do so. Am Do, 29. November 2012, 17:02:28 schrieben Sie: Fixes compiler warning: drm/native_drm.c: In function ‘native_create_display’: drm/native_drm.c:180:21: warning: ‘device’ may be used uninitialized in this function [-Wmaybe-uninitialized] drm/native_drm.c:157:24: note: ‘device’ was declared here Signed-off-by: Tobias Droste tdro...@gmx.de --- src/gallium/state_trackers/egl/drm/native_drm.c |9 + 1 Datei geändert, 5 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm/native_drm.c index 23fc137..f0c0f54 100644 --- a/src/gallium/state_trackers/egl/drm/native_drm.c +++ b/src/gallium/state_trackers/egl/drm/native_drm.c @@ -161,23 +161,24 @@ drm_get_device_name(int fd) udev = udev_new(); if (fstat(fd, buf) 0) { _eglLog(_EGL_WARNING, failed to stat fd %d, fd); - goto out; + goto outudev; } device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev); if (device == NULL) { _eglLog(_EGL_WARNING, could not create udev device for fd %d, fd); - goto out; + goto outdevice; } tmp = udev_device_get_devnode(device); if (!tmp) - goto out; + goto outdevice; device_name = strdup(tmp); -out: +outdevice: udev_device_unref(device); +outudev: udev_unref(udev); #endif ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] AMDGPU: Match AMDGPU.cube intrinsic for SI.
From: Michel Dänzer michel.daen...@amd.com Signed-off-by: Michel Dänzer michel.daen...@amd.com --- lib/Target/AMDGPU/SIInstructions.td | 21 + 1 file changed, 21 insertions(+) diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td index d6f71f6..ecb874a 100644 --- a/lib/Target/AMDGPU/SIInstructions.td +++ b/lib/Target/AMDGPU/SIInstructions.td @@ -1269,6 +1269,27 @@ def : Pat (SI_KIL (V_MOV_IMM_I32 0xbf80)) ; +def : Pat + (int_AMDGPU_cube VReg_128:$src), + (INSERT_SUBREG (INSERT_SUBREG (INSERT_SUBREG (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), +(V_CUBETC_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x), + (EXTRACT_SUBREG VReg_128:$src, sel_y), + (EXTRACT_SUBREG VReg_128:$src, sel_z), + 0, 0, 0, 0), sel_x), +(V_CUBESC_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x), + (EXTRACT_SUBREG VReg_128:$src, sel_y), + (EXTRACT_SUBREG VReg_128:$src, sel_z), + 0, 0, 0, 0), sel_y), +(V_CUBEMA_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x), + (EXTRACT_SUBREG VReg_128:$src, sel_y), + (EXTRACT_SUBREG VReg_128:$src, sel_z), + 0, 0, 0, 0), sel_z), +(V_CUBEID_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x), + (EXTRACT_SUBREG VReg_128:$src, sel_y), + (EXTRACT_SUBREG VReg_128:$src, sel_z), + 0, 0, 0, 0), sel_w) +; + /** == **/ /** VOP3 Patterns**/ /** == **/ -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] radeon/llvm: Export prepare_cube_coords helper to driver.
From: Michel Dänzer michel.daen...@amd.com To be used by radeonsi. Signed-off-by: Michel Dänzer michel.daen...@amd.com --- src/gallium/drivers/radeon/radeon_llvm.h|3 +++ src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 18 ++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm.h b/src/gallium/drivers/radeon/radeon_llvm.h index 61975c4..61f3772 100644 --- a/src/gallium/drivers/radeon/radeon_llvm.h +++ b/src/gallium/drivers/radeon/radeon_llvm.h @@ -152,6 +152,9 @@ static inline LLVMValueRef bitcast( } +void radeon_llvm_emit_prepare_cube_coords(struct lp_build_tgsi_context * bld_base, + LLVMValueRef *arg, unsigned target); + void radeon_llvm_context_init(struct radeon_llvm_context * ctx); void radeon_llvm_dispose(struct radeon_llvm_context * ctx); diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c index 5e3d6c2..46abb2b 100644 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c @@ -514,11 +514,12 @@ static void kil_emit( } -static void emit_prepare_cube_coords( +void radeon_llvm_emit_prepare_cube_coords( struct lp_build_tgsi_context * bld_base, - struct lp_build_emit_data * emit_data) + LLVMValueRef *arg, +unsigned target) { - boolean shadowcube = (emit_data-inst-Texture.Texture == TGSI_TEXTURE_SHADOWCUBE); + boolean shadowcube = (target == TGSI_TEXTURE_SHADOWCUBE); struct gallivm_state * gallivm = bld_base-base.gallivm; LLVMBuilderRef builder = gallivm-builder; LLVMTypeRef type = bld_base-base.elem_type; @@ -528,7 +529,7 @@ static void emit_prepare_cube_coords( LLVMValueRef v = build_intrinsic(builder, llvm.AMDGPU.cube, LLVMVectorType(type, 4), - emit_data-args[0],1, LLVMReadNoneAttribute); + arg, 1, LLVMReadNoneAttribute); /* save src.w for shadow cube */ cnt = shadowcube ? 3 : 4; @@ -560,8 +561,7 @@ static void emit_prepare_cube_coords( coords[1] = coords[0]; coords[0] = coords[3]; - emit_data-args[0] = lp_build_gather_values(bld_base-base.gallivm, - coords, 4); + *arg = lp_build_gather_values(bld_base-base.gallivm, coords, 4); } static void txd_fetch_args( @@ -610,7 +610,8 @@ static void txp_fetch_args( if ((inst-Texture.Texture == TGSI_TEXTURE_CUBE || inst-Texture.Texture == TGSI_TEXTURE_SHADOWCUBE) inst-Instruction.Opcode != TGSI_OPCODE_TXQ) { - emit_prepare_cube_coords(bld_base, emit_data); + radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data-args[0], + inst-Texture.Texture); } } @@ -642,7 +643,8 @@ static void tex_fetch_args( if ((inst-Texture.Texture == TGSI_TEXTURE_CUBE || inst-Texture.Texture == TGSI_TEXTURE_SHADOWCUBE) inst-Instruction.Opcode != TGSI_OPCODE_TXQ) { - emit_prepare_cube_coords(bld_base, emit_data); + radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data-args[0], + inst-Texture.Texture); } } -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] radeonsi: Fix cube texture coordinates.
From: Michel Dänzer michel.daen...@amd.com 8 more piglits. Signed-off-by: Michel Dänzer michel.daen...@amd.com --- src/gallium/drivers/radeonsi/radeonsi_shader.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index d5d56c4..a452d4b 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -813,6 +813,13 @@ static void tex_fetch_args( emit_data-args[1] = lp_build_emit_fetch(bld_base, emit_data-inst, 0, LP_CHAN_ALL); + if ((inst-Texture.Texture == TGSI_TEXTURE_CUBE || +inst-Texture.Texture == TGSI_TEXTURE_SHADOWCUBE) + inst-Instruction.Opcode != TGSI_OPCODE_TXQ) { + radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data-args[1], +inst-Texture.Texture); + } + /* Resource */ ptr = use_sgpr(bld_base-base.gallivm, SGPR_CONST_PTR_V8I32, SI_SGPR_RESOURCE); offset = lp_build_const_int32(bld_base-base.gallivm, -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCHv2] mesa: Return INVALID_ENUM for glReadPixels(..., GL_DEPTH_*, ...) on ES 3
On Mon, Dec 3, 2012 at 4:27 PM, Matt Turner matts...@gmail.com wrote: I'm not sure if this is the correct fix. The _mesa_es_error_check_format_and_type function (used above in the ES 1 and 2 cases) was originally added for glTexImage checking and allows GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8 combinations. Using it in ES 3 causes other tests to regress. Fixes es3conform's packed_depth_stencil_error test. Cc: Anuj Phogat anuj.pho...@gmail.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org (v1) --- src/mesa/main/readpix.c | 22 +- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index d6d105b..6ee7623 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -679,7 +679,7 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *pixels ) { - GLenum err; + GLenum err = GL_NO_ERROR; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -707,17 +707,21 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, * preferred combination. This code doesn't know what that preferred * combination is, and Mesa can handle anything valid. Just work instead. */ - if (_mesa_is_gles(ctx) ctx-Version 30) { - err = _mesa_es_error_check_format_and_type(format, type, 2); - if (err == GL_NO_ERROR) { - if (type == GL_FLOAT || type == GL_HALF_FLOAT_OES) { -err = GL_INVALID_OPERATION; - } else if (format == GL_DEPTH_COMPONENT -|| format == GL_DEPTH_STENCIL) { -err = GL_INVALID_ENUM; + if (_mesa_is_gles(ctx)) { + if (ctx-version 30) { + err = _mesa_es_error_check_format_and_type(format, type, 2); + if (err == GL_NO_ERROR) { +if (type == GL_FLOAT || type == GL_HALF_FLOAT_OES) { + err = GL_INVALID_OPERATION; +} } } + if (err == GL_NO_ERROR (format == GL_DEPTH_COMPONENT + || format == GL_DEPTH_STENCIL)) { + err = GL_INVALID_ENUM; + } + if (err != GL_NO_ERROR) { _mesa_error(ctx, err, glReadPixels(invalid format %s and/or type %s), _mesa_lookup_enum_by_nr(format), -- 1.7.8.6 Reviewed-by: Anuj Phogat anuj.pho...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] intel: Fix copy-and-paste bug setting gl_constants::MaxSamples
Reviewed-by: Chris Forbes chr...@ijw.co.nz On Tue, Dec 4, 2012 at 6:31 PM, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com gl_constants::MaxSamples is an integer, so setting it to 1.0 is just silly. Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/drivers/dri/intel/intel_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 15b77b2..507cd31 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -680,7 +680,7 @@ intelInitContext(struct intel_context *intel, ctx-Const.MaxPointSizeAA = 3.0; ctx-Const.PointSizeGranularity = 1.0; - ctx-Const.MaxSamples = 1.0; + ctx-Const.MaxSamples = 1; if (intel-gen = 6) ctx-Const.MaxClipPlanes = 8; -- 1.7.11.7 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/3] mesa: Don't allow RGB interger formats in OpenGL ES 3.0
Botched spelling of `integer` in the commit message. On Tue, Dec 4, 2012 at 6:31 PM, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com Cc: Matt Turner matts...@gmail.com Cc: Marek Olšák mar...@gmail.com --- src/mesa/main/fbobject.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index ab53bac..281cdd0 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1261,10 +1261,8 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) case GL_RGB8I_EXT: case GL_RGB16I_EXT: case GL_RGB32I_EXT: - return ctx-Version = 30 - || (_mesa_is_desktop_gl(ctx) - ctx-Extensions.EXT_texture_integer) ? GL_RGB : 0; - + return _mesa_is_desktop_gl(ctx) ctx-Extensions.EXT_texture_integer + ? GL_RGB : 0; case GL_R8UI: case GL_R8I: case GL_R16UI: -- 1.7.11.7 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] mesa: Use the new hash table for the variable refcount visitor.
Ian Romanick i...@freedesktop.org writes: On 12/03/2012 02:52 PM, Jordan Justen wrote: +static bool +pointer_key_compare(const void *a, const void *b) +{ + return a == b; +} + +/* We could do better. */ +static uint32_t +pointer_hash(void *a) +{ + return (uintptr_t)a; Perhaps... return (uintptr_t) a / sizeof(ir_variable); Or at least shift of the low couple bits. Otherwise we know a lot of bins will be empty, right? (Or is this not that kind of hash table?) It's prime-sized. static bool debug = false; @@ -49,8 +50,11 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned) v.run(instructions); - foreach_iter(exec_list_iterator, iter, v.variable_list) { - ir_variable_refcount_entry *entry = (ir_variable_refcount_entry *)iter.get(); + struct hash_entry *e; + for (e = _mesa_hash_table_next_entry(v.ht, NULL); +e != NULL; +e = _mesa_hash_table_next_entry(v.ht, e)) { + ir_variable_refcount_entry *entry = (ir_variable_refcount_entry *)e-data; This should use the foreach macro. pgpMjIHWu41HD.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 1/3] mesa: Disallow deprecated SNORM formats for renderbuffers
Ian Romanick i...@freedesktop.org writes: From: Ian Romanick ian.d.roman...@intel.com The OpenGL 3.2 core profile spec says: The following base internal formats from table 3.11 are color-renderable: RED, RG, RGB, and RGBA. The sized internal formats from table 3.12 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable. The OpenGL 3.2 compatibility profile spec says (only ALPHA is added): The following base internal formats from table 3.16 are color-renderable: ALPHA, RED, RG, RGB, and RGBA. The sized internal formats from table 3.17 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable. Table 3.12 in the core profile spec and table 3.17 in the compatibility profile spec list SNORM formats as having a base internal format of RED, RG, RGB, or RGBA. From this we infer that they should also be color renderable. This sounds sort of like the description of the bottom half of the change, to remove L/LA/I snorm formats. (ALPHA being left in place, which I missed at first). I wonder, do they also not support FBOs with unorm L/LA/I, despite ARB_framebuffer_object? fbo-clear-formats should tell. I'd be happy to see those go if nobody else supports them either, and it would make this change make more sense to me. The OpenGL ES 3.0 spec says: An internal format is color-renderable if it is one of the formats from table 3.12 noted as color-renderable or if it is unsized format RGBA or RGB. No other formats, including compressed internal formats, are color-renderable. In the OpenGL ES 3.0 spec, none of the SNORM formats have color- renderable marked in table 3.12. The RGB I and UI formats also are not color-renderable in ES3, but we'll save that change for another patch. As a data point, NVIDIA's closed-source driver (version 304.64) rejects *all* SNORM formats for renderbuffers in an OpenGL 4.x compatibility profile. This sounds like the description of the top half of the change, and this half if pulled out would get my r-b. pgpqCpgHeaPDe.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 2/3] mesa: Don't allow RGB interger formats in OpenGL ES 3.0
spelling in subject: integer. Also maybe s/formats/FBOs/? Other than that, Reviewed-by: Eric Anholt e...@anholt.net pgp7IXY20hb7q.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 2/3] meta: Don't use GL_TEXTURE_RECTANGLE as texture target in GLES
Anuj Phogat anuj.pho...@gmail.com writes: Makes framebuffer_blit_coverage_mismatched_buffer_formats.test in gles3 conformance pass. Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/drivers/common/meta.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 978eeb5..02e64ff 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c - _mesa_set_enable(ctx, tex-Target, GL_TRUE); + /* glEnable() in gles2 and gles3 doesn't allow GL_TEXTURE_{1D, 2D, etc.} +* tokens. +*/ + if (ctx-API == API_OPENGL ctx-API == API_OPENGLES) + _mesa_set_enable(ctx, tex-Target, GL_TRUE); if (mask GL_COLOR_BUFFER_BIT) { setup_copypix_texture(tex, newTex, srcX, srcY, srcW, srcH, @@ -1679,7 +1683,8 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx, /* XXX can't easily do stencil */ } - _mesa_set_enable(ctx, tex-Target, GL_FALSE); + if (ctx-API == API_OPENGL ctx-API == API_OPENGLES) + _mesa_set_enable(ctx, tex-Target, GL_FALSE); If BlitFramebuffer is doing fixed function, then it needs _mesa_set_enable() to work to enable the texture it's reading from. For GLES3, it sounds like we need to either make blorp handle all BlitFramebuffer, or make a BlitFramebuffer path using GLSL instead. I don't think this halfway point of a BlitFramebuffer implementation that doesn't successfully blit makes sense. pgpPKQmUz0UUW.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 1/3] mesa: Disallow deprecated SNORM formats for renderbuffers
On Tue, Dec 4, 2012 at 7:56 PM, Eric Anholt e...@anholt.net wrote: Ian Romanick i...@freedesktop.org writes: From: Ian Romanick ian.d.roman...@intel.com The OpenGL 3.2 core profile spec says: The following base internal formats from table 3.11 are color-renderable: RED, RG, RGB, and RGBA. The sized internal formats from table 3.12 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable. The OpenGL 3.2 compatibility profile spec says (only ALPHA is added): The following base internal formats from table 3.16 are color-renderable: ALPHA, RED, RG, RGB, and RGBA. The sized internal formats from table 3.17 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable. Table 3.12 in the core profile spec and table 3.17 in the compatibility profile spec list SNORM formats as having a base internal format of RED, RG, RGB, or RGBA. From this we infer that they should also be color renderable. This sounds sort of like the description of the bottom half of the change, to remove L/LA/I snorm formats. (ALPHA being left in place, which I missed at first). I wonder, do they also not support FBOs with unorm L/LA/I, despite ARB_framebuffer_object? fbo-clear-formats should tell. I'd be happy to see those go if nobody else supports them either, and it would make this change make more sense to me. What do you mean by that? R600 has full renderbuffer support for all R, RG, RGBX, RGBA, A, L, LA, and I formats, all can be UNORM, SNORM, UINT, SINT, and FLOAT, and blending and MSAA are a sure thing. I'm only okay with disallowing the formats if all specifications (GL and extensions) agree they *shouldn't* be supported. Marek ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH automake] pipe-loader: Fix some undefined symbols.
--- src/gallium/drivers/radeon/Makefile.am |5 +++-- src/gallium/targets/pipe-loader/Makefile.am |3 +++ 2 Dateien geändert, 6 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/src/gallium/drivers/radeon/Makefile.am b/src/gallium/drivers/radeon/Makefile.am index cbad5b7..adb5ebe 100644 --- a/src/gallium/drivers/radeon/Makefile.am +++ b/src/gallium/drivers/radeon/Makefile.am @@ -4,7 +4,8 @@ include $(top_srcdir)/src/gallium/Automake.inc noinst_LTLIBRARIES = libradeon.la AM_CXXFLAGS = \ - $(filter-out -DDEBUG, $(LLVM_CXXFLAGS)) + $(filter-out -DDEBUG, $(LLVM_CXXFLAGS)) \ + $(DEFINES) AM_CFLAGS = \ $(GALLIUM_CFLAGS) \ @@ -15,7 +16,7 @@ AM_CPPFLAGS = -DEXTERNAL_LLVM tablegen = $(LLVM_BINDIR)/llvm-tblgen -I $(LLVM_INCLUDEDIR) -I $(srcdir) $1 $2 -o $3 libradeon_la_SOURCES = \ - $(CXX_FILES) \ + $(CPP_FILES) \ $(C_FILES) SIRegisterInfo.td: SIGenRegisterInfo.pl diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am index 1a66835..8fcd2f8 100644 --- a/src/gallium/targets/pipe-loader/Makefile.am +++ b/src/gallium/targets/pipe-loader/Makefile.am @@ -15,6 +15,9 @@ gbm_LTLIBRARIES = PIPE_LIBS = \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \ + $(top_builddir)/src/gallium/drivers/rbug/librbug.la \ + $(top_builddir)/src/gallium/drivers/trace/libtrace.la \ $(DLOPEN_LIBS) \ -lpthread \ -lm -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 57863] [llvmpipe] SIGSEGV src/gallium/drivers/llvmpipe/lp_rast.c:407
https://bugs.freedesktop.org/show_bug.cgi?id=57863 José Fonseca jfons...@vmware.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from José Fonseca jfons...@vmware.com --- Should be fixed with commit 294d8a71efe0d85d7212c9b0f465e8637cc25e77 Author: José Fonseca jfons...@vmware.com Date: Tue Dec 4 19:09:28 2012 + llvmpipe: Fix alignment. My understanding and actual implementation of how the pixels are being fetch differed. This fixes bug 57863. Trivial. Thanks Vinson! -- 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 3/9] tgsi: Allow TXF from buffers.
On Wed, Dec 5, 2012 at 12:13 AM, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com There is more work necessary to properly upport buffers in shaders, but this gets things a bit further along. http://cgit.freedesktop.org/~airlied/mesa/commit/?h=gallium-tboid=46cd758b0bc55078395ce4222637e3318af1b9d4 But yeah this is fine on its own. (other bits in my gallium-tbo branch in my repo). Reviewed-by: Dave Airlie airl...@redhat.com --- src/gallium/auxiliary/tgsi/tgsi_exec.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 1b7150b..9f226c4 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -2061,6 +2061,7 @@ exec_txf(struct tgsi_exec_machine *mach, case TGSI_TEXTURE_1D_ARRAY: IFETCH(r[1], 0, TGSI_CHAN_Y); /* fallthrough */ + case TGSI_TEXTURE_BUFFER: case TGSI_TEXTURE_1D: case TGSI_TEXTURE_SHADOW1D: IFETCH(r[0], 0, TGSI_CHAN_X); -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] [rfc] llvmpipe: EXT_transform_feedback support (v1)
I'd written most of this ages ago, but never finished it off. This passes 115/130 piglit tests so far. I'll look into the others as time permits. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/llvmpipe/lp_context.h | 11 +- src/gallium/drivers/llvmpipe/lp_draw_arrays.c | 9 ++ src/gallium/drivers/llvmpipe/lp_query.c| 24 src/gallium/drivers/llvmpipe/lp_query.h| 2 + src/gallium/drivers/llvmpipe/lp_rast.c | 8 +- src/gallium/drivers/llvmpipe/lp_scene.c| 3 +- src/gallium/drivers/llvmpipe/lp_scene.h| 5 +- src/gallium/drivers/llvmpipe/lp_screen.c | 3 +- src/gallium/drivers/llvmpipe/lp_setup.c| 12 +- src/gallium/drivers/llvmpipe/lp_setup.h| 4 + src/gallium/drivers/llvmpipe/lp_setup_context.h| 1 + src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 14 +++ src/gallium/drivers/llvmpipe/lp_state_rasterizer.c | 2 + src/gallium/drivers/llvmpipe/lp_state_so.c | 121 ++--- src/gallium/drivers/llvmpipe/lp_surface.c | 4 +- 15 files changed, 122 insertions(+), 101 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h index fe6fa3f..25cdff9 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.h +++ b/src/gallium/drivers/llvmpipe/lp_context.h @@ -81,12 +81,6 @@ struct llvmpipe_context { struct pipe_viewport_state viewport; struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; struct pipe_index_buffer index_buffer; - struct { - struct llvmpipe_resource *buffer[PIPE_MAX_SO_BUFFERS]; - int offset[PIPE_MAX_SO_BUFFERS]; - int so_count[PIPE_MAX_SO_BUFFERS]; - int num_buffers; - } so_target; struct pipe_resource *mapped_vs_tex[PIPE_MAX_SAMPLERS]; unsigned num_samplers[PIPE_SHADER_TYPES]; @@ -94,6 +88,11 @@ struct llvmpipe_context { unsigned num_vertex_buffers; + struct draw_so_target *so_targets[PIPE_MAX_SO_BUFFERS]; + int num_so_targets; + struct pipe_query_data_so_statistics so_stats; + unsigned num_primitives_generated; + unsigned dirty; /** Mask of LP_NEW_x flags */ unsigned active_occlusion_query; diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c index 3497edf..eaa9ba3 100644 --- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c +++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c @@ -88,6 +88,13 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) lp-index_buffer.index_size); } + for (i = 0; i lp-num_so_targets; i++) { + void *buf = llvmpipe_resource(lp-so_targets[i]-target.buffer)-data; + lp-so_targets[i]-mapping = buf; + } + draw_set_mapped_so_targets(draw, lp-num_so_targets, + lp-so_targets); + llvmpipe_prepare_vertex_sampling(lp, lp-num_sampler_views[PIPE_SHADER_VERTEX], lp-sampler_views[PIPE_SHADER_VERTEX]); @@ -104,6 +111,8 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) if (mapped_indices) { draw_set_indexes(draw, NULL, 0); } + draw_set_mapped_so_targets(draw, 0, NULL); + llvmpipe_cleanup_vertex_sampling(lp); /* diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c index e302197..7a62a80 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.c +++ b/src/gallium/drivers/llvmpipe/lp_query.c @@ -138,6 +138,12 @@ llvmpipe_get_query_result(struct pipe_context *pipe, *result = os_time_get_nano(); } break; + case PIPE_QUERY_PRIMITIVES_GENERATED: + *result = pq-num_primitives_generated; + break; + case PIPE_QUERY_PRIMITIVES_EMITTED: + *result = pq-num_primitives_written; + break; default: assert(0); break; @@ -165,6 +171,16 @@ llvmpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q) memset(pq-count, 0, sizeof(pq-count)); lp_setup_begin_query(llvmpipe-setup, pq); + if (pq-type == PIPE_QUERY_PRIMITIVES_EMITTED) { + pq-num_primitives_written = 0; + llvmpipe-so_stats.num_primitives_written = 0; + } + + if (pq-type == PIPE_QUERY_PRIMITIVES_GENERATED) { + pq-num_primitives_generated = 0; + llvmpipe-num_primitives_generated = 0; + } + if (pq-type == PIPE_QUERY_OCCLUSION_COUNTER) { llvmpipe-active_occlusion_query = TRUE; llvmpipe-dirty |= LP_NEW_OCCLUSION_QUERY; @@ -180,6 +196,14 @@ llvmpipe_end_query(struct pipe_context *pipe, struct pipe_query *q) lp_setup_end_query(llvmpipe-setup, pq); + if (pq-type == PIPE_QUERY_PRIMITIVES_EMITTED) { + pq-num_primitives_written = llvmpipe-so_stats.num_primitives_written; + } + + if (pq-type == PIPE_QUERY_PRIMITIVES_GENERATED) { + pq-num_primitives_generated =
Re: [Mesa-dev] [PATCH 4/5] driconf: Add translation-generation to build system, don't track generated files
Ian Romanick i...@freedesktop.org writes: On 12/03/2012 03:43 PM, Carl Worth wrote: This strangely-escaped apostrophe was causing a build failure (invalid escape sequence) resulting in no de translations in the final options.h file. It seems like this patch should go before 4/5 so that bisects will build. My phrasing of build failure was poor. The build proceeds fine so bisect will not be affected, (just some translations will be missing). But it's obviously easy to re-order these too. So I'm happy to do that. You'll need to get Chad and / or Tapani to help with Android build. I'm happy to support Android, so I'm willing to learn whatever is needed here. That said, I'm not convinced that the current approach we have is ideal. The current setup has duplicated information between Makefile.am and Android.mk files. This is inherently fragile. I would definitely prefer an approach where this is one, canonical build system. It seems to me, that from Mesa's point-of-view, Android is just another distribution. All other distributions are able to use Mesa's build system and then package up the results of the build. I think Mesa should be happy to host some top-level file to help with that packaging, (whether mesa.spec for Fedora, debian/rules for Debian, or Android.mk for Android), if the distribution would prefer to have the files in Mesa's tree, (some really prefer to maintain this stuff separately). But I don't think it makes sense for any distribution to maintain an independent build system throughout every level of the Mesa source code. Can someone explain what I'm missing? What's the technical justification for the current setup? -Carl -- carl.d.wo...@intel.com pgpohuAVzk8Qk.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH automake] egl-static: Fix linking.
--- With all my patches applied automake build succeeds with: ./autogen.sh --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --enable-xvmc --enable-vdpau --enable-texture-float --enable-debug --with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast --with-gallium-drivers=i915,nouveau,r300,r600,radeonsi,svga,swrast --enable-dri --enable-glx --enable-osmesa --enable-gles1 --enable-gles2 --enable-openvg --enable-shared-glapi --enable-shared-gallium --enable-gbm --enable-xa --enable-gallium-egl --enable-gallium-llvm --enable-gallium-gbm --enable-opencl --enable-r600-llvm-compiler --enable-gallium-g3dvl --enable-glx-tls Actually I should call it: Make all perfect. --- src/gallium/targets/egl-static/Makefile.am | 16 1 Datei geändert, 8 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-) diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am index bbd2592..a306ec8 100644 --- a/src/gallium/targets/egl-static/Makefile.am +++ b/src/gallium/targets/egl-static/Makefile.am @@ -43,7 +43,7 @@ egl_gallium_la_LIBADD = \ $(PTHREAD_LIBS) \ -lm -egl_gallium_la_LDFLAGS = -no-undefined -avoid-version -module +egl_gallium_la_LDFLAGS = -no-undefined -Wl,--allow-multiple-definition -avoid-version -module if HAVE_EGL_PLATFORM_X11 AM_CPPFLAGS += $(LIBDRM_CFLAGS) @@ -134,24 +134,24 @@ endif if HAVE_GALLIUM_R300 AM_CPPFLAGS += -D_EGL_PIPE_R300=1 egl_gallium_la_LIBADD += \ - $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \ - $(top_builddir)/src/gallium/drivers/r300/libr300.la \ - $(RADEON_LIBS) + $(top_builddir)/src/gallium/drivers/r300/libr300.la endif if HAVE_GALLIUM_R600 AM_CPPFLAGS += -D_EGL_PIPE_R600=1 egl_gallium_la_LIBADD += \ - $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \ - $(top_builddir)/src/gallium/drivers/r600/libr600.la \ - $(RADEON_LIBS) + $(top_builddir)/src/gallium/drivers/r600/libr600.la endif if HAVE_GALLIUM_RADEONSI AM_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1 egl_gallium_la_LIBADD += \ + $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la +endif + +if NEED_RADEON_GALLIUM +egl_gallium_la_LIBADD += \ $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \ - $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \ $(RADEON_LIBS) endif -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] mesa: Use the new hash table for the variable refcount visitor.
On Tue, Dec 4, 2012 at 10:41 AM, Eric Anholt e...@anholt.net wrote: Ian Romanick i...@freedesktop.org writes: On 12/03/2012 02:52 PM, Jordan Justen wrote: +static bool +pointer_key_compare(const void *a, const void *b) +{ + return a == b; +} + +/* We could do better. */ +static uint32_t +pointer_hash(void *a) +{ + return (uintptr_t)a; Perhaps... return (uintptr_t) a / sizeof(ir_variable); Or at least shift of the low couple bits. Otherwise we know a lot of bins will be empty, right? (Or is this not that kind of hash table?) It's prime-sized. Should I just use _mesa_key_pointer_equal and _mesa_hash_pointer? -Jordan ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/5] driconf: Add translation-generation to build system, don't track generated files
On 12/04/2012 01:51 PM, Carl Worth wrote: Ian Romanick i...@freedesktop.org writes: On 12/03/2012 03:43 PM, Carl Worth wrote: This strangely-escaped apostrophe was causing a build failure (invalid escape sequence) resulting in no de translations in the final options.h file. It seems like this patch should go before 4/5 so that bisects will build. My phrasing of build failure was poor. The build proceeds fine so bisect will not be affected, (just some translations will be missing). But it's obviously easy to re-order these too. So I'm happy to do that. You'll need to get Chad and / or Tapani to help with Android build. I'm happy to support Android, so I'm willing to learn whatever is needed here. That said, I'm not convinced that the current approach we have is ideal. The current setup has duplicated information between Makefile.am and Android.mk files. This is inherently fragile. I would definitely prefer an approach where this is one, canonical build system. It seems to me, that from Mesa's point-of-view, Android is just another distribution. All other distributions are able to use Mesa's build system and then package up the results of the build. I think Mesa should be happy to host some top-level file to help with that packaging, (whether mesa.spec for Fedora, debian/rules for Debian, or Android.mk for Android), if the distribution would prefer to have the files in Mesa's tree, (some really prefer to maintain this stuff separately). But I don't think it makes sense for any distribution to maintain an independent build system throughout every level of the Mesa source code. Can someone explain what I'm missing? What's the technical justification for the current setup? -Carl In this context, it is an error to consider Android as just another Linux distribution. It's best to consider it an uncanny valley [1] in a foreign land. [1] http://en.wikipedia.org/wiki/Uncanny_valley For starters, one cannot build Android components with Autotools. Redhat's mesa.spec and Debian's debian/rules simply contain rules on how to invoke Autotools. On Android, there exists only the One True Android Build System [3], which is entirely written in GNU Make. If you'd like a tour of how the Android build system works, I can walk you through the basics at the office. [3] https://android.googlesource.com/platform/build/ A requirement for all Android components is that the build be controlled by an Android.mk at the project's toplevel. If you're really clever, then you can write the toplevel Android.mk to invoke an external tool on the build hosts that scrapes the Makefile.am's and generates the any needed additional Android.mk's. There is a tool that does this, named Androgenizer [2]. Gstreamer uses it. [2] http://cgit.collabora.com/git/android/androgenizer.git/tree/README.txt From my quick, shallow perusal of the Androgenizer README, it seems insufficient for Mesa. Mesa's build is complex. For example, Mesa builds a GLSL compiler executable for the host system (64-bit) that in is in turn used to build a GLSL library for the target system (32-bit). And there are Python scripts that transform XML to C. And there's Flex and Bison. And so on. Androgenizer may be able to accomodate all that, but the README didn't persuade to me investigate any further. Imagine a world where no Makefile and no Makefile.am were allowed in Mesa's source tree. Life would be insufferable. Linux developers would be required to maintain a parallel fork just for the build system. The build would constantly break on upstream master. Linux devs would always be hesitant to rebase their fork onto upstream lest another break. Taking the Android.mk's out of Mesa without replacing them with an Androgenizer-like tool would impose that insufferable situation on the Android developers. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] static linking in version 9.0.1
Hi Everybody, I used to compile static libs in version 7.5.2 y using ./configure --enable-static --with-driver=xlib and used libOSMesa.a to link to my JNI mesa binding. In the latest version these options do not work anymore. I have tried many variations, fixed makefile.template in gallium that would cancel the build, but still not getting statically build libOSMesa.a. Does anybody know how to build staticaly? Sincerely, Larik ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] gallivm: have a default emit function for fdiv/rcp
--- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 25 ++ 1 file changed, 25 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index 17f288f..cd57fae 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -584,6 +584,29 @@ mul_emit( emit_data-args[0], emit_data-args[1]); } +/*.TGSI_OPCODE_DIV.*/ +static void fdiv_emit( + const struct lp_build_tgsi_action * action, + struct lp_build_tgsi_context * bld_base, + struct lp_build_emit_data * emit_data) +{ + emit_data-output[emit_data-chan] = LLVMBuildFDiv( + bld_base-base.gallivm-builder, + emit_data-args[0], emit_data-args[1], ); +} + +/*.TGSI_OPCODE_RCP.*/ +static void rcp_emit( + const struct lp_build_tgsi_action * action, + struct lp_build_tgsi_context * bld_base, + struct lp_build_emit_data * emit_data) +{ + LLVMValueRef one; + one = lp_build_const_float(bld_base-base.gallivm, 1.0f); + emit_data-output[emit_data-chan] = lp_build_emit_llvm_binary(bld_base, + TGSI_OPCODE_DIV, one, emit_data-args[0]); +} + /* TGSI_OPCODE_POW */ static void @@ -811,6 +834,8 @@ lp_set_default_actions(struct lp_build_tgsi_context * bld_base) bld_base-op_actions[TGSI_OPCODE_MAD].emit = mad_emit; bld_base-op_actions[TGSI_OPCODE_MOV].emit = mov_emit; bld_base-op_actions[TGSI_OPCODE_MUL].emit = mul_emit; + bld_base-op_actions[TGSI_OPCODE_DIV].emit = fdiv_emit; + bld_base-op_actions[TGSI_OPCODE_RCP].emit = rcp_emit; bld_base-op_actions[TGSI_OPCODE_SFL].emit = sfl_emit; bld_base-op_actions[TGSI_OPCODE_STR].emit = str_emit; bld_base-op_actions[TGSI_OPCODE_SUB].emit = sub_emit; -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] gallivm: Have a default emit function for min/max opcode
--- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 29 ++ 1 file changed, 29 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index cd57fae..cc4bd2e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -744,6 +744,32 @@ umul_emit( emit_data-args[0], emit_data-args[1]); } +/* TGSI_OPCODE_MAX */ +static void fmax_emit( + const struct lp_build_tgsi_action * action, + struct lp_build_tgsi_context * bld_base, + struct lp_build_emit_data * emit_data) +{ + LLVMBuilderRef builder = bld_base-base.gallivm-builder; + emit_data-output[emit_data-chan] = LLVMBuildSelect(builder, + LLVMBuildFCmp(builder, LLVMRealUGE, + emit_data-args[0], emit_data-args[1], ), + emit_data-args[0], emit_data-args[1], ); +} + +/* TGSI_OPCODE_MIN */ +static void fmin_emit( + const struct lp_build_tgsi_action * action, + struct lp_build_tgsi_context * bld_base, + struct lp_build_emit_data * emit_data) +{ + LLVMBuilderRef builder = bld_base-base.gallivm-builder; + emit_data-output[emit_data-chan] = LLVMBuildSelect(builder, + LLVMBuildFCmp(builder, LLVMRealUGE, + emit_data-args[0], emit_data-args[1], ), + emit_data-args[1], emit_data-args[0], ); +} + /* TGSI_OPCODE_XPD */ static void @@ -844,6 +870,9 @@ lp_set_default_actions(struct lp_build_tgsi_context * bld_base) bld_base-op_actions[TGSI_OPCODE_U2F].emit = u2f_emit; bld_base-op_actions[TGSI_OPCODE_UMAD].emit = umad_emit; bld_base-op_actions[TGSI_OPCODE_UMUL].emit = umul_emit; + + bld_base-op_actions[TGSI_OPCODE_MAX].emit = fmax_emit; + bld_base-op_actions[TGSI_OPCODE_MIN].emit = fmin_emit; } /* CPU Only default actions */ -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] radeon/llvm: replace int_AMDGPU_rcp by fdiv (1.0, x) in RECIP pattern
--- lib/Target/AMDGPU/R600Instructions.td | 4 ++-- lib/Target/AMDGPU/SIInstructions.td | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Target/AMDGPU/R600Instructions.td b/lib/Target/AMDGPU/R600Instructions.td index 9259680..d75c32e 100644 --- a/lib/Target/AMDGPU/R600Instructions.td +++ b/lib/Target/AMDGPU/R600Instructions.td @@ -898,8 +898,8 @@ class RECIP_CLAMPED_Common bits11 inst : R600_1OP inst, RECIP_CLAMPED, [] ; -class RECIP_IEEE_Common bits11 inst : R600_1OP_Helper - inst, RECIP_IEEE, int_AMDGPU_rcp +class RECIP_IEEE_Common bits11 inst : R600_1OP + inst, RECIP_IEEE, [(set R600_Reg32:$dst, (fdiv FP_ONE, R600_Reg32:$src0))] ; class RECIP_UINT_Common bits11 inst : R600_1OP_Helper diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td index cb94381..2354b2e 100644 --- a/lib/Target/AMDGPU/SIInstructions.td +++ b/lib/Target/AMDGPU/SIInstructions.td @@ -609,7 +609,7 @@ defm V_LOG_F32 : VOP1_32 0x0027, V_LOG_F32, []; defm V_RCP_CLAMP_F32 : VOP1_32 0x0028, V_RCP_CLAMP_F32, []; defm V_RCP_LEGACY_F32 : VOP1_32 0x0029, V_RCP_LEGACY_F32, []; defm V_RCP_F32 : VOP1_32 0x002a, V_RCP_F32, - [(set VReg_32:$dst, (int_AMDGPU_rcp AllReg_32:$src0))] + [(set VReg_32:$dst, (fdiv FP_ONE, AllReg_32:$src0))] ; defm V_RCP_IFLAG_F32 : VOP1_32 0x002b, V_RCP_IFLAG_F32, []; defm V_RSQ_CLAMP_F32 : VOP1_32 0x002c, V_RSQ_CLAMP_F32, []; -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] radeon/llvm: add a pattern for min/max
--- lib/Target/AMDGPU/R600ISelLowering.cpp | 47 lib/Target/AMDGPU/R600Instructions.td | 12 +++-- lib/Target/AMDGPU/SIISelLowering.cpp | 49 ++ lib/Target/AMDGPU/SIInstructions.td| 10 +-- 4 files changed, 114 insertions(+), 4 deletions(-) diff --git a/lib/Target/AMDGPU/R600ISelLowering.cpp b/lib/Target/AMDGPU/R600ISelLowering.cpp index 6f1c1d7..1103ff4 100644 --- a/lib/Target/AMDGPU/R600ISelLowering.cpp +++ b/lib/Target/AMDGPU/R600ISelLowering.cpp @@ -764,6 +764,53 @@ SDValue R600TargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG DAG) const } } + // Standardize Min/Max pattern if applicable + if (CompareVT == VT == MVT::f32 + ((LHS == True RHS == False) || (LHS == False RHS == True))) { +ISD::CondCode CCOpcode = castCondCodeSDNode(CC)-get(); +switch (CCOpcode) { +case ISD::SETOEQ: +case ISD::SETONE: +case ISD::SETUNE: +case ISD::SETNE: +case ISD::SETUEQ: +case ISD::SETEQ: +case ISD::SETFALSE: +case ISD::SETFALSE2: +case ISD::SETTRUE: +case ISD::SETTRUE2: +case ISD::SETUO: +case ISD::SETO: + assert(0 Operation should already be optimised !); +case ISD::SETULE: +case ISD::SETULT: +case ISD::SETOLE: +case ISD::SETOLT: +case ISD::SETLE: +case ISD::SETLT: + CCOpcode = ISD::getSetCCInverse(CCOpcode, CompareVT == MVT::i32); + Temp = True; + True = False; + False = Temp; + break; +case ISD::SETGT: +case ISD::SETGE: +case ISD::SETUGE: +case ISD::SETOGE: +case ISD::SETUGT: +case ISD::SETOGT: + CCOpcode = ISD::SETUGE; + break; +case ISD::SETCC_INVALID: + assert(0 Invalid setcc condcode !); +} +return DAG.getNode(ISD::SELECT_CC, DL, CompareVT, +LHS, RHS, +True, False, +DAG.getCondCode(CCOpcode)); +return Op; + } + // If we make it this for it means we have no native instructions to handle // this SELECT_CC, so we must lower it. SDValue HWTrue, HWFalse; diff --git a/lib/Target/AMDGPU/R600Instructions.td b/lib/Target/AMDGPU/R600Instructions.td index d75c32e..43a7552 100644 --- a/lib/Target/AMDGPU/R600Instructions.td +++ b/lib/Target/AMDGPU/R600Instructions.td @@ -555,8 +555,16 @@ def ADD : R600_2OP_Helper 0x0, ADD, fadd; // Non-IEEE MUL: 0 * anything = 0 def MUL : R600_2OP_Helper 0x1, MUL NON-IEEE, fmul; def MUL_IEEE : R600_2OP_Helper 0x2, MUL_IEEE, int_AMDGPU_mul; -def MAX : R600_2OP_Helper 0x3, MAX, AMDGPUfmax; -def MIN : R600_2OP_Helper 0x4, MIN, AMDGPUfmin; +def MAX : R600_2OP 0x3, MAX, + [(set R600_Reg32:$dst, + (selectcc (f32 R600_Reg32:$src0), (f32 R600_Reg32:$src1), + (f32 R600_Reg32:$src0), (f32 R600_Reg32:$src1), + COND_GE))]; +def MIN : R600_2OP 0x4, MIN, + [(set R600_Reg32:$dst, + (selectcc (f32 R600_Reg32:$src0), (f32 R600_Reg32:$src1), + (f32 R600_Reg32:$src1), (f32 R600_Reg32:$src0), + COND_GE))]; // For the SET* instructions there is a naming conflict in TargetSelectionDAG.td, // so some of the instruction names don't match the asm string. diff --git a/lib/Target/AMDGPU/SIISelLowering.cpp b/lib/Target/AMDGPU/SIISelLowering.cpp index 45f180f..638c9df 100644 --- a/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/lib/Target/AMDGPU/SIISelLowering.cpp @@ -383,6 +383,55 @@ SDValue SITargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG DAG) const EVT VT = Op.getValueType(); DebugLoc DL = Op.getDebugLoc(); + // FIXME: This should be factored between R600 and SI + // Standardize Min/Max pattern if applicable + EVT CompareVT = LHS.getValueType(); + SDValue Temp; + if ((LHS == True RHS == False) || (LHS == False RHS == True)) { +ISD::CondCode CCOpcode = castCondCodeSDNode(CC)-get(); +switch (CCOpcode) { +case ISD::SETOEQ: +case ISD::SETONE: +case ISD::SETUNE: +case ISD::SETNE: +case ISD::SETUEQ: +case ISD::SETEQ: +case ISD::SETFALSE: +case ISD::SETFALSE2: +case ISD::SETTRUE: +case ISD::SETTRUE2: +case ISD::SETUO: +case ISD::SETO: + assert(0 Operation should already be optimised !); +case ISD::SETULE: +case ISD::SETULT: +case ISD::SETOLE: +case ISD::SETOLT: +case ISD::SETLE: +case ISD::SETLT: + CCOpcode = ISD::getSetCCInverse(CCOpcode, CompareVT == MVT::i32); + Temp = True; + True = False; + False = Temp; + break; +case ISD::SETGT: +case ISD::SETGE: +case ISD::SETUGE: +case ISD::SETOGE: +case ISD::SETUGT: +case ISD::SETOGT: + CCOpcode = ISD::SETUGE; + break; +case ISD::SETCC_INVALID: + assert(0 Invalid setcc condcode !); +} +return DAG.getNode(ISD::SELECT_CC, DL, CompareVT, +LHS, RHS, +True, False, +DAG.getCondCode(CCOpcode)); +return Op; + } + SDValue Cond = DAG.getNode(ISD::SETCC, DL, MVT::i1, LHS, RHS, CC); return DAG.getNode(ISD::SELECT, DL, VT, Cond, True, False);
[Mesa-dev] [PATCHv2 automake] pipe-loader: Fix some undefined symbols.
--- v2: galahad is conditional --- src/gallium/drivers/radeon/Makefile.am |5 +++-- src/gallium/targets/pipe-loader/Makefile.am |7 +++ 2 Dateien geändert, 10 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/src/gallium/drivers/radeon/Makefile.am b/src/gallium/drivers/radeon/Makefile.am index cbad5b7..adb5ebe 100644 --- a/src/gallium/drivers/radeon/Makefile.am +++ b/src/gallium/drivers/radeon/Makefile.am @@ -4,7 +4,8 @@ include $(top_srcdir)/src/gallium/Automake.inc noinst_LTLIBRARIES = libradeon.la AM_CXXFLAGS = \ - $(filter-out -DDEBUG, $(LLVM_CXXFLAGS)) + $(filter-out -DDEBUG, $(LLVM_CXXFLAGS)) \ + $(DEFINES) AM_CFLAGS = \ $(GALLIUM_CFLAGS) \ @@ -15,7 +16,7 @@ AM_CPPFLAGS = -DEXTERNAL_LLVM tablegen = $(LLVM_BINDIR)/llvm-tblgen -I $(LLVM_INCLUDEDIR) -I $(srcdir) $1 $2 -o $3 libradeon_la_SOURCES = \ - $(CXX_FILES) \ + $(CPP_FILES) \ $(C_FILES) SIRegisterInfo.td: SIGenRegisterInfo.pl diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am index 1a66835..d02d1ae 100644 --- a/src/gallium/targets/pipe-loader/Makefile.am +++ b/src/gallium/targets/pipe-loader/Makefile.am @@ -15,10 +15,17 @@ gbm_LTLIBRARIES = PIPE_LIBS = \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/gallium/drivers/rbug/librbug.la \ + $(top_builddir)/src/gallium/drivers/trace/libtrace.la \ $(DLOPEN_LIBS) \ -lpthread \ -lm +if HAVE_GALAHAD_GALLIUM +PIPE_LIBS += $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la +endif + + if HAVE_GALLIUM_I915 gbm_LTLIBRARIES += pipe_i915.la pipe_i915_la_SOURCES = pipe_i915.c -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCHv2 automake] egl-static: Fix linking.
--- v2: Only add -Wl,--allow-multiple-definition because r300 does not set NEED_RADEON_GALLIUM. With all my patches applied automake build succeeds with: ./autogen.sh --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --enable-xvmc --enable-vdpau --enable-texture-float --enable-debug --with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast --with-gallium-drivers=i915,nouveau,r300,r600,radeonsi,svga,swrast --enable-dri --enable-glx --enable-osmesa --enable-gles1 --enable-gles2 --enable-openvg --enable-shared-glapi --enable-shared-gallium --enable-gbm --enable-xa --enable-gallium-egl --enable-gallium-llvm --enable-gallium-gbm --enable-opencl --enable-r600-llvm-compiler --enable-gallium-g3dvl --enable-glx-tls Actually I should call it: Make all perfect. --- src/gallium/targets/egl-static/Makefile.am |2 +- 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am index bbd2592..17ee316 100644 --- a/src/gallium/targets/egl-static/Makefile.am +++ b/src/gallium/targets/egl-static/Makefile.am @@ -43,7 +43,7 @@ egl_gallium_la_LIBADD = \ $(PTHREAD_LIBS) \ -lm -egl_gallium_la_LDFLAGS = -no-undefined -avoid-version -module +egl_gallium_la_LDFLAGS = -no-undefined -Wl,--allow-multiple-definition -avoid-version -module if HAVE_EGL_PLATFORM_X11 AM_CPPFLAGS += $(LIBDRM_CFLAGS) -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/3] mesa: Disallow deprecated SNORM formats for renderbuffers
On 12/04/2012 10:56 AM, Eric Anholt wrote: Ian Romanick i...@freedesktop.org writes: From: Ian Romanick ian.d.roman...@intel.com The OpenGL 3.2 core profile spec says: The following base internal formats from table 3.11 are color-renderable: RED, RG, RGB, and RGBA. The sized internal formats from table 3.12 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable. The OpenGL 3.2 compatibility profile spec says (only ALPHA is added): The following base internal formats from table 3.16 are color-renderable: ALPHA, RED, RG, RGB, and RGBA. The sized internal formats from table 3.17 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable. Table 3.12 in the core profile spec and table 3.17 in the compatibility profile spec list SNORM formats as having a base internal format of RED, RG, RGB, or RGBA. From this we infer that they should also be color renderable. This sounds sort of like the description of the bottom half of the change, to remove L/LA/I snorm formats. (ALPHA being left in place, which I missed at first). I wonder, do they also not support FBOs with unorm L/LA/I, despite ARB_framebuffer_object? fbo-clear-formats should tell. I'd be happy to see those go if nobody else supports them either, and it would make this change make more sense to me. Ken pointed out that this patch really should have been two patches. I've split it into a patch that just makes the deprecated SNORM formats non-renderable and a second patch that makes all of the other SNORM formats non-renderable in ES. I had some discussions with the ES group on this topic. They said the intention of the spec is the formats not listed as renderable in the table are not allowed to be renderable *ever*... unless you have an extension that adds them to the table. The conformance tests check for this, and allowing extra formats causes them to fail. The OpenGL ES 3.0 spec says: An internal format is color-renderable if it is one of the formats from table 3.12 noted as color-renderable or if it is unsized format RGBA or RGB. No other formats, including compressed internal formats, are color-renderable. In the OpenGL ES 3.0 spec, none of the SNORM formats have color- renderable marked in table 3.12. The RGB I and UI formats also are not color-renderable in ES3, but we'll save that change for another patch. As a data point, NVIDIA's closed-source driver (version 304.64) rejects *all* SNORM formats for renderbuffers in an OpenGL 4.x compatibility ^^^ Not that it matters, but this should say 3.3 compatibility profile. I forgot my NVIDIA card can't do 4.x. :) profile. This sounds like the description of the top half of the change, and this half if pulled out would get my r-b. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] draw: set precalc_flat flag for AA lines too
Fixes flat shading for AA lines. demos/src/trivial/line-smooth is a test case which hits this. Note: This is a candidate for the stable branches. --- src/gallium/auxiliary/draw/draw_pipe_validate.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_pipe_validate.c b/src/gallium/auxiliary/draw/draw_pipe_validate.c index 27afba5..4b0ed14 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_validate.c +++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c @@ -195,6 +195,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage ) if (rast-line_smooth draw-pipeline.aaline) { draw-pipeline.aaline-next = next; next = draw-pipeline.aaline; + precalc_flat = TRUE; } if (rast-point_smooth draw-pipeline.aapoint) { -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] mesa: Use the new hash table for the variable refcount visitor.
On Mon, Dec 3, 2012 at 10:01 PM, Ian Romanick i...@freedesktop.org wrote: On 12/03/2012 02:52 PM, Jordan Justen wrote: From: Eric Anholt e...@anholt.net Were you able to measure a performance improvement on any of the problematic cases? Yeah. It took less than half the time to get to brw_shader_precompile in with that problematic shader. Unfortunately, I think Eric said that this change doesn't impact the average shader significantly... I'll fix the other issues you pointed out. -Jordan ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 4/5] driconf: Add translation-generation to build system, don't track generated files
Chad Versace chad.vers...@linux.intel.com writes: Taking the Android.mk's out of Mesa without replacing them with an Androgenizer-like tool would impose that insufferable situation on the Android developers. I certainly wasn't proposing that. What I would like to do is to eliminate as much of the duplicated information as possible to make things less fragile. The Androgenizer tool you mentioned sounds very useful in this context, and it seems like it would be worth spending some time to improve it if necessary so that it could be used for Mesa. Another approach, (and something we did for the cairo project), would be to put things like lists of filenames needed for the build into a simple file that could be included by either Makefile.am or Android.mk. That would at least eliminate one source of duplication. For example, see this Makefile.sources in the cairo tree: http://cgit.freedesktop.org/cairo/tree/src/Makefile.sources This is turn gets included by both the Makefile.am as well as the Makefile.win32. So cairo does have two parallel trees of Makefiles, but at least things like filename lists are shared in a single place. With both Android and automake targeting a common make tool, there should be an opportunity to do even more sharing than cairo is able to do, (where the Makefile.win32 is aimed at a fairly-incompatible make tool on Windows). Chad, you and I should probably talk more in person the next time we're in the office together. In the meantime, the patch series that initiated this conversation adds a Makefile.am to the src/mesa/drivers/dri/common/xmlpool to generate an options.h file, (one of those complex case you mentioned of using a local python program to generate some code). Can you contribute whatever changes are necessary to Android.mk files so that I could push this series? Thanks, -Carl -- carl.d.wo...@intel.com pgpLT8HtJQqJh.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 0/3] Sync Object changes for gles3conform
* main/set.c provides support for tracking a set of pointers. * Prevent crashes when an invalid sync object pointer is sent to sync object functions. * Valid pointers are now tracked via a main/set.c instance. * Change error value generated when an invalid sync object is used. (GL_INVALID_OPERATION = GL_INVALID_VALUE) Eric Anholt (1): mesa: add set support (stores a set of pointers) Jordan Justen (2): main/syncobj: return GL_INVALID_VALUE for invalid sync objects mesa: validate that sync objects were created by mesa src/mesa/SConscript |1 + src/mesa/main/mtypes.h |6 +- src/mesa/main/set.c | 349 +++ src/mesa/main/set.h | 94 + src/mesa/main/shared.c | 12 +- src/mesa/main/syncobj.c | 31 +++-- src/mesa/sources.mak|1 + 7 files changed, 475 insertions(+), 19 deletions(-) create mode 100644 src/mesa/main/set.c create mode 100644 src/mesa/main/set.h -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/3] mesa: add set support (stores a set of pointers)
From: Eric Anholt e...@anholt.net From: git://people.freedesktop.org/~anholt/hash_table Reviewed-by: Jordan Justen jordan.l.jus...@intel.com [jordan.l.jus...@intel.com: minor rework for mesa] Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- src/mesa/SConscript |1 + src/mesa/main/set.c | 349 ++ src/mesa/main/set.h | 94 ++ src/mesa/sources.mak |1 + 4 files changed, 445 insertions(+) create mode 100644 src/mesa/main/set.c create mode 100644 src/mesa/main/set.h diff --git a/src/mesa/SConscript b/src/mesa/SConscript index 1afa412..a2492f7 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -107,6 +107,7 @@ main_sources = [ 'main/renderbuffer.c', 'main/samplerobj.c', 'main/scissor.c', +'main/set.c', 'main/shaderapi.c', 'main/shaderobj.c', 'main/shader_query.cpp', diff --git a/src/mesa/main/set.c b/src/mesa/main/set.c new file mode 100644 index 000..c530c40 --- /dev/null +++ b/src/mesa/main/set.c @@ -0,0 +1,349 @@ +/* + * Copyright © 2009-2012 Intel Corporation + * Copyright © 1988-2004 Keith Packard and Bart Massey. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the Software), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors + * or their institutions shall not be used in advertising or + * otherwise to promote the sale, use or other dealings in this + * Software without prior written authorization from the + * authors. + * + * Authors: + *Eric Anholt e...@anholt.net + *Keith Packard kei...@keithp.com + */ + +#include stdlib.h + +#include set.h +#include ralloc.h + +#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) + +/* + * From Knuth -- a good choice for hash/rehash values is p, p-2 where + * p and p-2 are both prime. These tables are sized to have an extra 10% + * free to avoid exponential performance degradation as the hash table fills + */ + +uint32_t deleted_key_value; +const void *deleted_key = deleted_key_value; + +static const struct { + uint32_t max_entries, size, rehash; +} hash_sizes[] = { + { 2,5,3}, + { 4,7,5}, + { 8,13, 11 }, + { 16, 19, 17 }, + { 32, 43, 41 }, + { 64, 73, 71 }, + { 128, 151, 149 }, + { 256, 283, 281 }, + { 512, 571, 569 }, + { 1024, 1153, 1151 }, + { 2048, 2269, 2267 }, + { 4096, 4519, 4517 }, + { 8192, 9013, 9011 }, + { 16384,18043,18041}, + { 32768,36109,36107}, + { 65536,72091,72089}, + { 131072, 144409, 144407 }, + { 262144, 288361, 288359 }, + { 524288, 576883, 576881 }, + { 1048576, 1153459, 1153457 }, + { 2097152, 2307163, 2307161 }, + { 4194304, 4613893, 4613891 }, + { 8388608, 9227641, 9227639 }, + { 16777216, 18455029, 18455027 }, + { 33554432, 36911011, 36911009 }, + { 67108864, 73819861, 73819859 }, + { 134217728,147639589,147639587}, + { 268435456,295279081,295279079}, + { 536870912,590559793,590559791}, + { 1073741824, 1181116273, 1181116271 }, + { 2147483648ul, 2362232233ul, 2362232231ul } +}; + +static int +entry_is_free(struct set_entry *entry) +{ + return entry-key == NULL; +} + +static int +entry_is_deleted(struct set_entry *entry) +{ + return entry-key == deleted_key; +} + +static int +entry_is_present(struct set_entry *entry) +{ + return entry-key
[Mesa-dev] [PATCH 2/3] main/syncobj: return GL_INVALID_VALUE for invalid sync objects
Note: The GL/GLES3 web man pages don't seem to properly document glWaitSync's error when the sync object is invalid. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- src/mesa/main/syncobj.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index 745e982..a2d3137 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -235,7 +235,7 @@ _mesa_DeleteSync(GLsync sync) } if (!_mesa_validate_sync(syncObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, glDeleteSync); + _mesa_error(ctx, GL_INVALID_VALUE, glDeleteSync (not a valid sync object)); return; } @@ -303,7 +303,7 @@ _mesa_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_WAIT_FAILED); if (!_mesa_validate_sync(syncObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, glClientWaitSync); + _mesa_error(ctx, GL_INVALID_VALUE, glClientWaitSync (not a valid sync object)); return GL_WAIT_FAILED; } @@ -347,7 +347,7 @@ _mesa_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) ASSERT_OUTSIDE_BEGIN_END(ctx); if (!_mesa_validate_sync(syncObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, glWaitSync); + _mesa_error(ctx, GL_INVALID_VALUE, glWaitSync (not a valid sync object)); return; } @@ -376,7 +376,7 @@ _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, ASSERT_OUTSIDE_BEGIN_END(ctx); if (!_mesa_validate_sync(syncObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, glGetSynciv); + _mesa_error(ctx, GL_INVALID_VALUE, glGetSynciv (not a valid sync object)); return; } -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] mesa: validate that sync objects were created by mesa
Previously, the user could send in a pointer that was not created by mesa. When we dereferenced that pointer, there would be an exception. Now we keep a set of pointers and verify that the pointer exists in that set before dereferencing it. Note: This fixes several crashing gles3conform tests. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- src/mesa/main/mtypes.h |6 -- src/mesa/main/shared.c | 12 +++- src/mesa/main/syncobj.c | 23 +++ 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index db67160..2da8073 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -79,6 +79,8 @@ struct st_context; struct gl_uniform_storage; struct prog_instruction; struct gl_program_parameter_list; +struct set; +struct set_entry; /*@}*/ @@ -2522,7 +2524,7 @@ struct gl_query_state /** Sync object state */ struct gl_sync_object { - struct simple_node link; + struct set_entry *SetEntry; GLenum Type; /** GL_SYNC_FENCE */ GLuint Name; /** Fence name */ GLint RefCount;/** Reference count */ @@ -2589,7 +2591,7 @@ struct gl_shared_state struct _mesa_HashTable *FrameBuffers; /* GL_ARB_sync */ - struct simple_node SyncObjects; + struct set *SyncObjects; /** GL_ARB_sampler_objects */ struct _mesa_HashTable *SamplerObjects; diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index eaf9f8d..a98a45c 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -31,12 +31,14 @@ #include mfeatures.h #include mtypes.h #include hash.h +#include hash_table.h #include atifragshader.h #include bufferobj.h #include shared.h #include program/program.h #include dlist.h #include samplerobj.h +#include set.h #include shaderobj.h #include syncobj.h @@ -115,7 +117,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx) shared-FrameBuffers = _mesa_NewHashTable(); shared-RenderBuffers = _mesa_NewHashTable(); - make_empty_list( shared-SyncObjects); + shared-SyncObjects = _mesa_set_create(NULL, _mesa_key_pointer_equal); return shared; } @@ -327,13 +329,13 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) _mesa_reference_buffer_object(ctx, shared-NullBufferObj, NULL); { - struct simple_node *node; - struct simple_node *temp; + struct set_entry *entry; - foreach_s(node, temp, shared-SyncObjects) { -_mesa_unref_sync_object(ctx, (struct gl_sync_object *) node); + set_foreach(shared-SyncObjects, entry) { + _mesa_unref_sync_object(ctx, (struct gl_sync_object *) entry-key); } } + _mesa_set_destroy(shared-SyncObjects, NULL); _mesa_HashDeleteAll(shared-SamplerObjects, delete_sampler_object_cb, ctx); _mesa_DeleteHashTable(shared-SamplerObjects); diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index a2d3137..3127a39 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -63,6 +63,8 @@ #include get.h #include dispatch.h #include mtypes.h +#include set.h +#include hash_table.h #include syncobj.h @@ -173,9 +175,12 @@ _mesa_free_sync_data(struct gl_context *ctx) static int -_mesa_validate_sync(struct gl_sync_object *syncObj) +_mesa_validate_sync(struct gl_context *ctx, struct gl_sync_object *syncObj) { return (syncObj != NULL) + _mesa_set_search(ctx-Shared-SyncObjects, + _mesa_hash_pointer(syncObj), + syncObj) != NULL (syncObj-Type == GL_SYNC_FENCE) !syncObj-DeletePending; } @@ -196,7 +201,7 @@ _mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) _glthread_LOCK_MUTEX(ctx-Shared-Mutex); syncObj-RefCount--; if (syncObj-RefCount == 0) { - remove_from_list( syncObj-link); + _mesa_set_remove(ctx-Shared-SyncObjects, syncObj-SetEntry); _glthread_UNLOCK_MUTEX(ctx-Shared-Mutex); ctx-Driver.DeleteSyncObject(ctx, syncObj); @@ -213,7 +218,7 @@ _mesa_IsSync(GLsync sync) struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync; ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - return _mesa_validate_sync(syncObj) ? GL_TRUE : GL_FALSE; + return _mesa_validate_sync(ctx, syncObj) ? GL_TRUE : GL_FALSE; } @@ -234,7 +239,7 @@ _mesa_DeleteSync(GLsync sync) return; } - if (!_mesa_validate_sync(syncObj)) { + if (!_mesa_validate_sync(ctx, syncObj)) { _mesa_error(ctx, GL_INVALID_VALUE, glDeleteSync (not a valid sync object)); return; } @@ -284,7 +289,9 @@ _mesa_FenceSync(GLenum condition, GLbitfield flags) ctx-Driver.FenceSync(ctx, syncObj, condition, flags); _glthread_LOCK_MUTEX(ctx-Shared-Mutex); - insert_at_tail( ctx-Shared-SyncObjects, syncObj-link); + syncObj-SetEntry = _mesa_set_add(ctx-Shared-SyncObjects, +
[Mesa-dev] [Bug 57899] New: Compilation fails (libgl): No rule to make target `../program/libdricore_program.la', needed by `libdricore9.1.0.la'
https://bugs.freedesktop.org/show_bug.cgi?id=57899 Priority: medium Bug ID: 57899 Assignee: mesa-dev@lists.freedesktop.org Summary: Compilation fails (libgl): No rule to make target `../program/libdricore_program.la', needed by `libdricore9.1.0.la' Severity: major Classification: Unclassified OS: Linux (All) Reporter: pej...@gmail.com Hardware: x86-64 (AMD64) Status: NEW Version: unspecified Component: Mesa core Product: Mesa Created attachment 71017 -- https://bugs.freedesktop.org/attachment.cgi?id=71017action=edit Build log Compilation fails for me for some time already. Build log attached. Compilation flags: autoreconf -vfi ./autogen.sh --prefix=/usr \ --with-dri-driverdir=/usr/lib/xorg/modules/dri \ --with-gallium-drivers=r600,swrast \ --with-dri-drivers= \ --disable-gallium-llvm \ --enable-egl \ --enable-gallium-egl \ --with-egl-platforms=x11,drm \ --enable-shared-glapi \ --enable-gbm \ --enable-glx-tls \ --enable-glx \ --enable-osmesa \ --enable-gles1 \ --enable-gles2 \ --enable-texture-float \ --enable-xa \ --enable-vdpau \ --enable-openvg \ --enable-gallium-g3dvl Arch Linux. -- 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
[Mesa-dev] [Bug 57899] Compilation fails (libgl): No rule to make target `../program/libdricore_program.la', needed by `libdricore9.1.0.la'
https://bugs.freedesktop.org/show_bug.cgi?id=57899 pejakm pej...@gmail.com changed: What|Removed |Added Version|unspecified |git -- 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
[Mesa-dev] [Bug 57899] Compilation fails (libgl): No rule to make target `../program/libdricore_program.la', needed by `libdricore9.1.0.la'
https://bugs.freedesktop.org/show_bug.cgi?id=57899 pejakm pej...@gmail.com changed: What|Removed |Added Priority|medium |high -- 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] gallivm: have a default emit function for fdiv/rcp
On Wed, Dec 05, 2012 at 12:07:24AM +0100, Vincent Lejeune wrote: --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 25 ++ 1 file changed, 25 insertions(+) Reviewed-by: Tom Stellard thomas.stell...@amd.com diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index 17f288f..cd57fae 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -584,6 +584,29 @@ mul_emit( emit_data-args[0], emit_data-args[1]); } +/*.TGSI_OPCODE_DIV.*/ +static void fdiv_emit( + const struct lp_build_tgsi_action * action, + struct lp_build_tgsi_context * bld_base, + struct lp_build_emit_data * emit_data) +{ + emit_data-output[emit_data-chan] = LLVMBuildFDiv( + bld_base-base.gallivm-builder, + emit_data-args[0], emit_data-args[1], ); +} + +/*.TGSI_OPCODE_RCP.*/ +static void rcp_emit( + const struct lp_build_tgsi_action * action, + struct lp_build_tgsi_context * bld_base, + struct lp_build_emit_data * emit_data) +{ + LLVMValueRef one; + one = lp_build_const_float(bld_base-base.gallivm, 1.0f); + emit_data-output[emit_data-chan] = lp_build_emit_llvm_binary(bld_base, + TGSI_OPCODE_DIV, one, emit_data-args[0]); +} + /* TGSI_OPCODE_POW */ static void @@ -811,6 +834,8 @@ lp_set_default_actions(struct lp_build_tgsi_context * bld_base) bld_base-op_actions[TGSI_OPCODE_MAD].emit = mad_emit; bld_base-op_actions[TGSI_OPCODE_MOV].emit = mov_emit; bld_base-op_actions[TGSI_OPCODE_MUL].emit = mul_emit; + bld_base-op_actions[TGSI_OPCODE_DIV].emit = fdiv_emit; + bld_base-op_actions[TGSI_OPCODE_RCP].emit = rcp_emit; bld_base-op_actions[TGSI_OPCODE_SFL].emit = sfl_emit; bld_base-op_actions[TGSI_OPCODE_STR].emit = str_emit; bld_base-op_actions[TGSI_OPCODE_SUB].emit = sub_emit; -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] gallivm: Have a default emit function for min/max opcode
On Wed, Dec 05, 2012 at 12:08:15AM +0100, Vincent Lejeune wrote: --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 29 ++ 1 file changed, 29 insertions(+) Reviewed-by: Tom Stellard thomas.stell...@amd.com diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index cd57fae..cc4bd2e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -744,6 +744,32 @@ umul_emit( emit_data-args[0], emit_data-args[1]); } +/* TGSI_OPCODE_MAX */ +static void fmax_emit( + const struct lp_build_tgsi_action * action, + struct lp_build_tgsi_context * bld_base, + struct lp_build_emit_data * emit_data) +{ + LLVMBuilderRef builder = bld_base-base.gallivm-builder; + emit_data-output[emit_data-chan] = LLVMBuildSelect(builder, + LLVMBuildFCmp(builder, LLVMRealUGE, + emit_data-args[0], emit_data-args[1], ), + emit_data-args[0], emit_data-args[1], ); +} + +/* TGSI_OPCODE_MIN */ +static void fmin_emit( + const struct lp_build_tgsi_action * action, + struct lp_build_tgsi_context * bld_base, + struct lp_build_emit_data * emit_data) +{ + LLVMBuilderRef builder = bld_base-base.gallivm-builder; + emit_data-output[emit_data-chan] = LLVMBuildSelect(builder, + LLVMBuildFCmp(builder, LLVMRealUGE, + emit_data-args[0], emit_data-args[1], ), + emit_data-args[1], emit_data-args[0], ); +} + /* TGSI_OPCODE_XPD */ static void @@ -844,6 +870,9 @@ lp_set_default_actions(struct lp_build_tgsi_context * bld_base) bld_base-op_actions[TGSI_OPCODE_U2F].emit = u2f_emit; bld_base-op_actions[TGSI_OPCODE_UMAD].emit = umad_emit; bld_base-op_actions[TGSI_OPCODE_UMUL].emit = umul_emit; + + bld_base-op_actions[TGSI_OPCODE_MAX].emit = fmax_emit; + bld_base-op_actions[TGSI_OPCODE_MIN].emit = fmin_emit; } /* CPU Only default actions */ -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] radeon/llvm: replace int_AMDGPU_rcp by fdiv (1.0, x) in RECIP pattern
On Wed, Dec 05, 2012 at 12:09:40AM +0100, Vincent Lejeune wrote: --- lib/Target/AMDGPU/R600Instructions.td | 4 ++-- lib/Target/AMDGPU/SIInstructions.td | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Tom Stellard thomas.stell...@amd.com diff --git a/lib/Target/AMDGPU/R600Instructions.td b/lib/Target/AMDGPU/R600Instructions.td index 9259680..d75c32e 100644 --- a/lib/Target/AMDGPU/R600Instructions.td +++ b/lib/Target/AMDGPU/R600Instructions.td @@ -898,8 +898,8 @@ class RECIP_CLAMPED_Common bits11 inst : R600_1OP inst, RECIP_CLAMPED, [] ; -class RECIP_IEEE_Common bits11 inst : R600_1OP_Helper - inst, RECIP_IEEE, int_AMDGPU_rcp +class RECIP_IEEE_Common bits11 inst : R600_1OP + inst, RECIP_IEEE, [(set R600_Reg32:$dst, (fdiv FP_ONE, R600_Reg32:$src0))] ; class RECIP_UINT_Common bits11 inst : R600_1OP_Helper diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td index cb94381..2354b2e 100644 --- a/lib/Target/AMDGPU/SIInstructions.td +++ b/lib/Target/AMDGPU/SIInstructions.td @@ -609,7 +609,7 @@ defm V_LOG_F32 : VOP1_32 0x0027, V_LOG_F32, []; defm V_RCP_CLAMP_F32 : VOP1_32 0x0028, V_RCP_CLAMP_F32, []; defm V_RCP_LEGACY_F32 : VOP1_32 0x0029, V_RCP_LEGACY_F32, []; defm V_RCP_F32 : VOP1_32 0x002a, V_RCP_F32, - [(set VReg_32:$dst, (int_AMDGPU_rcp AllReg_32:$src0))] + [(set VReg_32:$dst, (fdiv FP_ONE, AllReg_32:$src0))] ; defm V_RCP_IFLAG_F32 : VOP1_32 0x002b, V_RCP_IFLAG_F32, []; defm V_RSQ_CLAMP_F32 : VOP1_32 0x002c, V_RSQ_CLAMP_F32, []; -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] radeon/llvm: add a pattern for min/max
On Wed, Dec 05, 2012 at 12:09:41AM +0100, Vincent Lejeune wrote: --- lib/Target/AMDGPU/R600ISelLowering.cpp | 47 lib/Target/AMDGPU/R600Instructions.td | 12 +++-- lib/Target/AMDGPU/SIISelLowering.cpp | 49 ++ lib/Target/AMDGPU/SIInstructions.td| 10 +-- 4 files changed, 114 insertions(+), 4 deletions(-) diff --git a/lib/Target/AMDGPU/R600ISelLowering.cpp b/lib/Target/AMDGPU/R600ISelLowering.cpp index 6f1c1d7..1103ff4 100644 --- a/lib/Target/AMDGPU/R600ISelLowering.cpp +++ b/lib/Target/AMDGPU/R600ISelLowering.cpp @@ -764,6 +764,53 @@ SDValue R600TargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG DAG) const } } + // Standardize Min/Max pattern if applicable It should be easy to consolidate these, just add a function to the AMDGPUISelLowering class to handle Max/Min and call it from LowerSelectCC. There already exist custom AMDGPU DAG nodes FMIN, FMAX that you can lower them to. Then you won't need to change the tablegen files at all. -Tom + if (CompareVT == VT == MVT::f32 + ((LHS == True RHS == False) || (LHS == False RHS == True))) { +ISD::CondCode CCOpcode = castCondCodeSDNode(CC)-get(); +switch (CCOpcode) { +case ISD::SETOEQ: +case ISD::SETONE: +case ISD::SETUNE: +case ISD::SETNE: +case ISD::SETUEQ: +case ISD::SETEQ: +case ISD::SETFALSE: +case ISD::SETFALSE2: +case ISD::SETTRUE: +case ISD::SETTRUE2: +case ISD::SETUO: +case ISD::SETO: + assert(0 Operation should already be optimised !); +case ISD::SETULE: +case ISD::SETULT: +case ISD::SETOLE: +case ISD::SETOLT: +case ISD::SETLE: +case ISD::SETLT: + CCOpcode = ISD::getSetCCInverse(CCOpcode, CompareVT == MVT::i32); + Temp = True; + True = False; + False = Temp; + break; +case ISD::SETGT: +case ISD::SETGE: +case ISD::SETUGE: +case ISD::SETOGE: +case ISD::SETUGT: +case ISD::SETOGT: + CCOpcode = ISD::SETUGE; + break; +case ISD::SETCC_INVALID: + assert(0 Invalid setcc condcode !); +} +return DAG.getNode(ISD::SELECT_CC, DL, CompareVT, +LHS, RHS, +True, False, +DAG.getCondCode(CCOpcode)); +return Op; + } + // If we make it this for it means we have no native instructions to handle // this SELECT_CC, so we must lower it. SDValue HWTrue, HWFalse; diff --git a/lib/Target/AMDGPU/R600Instructions.td b/lib/Target/AMDGPU/R600Instructions.td index d75c32e..43a7552 100644 --- a/lib/Target/AMDGPU/R600Instructions.td +++ b/lib/Target/AMDGPU/R600Instructions.td @@ -555,8 +555,16 @@ def ADD : R600_2OP_Helper 0x0, ADD, fadd; // Non-IEEE MUL: 0 * anything = 0 def MUL : R600_2OP_Helper 0x1, MUL NON-IEEE, fmul; def MUL_IEEE : R600_2OP_Helper 0x2, MUL_IEEE, int_AMDGPU_mul; -def MAX : R600_2OP_Helper 0x3, MAX, AMDGPUfmax; -def MIN : R600_2OP_Helper 0x4, MIN, AMDGPUfmin; +def MAX : R600_2OP 0x3, MAX, + [(set R600_Reg32:$dst, + (selectcc (f32 R600_Reg32:$src0), (f32 R600_Reg32:$src1), + (f32 R600_Reg32:$src0), (f32 R600_Reg32:$src1), + COND_GE))]; +def MIN : R600_2OP 0x4, MIN, + [(set R600_Reg32:$dst, + (selectcc (f32 R600_Reg32:$src0), (f32 R600_Reg32:$src1), + (f32 R600_Reg32:$src1), (f32 R600_Reg32:$src0), + COND_GE))]; // For the SET* instructions there is a naming conflict in TargetSelectionDAG.td, // so some of the instruction names don't match the asm string. diff --git a/lib/Target/AMDGPU/SIISelLowering.cpp b/lib/Target/AMDGPU/SIISelLowering.cpp index 45f180f..638c9df 100644 --- a/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/lib/Target/AMDGPU/SIISelLowering.cpp @@ -383,6 +383,55 @@ SDValue SITargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG DAG) const EVT VT = Op.getValueType(); DebugLoc DL = Op.getDebugLoc(); + // FIXME: This should be factored between R600 and SI + // Standardize Min/Max pattern if applicable + EVT CompareVT = LHS.getValueType(); + SDValue Temp; + if ((LHS == True RHS == False) || (LHS == False RHS == True)) { +ISD::CondCode CCOpcode = castCondCodeSDNode(CC)-get(); +switch (CCOpcode) { +case ISD::SETOEQ: +case ISD::SETONE: +case ISD::SETUNE: +case ISD::SETNE: +case ISD::SETUEQ: +case ISD::SETEQ: +case ISD::SETFALSE: +case ISD::SETFALSE2: +case ISD::SETTRUE: +case ISD::SETTRUE2: +case ISD::SETUO: +case ISD::SETO: + assert(0 Operation should already be optimised !); +case ISD::SETULE: +case ISD::SETULT: +case ISD::SETOLE: +case ISD::SETOLT: +case ISD::SETLE: +case ISD::SETLT: + CCOpcode = ISD::getSetCCInverse(CCOpcode, CompareVT == MVT::i32); + Temp = True; + True = False; + False = Temp; + break; +case ISD::SETGT: +case ISD::SETGE: +case
Re: [Mesa-dev] [PATCH] glsl: add new variable declaration in function body in lower_output_read
On 11/27/2012 02:09 PM, Vincent Lejeune wrote: --- src/glsl/lower_output_reads.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/lower_output_reads.cpp b/src/glsl/lower_output_reads.cpp index 90d71b0..a6192a5 100644 --- a/src/glsl/lower_output_reads.cpp +++ b/src/glsl/lower_output_reads.cpp @@ -97,6 +97,7 @@ output_read_remover::visit(ir_dereference_variable *ir) temp = new(var_ctx) ir_variable(ir-var-type, ir-var-name, ir_var_temporary); hash_table_insert(replacements, temp, ir-var); + ir-var-insert_after(temp); } /* Update the dereference to use the temporary */ Yeah, that looks necessary. Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH libclc] Make libclc more Linux FHS conform.
On Fri, Nov 30, 2012 at 01:44:57AM +0100, Johannes Obermayr wrote: - First introducing a versioning scheme - Add --libexecdir, --includedir and --pkgconfigdir and prefill them as well as --prefix - Build all targets by default - Create clc.pc and install it in $pkgconfigdir - Use clang++ instead of c++ - Rename builtins.bc to built_libs/$triple.bc and install them in $libexecdir - Includes are installed recursively to $includedir - Finally add $(DESTDIR) for 'make install' Hi Johannes, Thanks for these build system cleanups, they were sorely needed. The Mesa patch looks good to me. I've forwarded this patch to the libclc mailing list to see if they would be interested in applying this upstream. The only issue I have with this patch is that it builds the 'nvptx--nvidiacl', and 'nvptx64--nvidiacl' targets by default. This is actually what upstream libclc does, but in my libclc tree I want to keep r600 as the only default target, because I don't want broken nvptx builds to prevent users from building r600. So, I'll drop this chunk before I apply the patch. I'll push these two patches once I get a chance to update the documentation and test older LLVM / Mesa versions. -Tom --- configure.py | 67 +- 1 Datei geändert, 52 Zeilen hinzugefügt(+), 15 Zeilen entfernt(-) diff --git a/configure.py b/configure.py index 5062ab6..66789a2 100755 --- a/configure.py +++ b/configure.py @@ -4,6 +4,10 @@ def c_compiler_rule(b, name, description, compiler, flags): command = %s -MMD -MF $out.d %s -c -o $out $in % (compiler, flags) b.rule(name, command, description + $out, depfile=$out.d) +version_major = 0; +version_minor = 0; +version_patch = 1; + from optparse import OptionParser import os from subprocess import * @@ -19,12 +23,34 @@ p.add_option('--with-llvm-config', metavar='PATH', help='use given llvm-config script') p.add_option('--prefix', metavar='PATH', help='install to given prefix') +p.add_option('--libexecdir', metavar='PATH', + help='install *.bc to given dir') +p.add_option('--includedir', metavar='PATH', + help='install include files to given dir') +p.add_option('--pkgconfigdir', metavar='PATH', + help='install clc.pc to given dir') p.add_option('-g', metavar='GENERATOR', default='make', help='use given generator (default: make)') (options, args) = p.parse_args() llvm_config_exe = options.with_llvm_config or llvm-config +prefix = options.prefix +if not prefix: + prefix = '/usr/local' + +libexecdir = options.libexecdir +if not libexecdir: + libexecdir = os.path.join(prefix, 'lib/clc') + +includedir = options.includedir +if not includedir: + includedir = os.path.join(prefix, 'include') + +pkgconfigdir = options.pkgconfigdir +if not pkgconfigdir: + pkgconfigdir = os.path.join(prefix, 'lib/pkgconfig') + def llvm_config(args): try: proc = Popen([llvm_config_exe] + args, stdout=PIPE) @@ -42,7 +68,7 @@ llvm_clang = os.path.join(llvm_bindir, 'clang') llvm_link = os.path.join(llvm_bindir, 'llvm-link') llvm_opt = os.path.join(llvm_bindir, 'opt') -default_targets = ['r600--'] +default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl', 'r600--'] targets = args if not targets: @@ -57,8 +83,8 @@ b.rule(LLVM_LINK, command = llvm_link + -o $out $in, b.rule(OPT, command = llvm_opt + -O3 -o $out $in, description = 'OPT $out') -c_compiler_rule(b, LLVM_TOOL_CXX, 'CXX', 'c++', llvm_cxxflags) -b.rule(LLVM_TOOL_LINK, c++ -o $out $in %s % llvm_core_libs, 'LINK $out') +c_compiler_rule(b, LLVM_TOOL_CXX, 'LLVM-CXX', 'clang++', llvm_cxxflags) +b.rule(LLVM_TOOL_LINK, clang++ -o $out $in %s % llvm_core_libs, 'LINK $out') prepare_builtins = os.path.join('utils', 'prepare-builtins') b.build(os.path.join('utils', 'prepare-builtins.o'), LLVM_TOOL_CXX, @@ -72,9 +98,15 @@ b.rule(PREPARE_BUILTINS, %s -o $out $in % prepare_builtins, manifest_deps = set([sys.argv[0], os.path.join(srcdir, 'build', 'metabuild.py'), os.path.join(srcdir, 'build', 'ninja_syntax.py')]) -install_files = [] +install_files_bc = [] install_deps = [] +# Create libclc.pc +clc = open('libclc.pc', 'w') +clc.write('includedir=%(inc)s\nlibexecdir=%(lib)s\n\nName: libclc\nDescription: Library requirements of the OpenCL C programming language\nVersion: %(maj)s.%(min)s.%(pat)s\nCflags: -I${includedir}\nLibs: -L${libexecdir}' % +{'inc': includedir, 'lib': libexecdir, 'maj': version_major, 'min': version_minor, 'pat': version_patch}) +clc.close() + for target in targets: (t_arch, t_vendor, t_os) = target.split('-') archs = [t_arch] @@ -94,7 +126,6 @@ for target in targets: [os.path.join(srcdir, subdir, 'lib') for subdir in subdirs]) clang_cl_includes = ' '.join([-I%s % incdir for incdir in incdirs]) -
Re: [Mesa-dev] [PATCH] clover: Install CL headers.
On Tue, Dec 04, 2012 at 02:18:03PM +0100, Johannes Obermayr wrote: Note: This is a candidate for the stable branches. --- v2: remove trailing \ in last line. --- Reviewed-by: Tom Stellard thomas.stell...@amd.com src/gallium/state_trackers/clover/Makefile.am | 10 ++ 1 Datei geändert, 10 Zeilen hinzugefügt(+) diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am index c37d010..f068164 100644 --- a/src/gallium/state_trackers/clover/Makefile.am +++ b/src/gallium/state_trackers/clover/Makefile.am @@ -74,3 +74,13 @@ libclover_la_SOURCES = \ api/event.cpp \ api/program.cpp \ api/kernel.cpp + +cldir = $(includedir)/CL +cl_HEADERS = \ + $(top_srcdir)/include/CL/cl.h \ + $(top_srcdir)/include/CL/cl_ext.h \ + $(top_srcdir)/include/CL/cl_gl.h \ + $(top_srcdir)/include/CL/cl_gl_ext.h \ + $(top_srcdir)/include/CL/cl_platform.h \ + $(top_srcdir)/include/CL/opencl.h \ + $(top_srcdir)/include/CL/cl.hpp -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] AMDGPU: Match AMDGPU.cube intrinsic for SI.
On Tue, Dec 04, 2012 at 07:03:35PM +0100, Michel Dänzer wrote: From: Michel Dänzer michel.daen...@amd.com Reviewed-by: Tom Stellard thomas.stell...@amd.com Signed-off-by: Michel Dänzer michel.daen...@amd.com --- lib/Target/AMDGPU/SIInstructions.td | 21 + 1 file changed, 21 insertions(+) diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td index d6f71f6..ecb874a 100644 --- a/lib/Target/AMDGPU/SIInstructions.td +++ b/lib/Target/AMDGPU/SIInstructions.td @@ -1269,6 +1269,27 @@ def : Pat (SI_KIL (V_MOV_IMM_I32 0xbf80)) ; +def : Pat + (int_AMDGPU_cube VReg_128:$src), + (INSERT_SUBREG (INSERT_SUBREG (INSERT_SUBREG (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), +(V_CUBETC_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x), + (EXTRACT_SUBREG VReg_128:$src, sel_y), + (EXTRACT_SUBREG VReg_128:$src, sel_z), + 0, 0, 0, 0), sel_x), +(V_CUBESC_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x), + (EXTRACT_SUBREG VReg_128:$src, sel_y), + (EXTRACT_SUBREG VReg_128:$src, sel_z), + 0, 0, 0, 0), sel_y), +(V_CUBEMA_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x), + (EXTRACT_SUBREG VReg_128:$src, sel_y), + (EXTRACT_SUBREG VReg_128:$src, sel_z), + 0, 0, 0, 0), sel_z), +(V_CUBEID_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x), + (EXTRACT_SUBREG VReg_128:$src, sel_y), + (EXTRACT_SUBREG VReg_128:$src, sel_z), + 0, 0, 0, 0), sel_w) +; + /** == **/ /** VOP3 Patterns**/ /** == **/ -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] radeon/llvm: Export prepare_cube_coords helper to driver.
On Tue, Dec 04, 2012 at 07:03:48PM +0100, Michel Dänzer wrote: From: Michel Dänzer michel.daen...@amd.com To be used by radeonsi. For both patches: Reviewed-by: Tom Stellard thomas.stell...@amd.com Signed-off-by: Michel Dänzer michel.daen...@amd.com --- src/gallium/drivers/radeon/radeon_llvm.h|3 +++ src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 18 ++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm.h b/src/gallium/drivers/radeon/radeon_llvm.h index 61975c4..61f3772 100644 --- a/src/gallium/drivers/radeon/radeon_llvm.h +++ b/src/gallium/drivers/radeon/radeon_llvm.h @@ -152,6 +152,9 @@ static inline LLVMValueRef bitcast( } +void radeon_llvm_emit_prepare_cube_coords(struct lp_build_tgsi_context * bld_base, + LLVMValueRef *arg, unsigned target); + void radeon_llvm_context_init(struct radeon_llvm_context * ctx); void radeon_llvm_dispose(struct radeon_llvm_context * ctx); diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c index 5e3d6c2..46abb2b 100644 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c @@ -514,11 +514,12 @@ static void kil_emit( } -static void emit_prepare_cube_coords( +void radeon_llvm_emit_prepare_cube_coords( struct lp_build_tgsi_context * bld_base, - struct lp_build_emit_data * emit_data) + LLVMValueRef *arg, +unsigned target) { - boolean shadowcube = (emit_data-inst-Texture.Texture == TGSI_TEXTURE_SHADOWCUBE); + boolean shadowcube = (target == TGSI_TEXTURE_SHADOWCUBE); struct gallivm_state * gallivm = bld_base-base.gallivm; LLVMBuilderRef builder = gallivm-builder; LLVMTypeRef type = bld_base-base.elem_type; @@ -528,7 +529,7 @@ static void emit_prepare_cube_coords( LLVMValueRef v = build_intrinsic(builder, llvm.AMDGPU.cube, LLVMVectorType(type, 4), - emit_data-args[0],1, LLVMReadNoneAttribute); + arg, 1, LLVMReadNoneAttribute); /* save src.w for shadow cube */ cnt = shadowcube ? 3 : 4; @@ -560,8 +561,7 @@ static void emit_prepare_cube_coords( coords[1] = coords[0]; coords[0] = coords[3]; - emit_data-args[0] = lp_build_gather_values(bld_base-base.gallivm, - coords, 4); + *arg = lp_build_gather_values(bld_base-base.gallivm, coords, 4); } static void txd_fetch_args( @@ -610,7 +610,8 @@ static void txp_fetch_args( if ((inst-Texture.Texture == TGSI_TEXTURE_CUBE || inst-Texture.Texture == TGSI_TEXTURE_SHADOWCUBE) inst-Instruction.Opcode != TGSI_OPCODE_TXQ) { - emit_prepare_cube_coords(bld_base, emit_data); + radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data-args[0], + inst-Texture.Texture); } } @@ -642,7 +643,8 @@ static void tex_fetch_args( if ((inst-Texture.Texture == TGSI_TEXTURE_CUBE || inst-Texture.Texture == TGSI_TEXTURE_SHADOWCUBE) inst-Instruction.Opcode != TGSI_OPCODE_TXQ) { - emit_prepare_cube_coords(bld_base, emit_data); + radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data-args[0], + inst-Texture.Texture); } } -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] mesa: Ignore size and offset parameters for BindBufferRange when buffer is 0
The ES 3 conformance suite unbinds buffers (by binding buffer 0) and passes zero for the size and offset, which the spec explicitly disallows. Otherwise, this seems like a reasonable thing to do. Khronos will be changing the spec to allow this (bug 9765). Fixes es3conform's transform_feedback_init_defaults test. --- src/mesa/main/bufferobj.c | 22 -- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index f173206..bbfcab8 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -2157,17 +2157,19 @@ _mesa_BindBufferRange(GLenum target, GLuint index, return; } - if (size = 0) { - _mesa_error(ctx, GL_INVALID_VALUE, glBindBufferRange(size=%d), - (int) size); - return; - } + if (buffer != 0) { + if (size = 0) { + _mesa_error(ctx, GL_INVALID_VALUE, glBindBufferRange(size=%d), + (int) size); + return; + } - if (offset + size bufObj-Size) { - _mesa_error(ctx, GL_INVALID_VALUE, - glBindBufferRange(offset + size %d buffer size %d), - (int) (offset + size), (int) (bufObj-Size)); - return; + if (offset + size bufObj-Size) { + _mesa_error(ctx, GL_INVALID_VALUE, + glBindBufferRange(offset + size %d buffer size %d), + (int) (offset + size), (int) (bufObj-Size)); + return; + } } switch (target) { -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: Ignore size and offset parameters for BindBufferRange when buffer is 0
On 12/04/2012 07:17 PM, Matt Turner wrote: The ES 3 conformance suite unbinds buffers (by binding buffer 0) and passes zero for the size and offset, which the spec explicitly disallows. Otherwise, this seems like a reasonable thing to do. Khronos will be changing the spec to allow this (bug 9765). Fixes es3conform's transform_feedback_init_defaults test. --- src/mesa/main/bufferobj.c | 22 -- 1 files changed, 12 insertions(+), 10 deletions(-) Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 57127] make dist fails with No rule to make target `glapi_gentable.c', needed by `distdir'.
https://bugs.freedesktop.org/show_bug.cgi?id=57127 Ian Romanick i...@freedesktop.org changed: What|Removed |Added Severity|normal |enhancement Priority|high|medium --- Comment #1 from Ian Romanick i...@freedesktop.org --- The real issue here is that I forgot 'make dist' doesn't work yet. You have to use 'make tarballs'. Changing priority to reflect reality. -- 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
[Mesa-dev] [PATCH V4 0/6] i965: Add support for ARB_texture_cube_map_array
Changes from V3: * Various style nits fixed (Thanks Eric) * Expand out IMM operands for Gen7 math, since it still can't use them. (Thanks Kenneth) -- Chris ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V4 1/6] i965: Add various plumbing for cubemap arrays
V4: Fixed style nits Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_tex_layout.c| 4 src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 3 ++- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 1 + src/mesa/drivers/dri/i965/gen7_sampler_state.c| 3 ++- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 3 ++- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 1a2bedb..b661570 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_layout.c +++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c @@ -70,6 +70,10 @@ void brw_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree *mt) { switch (mt-target) { + case GL_TEXTURE_CUBE_MAP_ARRAY: + brw_miptree_layout_texture_array(intel, mt); + break; + case GL_TEXTURE_CUBE_MAP: if (intel-gen = 5) { /* On Ironlake, cube maps are finally represented as just a series of diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c index fb9cb83..0d1f249 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -248,7 +248,8 @@ static void brw_update_sampler_state(struct brw_context *brw, /* Cube-maps on 965 and later must use the same wrap mode for all 3 * coordinate dimensions. Futher, only CUBE and CLAMP are valid. */ - if (texObj-Target == GL_TEXTURE_CUBE_MAP) { + if (texObj-Target == GL_TEXTURE_CUBE_MAP || + texObj-Target == GL_TEXTURE_CUBE_MAP_ARRAY) { if (ctx-Texture.CubeMapSeamless (gl_sampler-MinFilter != GL_NEAREST || gl_sampler-MagFilter != GL_NEAREST)) { diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index a7866d5..5c4db83 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -65,6 +65,7 @@ translate_tex_target(GLenum target) return BRW_SURFACE_3D; case GL_TEXTURE_CUBE_MAP: + case GL_TEXTURE_CUBE_MAP_ARRAY: return BRW_SURFACE_CUBE; default: diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c b/src/mesa/drivers/dri/i965/gen7_sampler_state.c index ea634a9..6f0a757 100644 --- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c @@ -111,7 +111,8 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, int ss_index, /* Cube-maps on 965 and later must use the same wrap mode for all 3 * coordinate dimensions. Futher, only CUBE and CLAMP are valid. */ - if (texObj-Target == GL_TEXTURE_CUBE_MAP) { + if (texObj-Target == GL_TEXTURE_CUBE_MAP || + texObj-Target == GL_TEXTURE_CUBE_MAP_ARRAY) { if (ctx-Texture.CubeMapSeamless (gl_sampler-MinFilter != GL_NEAREST || gl_sampler-MagFilter != GL_NEAREST)) { diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c index 466a038..1e5af95 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c @@ -328,7 +328,8 @@ gen7_update_texture_surface(struct gl_context *ctx, firstImage-InternalFormat, tObj-DepthMode, sampler-sRGBDecode); - if (tObj-Target == GL_TEXTURE_CUBE_MAP) { + if (tObj-Target == GL_TEXTURE_CUBE_MAP || + tObj-Target == GL_TEXTURE_CUBE_MAP_ARRAY) { surf-ss0.cube_pos_x = 1; surf-ss0.cube_pos_y = 1; surf-ss0.cube_pos_z = 1; -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V4 2/6] i965: vs: Add fixup for textureSize with cube array samplers
V3: Fixed weird whitespace V4: Use sampler's type rather than variable's type; otherwise broken with arrays of samplers. (Thanks Eric) Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 544974a..7bc221a 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -2124,6 +2124,17 @@ vec4_visitor::visit(ir_texture *ir) emit(inst); + /* fixup num layers (z) for cube arrays: hardware returns faces * layers; +* spec requires layers. */ + if (ir-op == ir_txs) { + glsl_type const *type = ir-sampler-type; + if (type-sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE +type-sampler_array) + emit_math(SHADER_OPCODE_INT_QUOTIENT, + with_writemask(inst-dst, WRITEMASK_Z), + src_reg(inst-dst), src_reg(6)); + } + swizzle_result(ir, src_reg(inst-dst), sampler); } -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V4 3/6] i965: fs: fix gen6+ math operands in one place
V4: Fix various style nits as pointed out by Eric, and expand IMM operands on both Gen6 and Gen7. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs.cpp | 60 +++- src/mesa/drivers/dri/i965/brw_fs.h | 1 + 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 9ed9163..7d66115 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -942,6 +942,33 @@ fs_visitor::emit_frontfacing_interpolation(ir_variable *ir) return reg; } +fs_reg +fs_visitor::fix_math_operand(fs_reg src) +{ + /* Can't do hstride == 0 args on gen6 math, so expand it out. We +* might be able to do better by doing execsize = 1 math and then +* expanding that result out, but we would need to be careful with +* masking. +* +* The hardware ignores source modifiers (negate and abs) on math +* instructions, so we also move to a temp to set those up. +*/ + + if (intel-gen == 6 src.file != UNIFORM src.file != IMM !src.abs !src.negate) + return src; + + /* Gen7 relaxes most of the above restrictions, but still can't use IMM +* operands to math */ + + if (intel-gen = 7 src.file != IMM) + return src; + + fs_reg expanded = fs_reg(this, glsl_type::float_type); + expanded.type = src.type; + emit(BRW_OPCODE_MOV, expanded, src); + return expanded; +} + fs_inst * fs_visitor::emit_math(enum opcode opcode, fs_reg dst, fs_reg src) { @@ -967,13 +994,8 @@ fs_visitor::emit_math(enum opcode opcode, fs_reg dst, fs_reg src) * Gen 6 hardware ignores source modifiers (negate and abs) on math * instructions, so we also move to a temp to set those up. */ - if (intel-gen == 6 (src.file == UNIFORM || - src.abs || - src.negate)) { - fs_reg expanded = fs_reg(this, glsl_type::float_type); - emit(BRW_OPCODE_MOV, expanded, src); - src = expanded; - } + if (intel-gen = 6) + src = fix_math_operand(src); fs_inst *inst = emit(opcode, dst, src); @@ -1001,27 +1023,9 @@ fs_visitor::emit_math(enum opcode opcode, fs_reg dst, fs_reg src0, fs_reg src1) return NULL; } - if (intel-gen = 7) { - inst = emit(opcode, dst, src0, src1); - } else if (intel-gen == 6) { - /* Can't do hstride == 0 args to gen6 math, so expand it out. - * - * The hardware ignores source modifiers (negate and abs) on math - * instructions, so we also move to a temp to set those up. - */ - if (src0.file == UNIFORM || src0.abs || src0.negate) { -fs_reg expanded = fs_reg(this, glsl_type::float_type); -expanded.type = src0.type; -emit(BRW_OPCODE_MOV, expanded, src0); -src0 = expanded; - } - - if (src1.file == UNIFORM || src1.abs || src1.negate) { -fs_reg expanded = fs_reg(this, glsl_type::float_type); -expanded.type = src1.type; -emit(BRW_OPCODE_MOV, expanded, src1); -src1 = expanded; - } + if (intel-gen = 6) { + src0 = fix_math_operand(src0); + src1 = fix_math_operand(src1); inst = emit(opcode, dst, src0, src1); } else { diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 00ba334..07cace5 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -327,6 +327,7 @@ public: fs_reg shadow_comp, fs_reg lod, fs_reg lod2); fs_inst *emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate, fs_reg shadow_comp, fs_reg lod, fs_reg lod2); + fs_reg fix_math_operand(fs_reg src); fs_inst *emit_math(enum opcode op, fs_reg dst, fs_reg src0); fs_inst *emit_math(enum opcode op, fs_reg dst, fs_reg src0, fs_reg src1); void emit_minmax(uint32_t conditionalmod, fs_reg dst, -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V4 4/6] i965: fs: Add fixup for textureSize on Gen6/7
V2: Moved up into emit(ir_texture *) to avoid duplication and fix ordering for Gen7; Gen6 math quirks moved into previous patches. Tested on Gen6 only; passes all the cube_map_array piglits. V3: Fixed weird whitespace V4: Use sampler-type; otherwise broken on arrays of samplers. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index f1c6860..aa18b8d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -1351,6 +1351,18 @@ fs_visitor::visit(ir_texture *ir) if (ir-shadow_comparitor) inst-shadow_compare = true; + /* fixup #layers for cube map arrays */ + if (ir-op == ir_txs) { + glsl_type const *type = ir-sampler-type; + if (type-sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE +type-sampler_array) { + + fs_reg depth = dst; + depth.reg_offset = 2; + emit_math(SHADER_OPCODE_INT_QUOTIENT, depth, depth, fs_reg(6)); + } + } + swizzle_result(ir, dst, sampler); } -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V4 5/6] i965: expose ARB_texture_cube_map_array
V3: Put enable in an existing block rather than making a new one for no good reason. Signed-off-by: Chris Forbes chr...@ijw.co.nz Reviewed-by: Eric Anholt e...@anholt.net --- docs/GL3.txt | 2 +- src/mesa/drivers/dri/intel/intel_extensions.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index ba1b0d1..99c3194 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -96,7 +96,7 @@ GL_ARB_sample_shadingnot started GL_ARB_shader_subroutine not started GL_ARB_tessellation_shader not started GL_ARB_texture_buffer_object_rgb32 not started -GL_ARB_texture_cube_map_arrayDONE (softpipe) +GL_ARB_texture_cube_map_arrayDONE (i965, softpipe) GL_ARB_texture_gathernot started GL_ARB_transform_feedback2 DONE GL_ARB_transform_feedback3 DONE diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 96288ab..b297e6c 100755 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -106,6 +106,7 @@ intelInitExtensions(struct gl_context *ctx) ctx-Extensions.ARB_blend_func_extended = !driQueryOptionb(intel-optionCache, disable_blend_func_extended); ctx-Extensions.ARB_draw_buffers_blend = true; ctx-Extensions.ARB_uniform_buffer_object = true; + ctx-Extensions.ARB_texture_cube_map_array = true; if (ctx-API == API_OPENGL_CORE) { ctx-Extensions.ARB_texture_buffer_object = true; -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V4 6/6] mesa: expose ARB_texture_cube_map_array in core contexts as well
Signed-off-by: Chris Forbes chr...@ijw.co.nz Reviewed-by: Dave Airlie airl...@redhat.com Reviewed-by: Eric Anholt e...@anholt.net --- src/mesa/main/extensions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 5fbfe25..150d41e 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -129,7 +129,7 @@ static const struct extension extension_table[] = { { GL_ARB_texture_compression, o(dummy_true), GLL,2000 }, { GL_ARB_texture_compression_rgtc, o(ARB_texture_compression_rgtc),GL, 2004 }, { GL_ARB_texture_cube_map,o(ARB_texture_cube_map), GLL,1999 }, - { GL_ARB_texture_cube_map_array, o(ARB_texture_cube_map_array), GLL, 2009 }, + { GL_ARB_texture_cube_map_array, o(ARB_texture_cube_map_array), GL, 2009 }, { GL_ARB_texture_env_add, o(dummy_true), GLL,1999 }, { GL_ARB_texture_env_combine, o(ARB_texture_env_combine), GLL,2001 }, { GL_ARB_texture_env_crossbar, o(ARB_texture_env_crossbar),GLL,2001 }, -- 1.8.0.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 57903] New: [llvmpipe] piglit fbo-blending-formats regression
https://bugs.freedesktop.org/show_bug.cgi?id=57903 Priority: medium Bug ID: 57903 Keywords: regression CC: jfons...@vmware.com Assignee: mesa-dev@lists.freedesktop.org Summary: [llvmpipe] piglit fbo-blending-formats regression Severity: normal Classification: Unclassified OS: Linux (All) Reporter: v...@freedesktop.org Hardware: x86-64 (AMD64) Status: NEW Version: git Component: Other Product: Mesa mesa: a64c1eb9b110f29b8abf803a8256306702629bdc (master) Run piglit fbo-blending-formats on llvmpipe. $ ./bin/fbo-blending-formats -auto Using test set: Core formats Testing 3 Testing 4 Testing GL_RGB Testing GL_RGBA Testing GL_ALPHA Testing GL_LUMINANCE Testing GL_LUMINANCE_ALPHA Testing GL_INTENSITY Probe at (96,0) Expected: 0.81 0.00 0.00 1.00 Observed: 0.796078 0.00 0.00 1.00 when testing FBO result, blending with DST_ALPHA. Testing GL_ALPHA4 Testing GL_ALPHA8 Testing GL_ALPHA12 Testing GL_ALPHA16 Testing GL_LUMINANCE4 Testing GL_LUMINANCE8 Testing GL_LUMINANCE12 Testing GL_LUMINANCE16 Testing GL_LUMINANCE4_ALPHA4 Testing GL_LUMINANCE8_ALPHA8 Testing GL_LUMINANCE12_ALPHA12 Testing GL_LUMINANCE16_ALPHA16 Testing GL_INTENSITY4 Probe at (96,0) Expected: 0.81 0.00 0.00 1.00 Observed: 0.796078 0.00 0.00 1.00 when testing FBO result, blending with DST_ALPHA. Testing GL_INTENSITY8 Probe at (96,0) Expected: 0.81 0.00 0.00 1.00 Observed: 0.796078 0.00 0.00 1.00 when testing FBO result, blending with DST_ALPHA. Testing GL_INTENSITY12 Testing GL_INTENSITY16 Testing GL_R3_G3_B2 Testing GL_RGB4 Testing GL_RGB5 Testing GL_RGB8 Testing GL_RGB10 Testing GL_RGB12 Testing GL_RGB16 Testing GL_RGBA2 Testing GL_RGBA4 Testing GL_RGB5_A1 Testing GL_RGBA8 Testing GL_RGB10_A2 Testing GL_RGBA12 Testing GL_RGBA16 PIGLIT: {'result': 'fail' } 7d44d354bdba853e453ce3991396e2b0933468f4 is the first bad commit commit 7d44d354bdba853e453ce3991396e2b0933468f4 Author: José Fonseca jfons...@vmware.com Date: Tue Dec 4 13:38:52 2012 + gallivm: Generalize lp_build_mul and lp_build_lerp for signed normalized types. This fixes fdo bug 57755 and most of the failures of piglit fbo-blending-formats GL_EXT_texture_snorm. GL_INTENSITY_SNORM is still failing, but problem is probably elsewhere, as GL_R8_SNORM works fine. :04 04 2516938b50b01e57b07561c913ff734117d16f47 73b5d8f8beac889bfb7bf52a63fae84b2855b903 Msrc bisect run success -- 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