Re: [Mesa-dev] GL_ARB_debug_output from drivers
- Original Message - One of the features Valve asked for, that they expected after using other drivers, is that they can easily get information about performance traps (and other important stuff) from drivers. We wrote INTEL_DEBUG=perf this summer as a quick fix, but it's not how most drivers integrate this sort of feedback. Instead, you make a debug context, and you take a bit of a performance hit but you get GL_ARB_debug_output messages from the driver. I didn't want to just dump the same ID in every message, since that's definitely not what the spec intends you to do, so I'd been delaying the ARB_debug_output work until I could decide how to make that possible. This is what I came up with after a few false starts. I haven't fixed up the current messages to have unique IDs, though. I'd like to do something that doesn't involve spamming a static msg_id into each caller, but to avoid that I need a #define with varargs. Is __VA_ARGS__ or some equivalent standard enough that we can rely on it outside of drivers? I thought that __VA_ARGS__ didn't work on MSVC, but according to http://msdn.microsoft.com/en-us/library/ms177415.aspx it does. Actually galahad uses it on src/gallium/drivers/galahad/glhd_context.h so it must be working everywhere we care. Jose ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 61333] New: Gallium drivers no longer link with shared libglsl
https://bugs.freedesktop.org/show_bug.cgi?id=61333 Priority: medium Bug ID: 61333 Assignee: mesa-dev@lists.freedesktop.org Summary: Gallium drivers no longer link with shared libglsl Severity: minor Classification: Unclassified OS: Linux (All) Reporter: cur...@operamail.com Hardware: x86-64 (AMD64) Status: NEW Version: git Component: Other Product: Mesa In 8.0, gallium drivers linked with shared dricore and glsl. In 9.0 and master of today, they don't. This is causing every driver to be ~8mb bigger than in 8.0. -- 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 59187] [Steam] Implement GLSL 1.30 (for older chipsets than SandyBridge)
https://bugs.freedesktop.org/show_bug.cgi?id=59187 matthewjohnruss...@gmail.com changed: What|Removed |Added CC||matthewjohnruss...@gmail.co ||m -- 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 v2] vl: Fix off-by-one error in device_name_length allocation.
On Sam, 2013-02-23 at 05:37 +0100, Vinson Lee wrote: Fixes out-of-bounds write reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org Reviewed-by: Michel Dänzer mic...@daenzer.net -- 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
[Mesa-dev] [Bug 61333] Gallium drivers no longer link with shared libglsl
https://bugs.freedesktop.org/show_bug.cgi?id=61333 --- Comment #1 from Fabio Pedretti fabio@libero.it --- See: https://bugs.launchpad.net/ubuntu/precise/+source/mesa-lts-quantal/+bug/1117417 http://anonscm.debian.org/gitweb/?p=pkg-xorg/lib/mesa.git;a=tree;f=debian/patches;hb=refs/heads/ubuntu -- 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 4/4] r600g: enable CP DMA on r6xx (v2)
For the series: Reviewed-by: Marek Olšák mar...@gmail.com Marek On Fri, Feb 22, 2013 at 8:38 PM, alexdeuc...@gmail.com wrote: From: Alex Deucher alexander.deuc...@amd.com With the previous flushing changes this seems to work reliably now. v2: add R600_CONTEXT_FLUSH_AND_INV Signed-off-by: Alex Deucher alexander.deuc...@amd.com --- src/gallium/drivers/r600/r600_blit.c |3 +-- src/gallium/drivers/r600/r600_hw_context.c |9 ++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index 046eab5..019b456 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -508,8 +508,7 @@ void r600_copy_buffer(struct pipe_context *ctx, struct pipe_resource *dst, unsig { struct r600_context *rctx = (struct r600_context*)ctx; - /* CP DMA doesn't work on R600 (flushing seems to be unreliable). */ - if (rctx-screen-info.drm_minor = 27 rctx-chip_class = R700) { + if (rctx-screen-info.drm_minor = 27) { r600_cp_dma_copy_buffer(rctx, dst, dstx, src, src_box-x, src_box-width); } else if (rctx-screen-has_streamout diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index 735fdf2..1736414 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -1115,12 +1115,6 @@ void r600_cp_dma_copy_buffer(struct r600_context *rctx, struct radeon_winsys_cs *cs = rctx-rings.gfx.cs; assert(size); - assert(rctx-chip_class != R600); - - /* CP DMA doesn't work on R600 (flushing seems to be unreliable). */ - if (rctx-chip_class == R600) { - return; - } dst_offset += r600_resource_va(rctx-screen-screen, dst); src_offset += r600_resource_va(rctx-screen-screen, src); @@ -1174,7 +1168,8 @@ void r600_cp_dma_copy_buffer(struct r600_context *rctx, } /* Invalidate the read caches. */ - rctx-flags |= R600_CONTEXT_INVAL_READ_CACHES; + rctx-flags |= R600_CONTEXT_INVAL_READ_CACHES | + R600_CONTEXT_FLUSH_AND_INV; } void r600_need_dma_space(struct r600_context *ctx, unsigned num_dw) -- 1.7.7.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] util/dump: Use static assertion to detect string table size mismatches.
From: José Fonseca jose.r.fons...@gmail.com Suggested by Brian Paul. Could probably be extended to other enums. --- src/gallium/auxiliary/util/u_dump_defines.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_dump_defines.c b/src/gallium/auxiliary/util/u_dump_defines.c index 2a996b2..cc62687 100644 --- a/src/gallium/auxiliary/util/u_dump_defines.c +++ b/src/gallium/auxiliary/util/u_dump_defines.c @@ -73,6 +73,23 @@ util_dump_enum_continuous(unsigned value, } +/** + * Same as DEFINE_UTIL_DUMP_CONTINUOUS but with static assertions to detect + * failures to update lists. + */ +#define DEFINE_UTIL_DUMP_CONTINUOUS_COUNT(_name, _count) \ + const char * \ + util_dump_##_name(unsigned value, boolean shortened) \ + { \ + STATIC_ASSERT(Elements(util_dump_##_name##_names) == _count); \ + STATIC_ASSERT(Elements(util_dump_##_name##_short_names) == _count); \ + if(shortened) \ + return util_dump_enum_continuous(value, Elements(util_dump_##_name##_short_names), util_dump_##_name##_short_names); \ + else \ + return util_dump_enum_continuous(value, Elements(util_dump_##_name##_names), util_dump_##_name##_names); \ + } + + static const char * util_dump_blend_factor_names[] = { UTIL_DUMP_INVALID_NAME, /* 0x0 */ @@ -282,7 +299,7 @@ util_dump_tex_target_short_names[] = { cube_array, }; -DEFINE_UTIL_DUMP_CONTINUOUS(tex_target) +DEFINE_UTIL_DUMP_CONTINUOUS_COUNT(tex_target, PIPE_MAX_TEXTURE_TYPES) static const char * -- 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 6/6] r600g: enable CP DMA on r6xx (v3)
For the series: Reviewed-by: Marek Olšák mar...@gmail.com Marek On Fri, Feb 22, 2013 at 11:59 PM, alexdeuc...@gmail.com wrote: From: Alex Deucher alexander.deuc...@amd.com With the previous flushing changes this seems to work reliably now. v2: add R600_CONTEXT_FLUSH_AND_INV v3: just enable CP DMA Signed-off-by: Alex Deucher alexander.deuc...@amd.com --- src/gallium/drivers/r600/r600_blit.c |3 +-- src/gallium/drivers/r600/r600_hw_context.c |6 -- 2 files changed, 1 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index 046eab5..019b456 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -508,8 +508,7 @@ void r600_copy_buffer(struct pipe_context *ctx, struct pipe_resource *dst, unsig { struct r600_context *rctx = (struct r600_context*)ctx; - /* CP DMA doesn't work on R600 (flushing seems to be unreliable). */ - if (rctx-screen-info.drm_minor = 27 rctx-chip_class = R700) { + if (rctx-screen-info.drm_minor = 27) { r600_cp_dma_copy_buffer(rctx, dst, dstx, src, src_box-x, src_box-width); } else if (rctx-screen-has_streamout diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index 8c92030..0537916 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -1108,12 +1108,6 @@ void r600_cp_dma_copy_buffer(struct r600_context *rctx, struct radeon_winsys_cs *cs = rctx-rings.gfx.cs; assert(size); - assert(rctx-chip_class != R600); - - /* CP DMA doesn't work on R600 (flushing seems to be unreliable). */ - if (rctx-chip_class == R600) { - return; - } dst_offset += r600_resource_va(rctx-screen-screen, dst); src_offset += r600_resource_va(rctx-screen-screen, src); -- 1.7.7.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
Re: [Mesa-dev] [PATCH] util/dump: Use static assertion to detect string table size mismatches.
On 02/23/2013 03:51 AM, jfons...@vmware.com wrote: From: José Fonsecajose.r.fons...@gmail.com Suggested by Brian Paul. Could probably be extended to other enums. --- src/gallium/auxiliary/util/u_dump_defines.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_dump_defines.c b/src/gallium/auxiliary/util/u_dump_defines.c index 2a996b2..cc62687 100644 --- a/src/gallium/auxiliary/util/u_dump_defines.c +++ b/src/gallium/auxiliary/util/u_dump_defines.c @@ -73,6 +73,23 @@ util_dump_enum_continuous(unsigned value, } +/** + * Same as DEFINE_UTIL_DUMP_CONTINUOUS but with static assertions to detect + * failures to update lists. + */ +#define DEFINE_UTIL_DUMP_CONTINUOUS_COUNT(_name, _count) \ + const char * \ + util_dump_##_name(unsigned value, boolean shortened) \ + { \ + STATIC_ASSERT(Elements(util_dump_##_name##_names) == _count); \ + STATIC_ASSERT(Elements(util_dump_##_name##_short_names) == _count); \ + if(shortened) \ + return util_dump_enum_continuous(value, Elements(util_dump_##_name##_short_names), util_dump_##_name##_short_names); \ + else \ + return util_dump_enum_continuous(value, Elements(util_dump_##_name##_names), util_dump_##_name##_names); \ + } + + static const char * util_dump_blend_factor_names[] = { UTIL_DUMP_INVALID_NAME, /* 0x0 */ @@ -282,7 +299,7 @@ util_dump_tex_target_short_names[] = { cube_array, }; -DEFINE_UTIL_DUMP_CONTINUOUS(tex_target) +DEFINE_UTIL_DUMP_CONTINUOUS_COUNT(tex_target, PIPE_MAX_TEXTURE_TYPES) static const char * 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] [PATCH] util/u_blitter: Set pipe_sampler_state::normalized_coords correctly.
From: José Fonseca jfons...@vmware.com We might want to revisit the normalized_coords semantics, but this is the current expected behavior. Fixes fdo bug 61091. --- src/gallium/auxiliary/util/u_blitter.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 9522402..e37be4e 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -103,7 +103,10 @@ struct blitter_context_priv void *velem_state_readbuf; /* Sampler state. */ - void *sampler_state, *sampler_state_linear; + void *sampler_state; + void *sampler_state_linear; + void *sampler_state_rect; + void *sampler_state_rect_linear; /* Rasterizer state. */ void *rs_state, *rs_state_scissor, *rs_discard_state; @@ -223,10 +226,15 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) sampler_state.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; sampler_state.normalized_coords = 1; ctx-sampler_state = pipe-create_sampler_state(pipe, sampler_state); + sampler_state.normalized_coords = 0; + ctx-sampler_state_rect = pipe-create_sampler_state(pipe, sampler_state); sampler_state.min_img_filter = PIPE_TEX_FILTER_LINEAR; sampler_state.mag_img_filter = PIPE_TEX_FILTER_LINEAR; + sampler_state.normalized_coords = 1; ctx-sampler_state_linear = pipe-create_sampler_state(pipe, sampler_state); + sampler_state.normalized_coords = 0; + ctx-sampler_state_rect_linear = pipe-create_sampler_state(pipe, sampler_state); /* rasterizer state */ memset(rs_state, 0, sizeof(rs_state)); @@ -365,8 +373,10 @@ void util_blitter_destroy(struct blitter_context *blitter) ctx-delete_fs_state(pipe, ctx-fs_col_int[i]); } - pipe-delete_sampler_state(pipe, ctx-sampler_state); + pipe-delete_sampler_state(pipe, ctx-sampler_state_rect_linear); + pipe-delete_sampler_state(pipe, ctx-sampler_state_rect); pipe-delete_sampler_state(pipe, ctx-sampler_state_linear); + pipe-delete_sampler_state(pipe, ctx-sampler_state); u_upload_destroy(ctx-upload); FREE(ctx); } @@ -1317,9 +1327,17 @@ void util_blitter_blit_generic(struct blitter_context *blitter, src_samples = 1 (dstbox-width != abs(srcbox-width) || dstbox-height != abs(srcbox-height))) { - sampler_state = ctx-sampler_state_linear; + if (src_target == PIPE_TEXTURE_RECT) { + sampler_state = ctx-sampler_state_rect_linear; + } else { + sampler_state = ctx-sampler_state_linear; + } } else { - sampler_state = ctx-sampler_state; + if (src_target == PIPE_TEXTURE_RECT) { + sampler_state = ctx-sampler_state_rect; + } else { + sampler_state = ctx-sampler_state; + } } /* Set samplers. */ -- 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/9] st/mesa: remove #include mfeatures.h
None of these were needed. --- src/mesa/state_tracker/st_cb_bitmap.c |1 - src/mesa/state_tracker/st_cb_bitmap.h |1 - src/mesa/state_tracker/st_cb_blit.c |1 - src/mesa/state_tracker/st_cb_blit.h |1 - src/mesa/state_tracker/st_cb_drawpixels.c |1 - src/mesa/state_tracker/st_cb_drawpixels.h |1 - src/mesa/state_tracker/st_cb_drawtex.c|1 - src/mesa/state_tracker/st_cb_drawtex.h|1 - src/mesa/state_tracker/st_cb_eglimage.c |1 - src/mesa/state_tracker/st_cb_eglimage.h |1 - src/mesa/state_tracker/st_cb_fbo.c|1 - src/mesa/state_tracker/st_cb_feedback.c |1 - src/mesa/state_tracker/st_cb_feedback.h |1 - src/mesa/state_tracker/st_cb_queryobj.c |1 - src/mesa/state_tracker/st_cb_queryobj.h |1 - src/mesa/state_tracker/st_cb_rasterpos.c |1 - src/mesa/state_tracker/st_cb_rasterpos.h |1 - src/mesa/state_tracker/st_cb_texture.c|1 - src/mesa/state_tracker/st_cb_xformfb.c|1 - src/mesa/state_tracker/st_cb_xformfb.h|1 - src/mesa/state_tracker/st_draw.c |1 - src/mesa/state_tracker/st_extensions.c|1 - src/mesa/state_tracker/st_format.c|1 - src/mesa/state_tracker/st_program.c |1 - 24 files changed, 0 insertions(+), 24 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 36fffe9..4d36f4e 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -34,7 +34,6 @@ #include main/image.h #include main/bufferobj.h #include main/macros.h -#include main/mfeatures.h #include main/pbo.h #include program/program.h #include program/prog_print.h diff --git a/src/mesa/state_tracker/st_cb_bitmap.h b/src/mesa/state_tracker/st_cb_bitmap.h index d1c1805..cc9f5f5 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.h +++ b/src/mesa/state_tracker/st_cb_bitmap.h @@ -31,7 +31,6 @@ #include main/compiler.h -#include main/mfeatures.h struct dd_function_table; struct st_context; diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index c463e3b..01a45d6 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -33,7 +33,6 @@ #include main/imports.h #include main/image.h #include main/macros.h -#include main/mfeatures.h #include st_context.h #include st_texture.h diff --git a/src/mesa/state_tracker/st_cb_blit.h b/src/mesa/state_tracker/st_cb_blit.h index 159c6ca..9e94e44 100644 --- a/src/mesa/state_tracker/st_cb_blit.h +++ b/src/mesa/state_tracker/st_cb_blit.h @@ -30,7 +30,6 @@ #include main/compiler.h -#include main/mfeatures.h struct dd_function_table; struct st_context; diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index e282bf9..da4b4ba 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -35,7 +35,6 @@ #include main/bufferobj.h #include main/format_pack.h #include main/macros.h -#include main/mfeatures.h #include main/mtypes.h #include main/pack.h #include main/pbo.h diff --git a/src/mesa/state_tracker/st_cb_drawpixels.h b/src/mesa/state_tracker/st_cb_drawpixels.h index 6209dca..6cd6a4e 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.h +++ b/src/mesa/state_tracker/st_cb_drawpixels.h @@ -31,7 +31,6 @@ #include main/compiler.h -#include main/mfeatures.h struct dd_function_table; struct st_context; diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c index 5ca0970..58657ff 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.c +++ b/src/mesa/state_tracker/st_cb_drawtex.c @@ -15,7 +15,6 @@ #include main/imports.h #include main/image.h #include main/macros.h -#include main/mfeatures.h #include program/program.h #include program/prog_print.h diff --git a/src/mesa/state_tracker/st_cb_drawtex.h b/src/mesa/state_tracker/st_cb_drawtex.h index ccb615e..9794ccc 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.h +++ b/src/mesa/state_tracker/st_cb_drawtex.h @@ -11,7 +11,6 @@ #include main/compiler.h -#include main/mfeatures.h struct dd_function_table; struct st_context; diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c index 8c78e5e..b162870 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.c +++ b/src/mesa/state_tracker/st_cb_eglimage.c @@ -26,7 +26,6 @@ *Chia-I Wu o...@lunarg.com */ -#include main/mfeatures.h #include main/texobj.h #include main/teximage.h #include util/u_inlines.h diff --git a/src/mesa/state_tracker/st_cb_eglimage.h b/src/mesa/state_tracker/st_cb_eglimage.h index 1750b91..c6ddec6 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.h +++ b/src/mesa/state_tracker/st_cb_eglimage.h @@ -30,7 +30,6 @@ #define ST_CB_EGLIMAGE_H #include main/compiler.h -#include main/mfeatures.h struct dd_function_table; diff
[Mesa-dev] [PATCH 2/9] mesa: remove #ifdef FEATURE_ES2, add some comments instead
--- src/mesa/main/shaderapi.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index be69467..8b160bc 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1451,8 +1451,10 @@ _mesa_ValidateProgram(GLhandleARB program) validate_program(ctx, program); } -#ifdef FEATURE_ES2 +/** + * For OpenGL ES 2.0, GL_ARB_ES2_compatibility + */ void GLAPIENTRY _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) @@ -1505,6 +1507,9 @@ _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, } +/** + * For OpenGL ES 2.0, GL_ARB_ES2_compatibility + */ void GLAPIENTRY _mesa_ReleaseShaderCompiler(void) { @@ -1512,6 +1517,9 @@ _mesa_ReleaseShaderCompiler(void) } +/** + * For OpenGL ES 2.0, GL_ARB_ES2_compatibility + */ void GLAPIENTRY _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length) @@ -1525,7 +1533,6 @@ _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__); } -#endif /* FEATURE_ES2 */ void GLAPIENTRY _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/9] mesa: remove old comment about FEATURE_GL
--- src/mesa/main/get.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index da1e01c..524418e 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -394,8 +394,7 @@ extra_NV_read_buffer_api_gl[] = { * remaining combinations. To look up the enums valid in a given API * we will use a hash table specific to that API. These tables are in * turn generated at build time and included through get_hash.h. - * The different sections are guarded by #if FEATURE_GL etc to make - * sure we only compile in the enums we may need. */ + */ #include get_hash.h -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 6/9] mesa: remove FEATURE_remap_table from remap.[ch]
It was always defined. --- src/mesa/main/remap.c |6 -- src/mesa/main/remap.h | 34 -- 2 files changed, 0 insertions(+), 40 deletions(-) diff --git a/src/mesa/main/remap.c b/src/mesa/main/remap.c index a098705..bc4ac9b 100644 --- a/src/mesa/main/remap.c +++ b/src/mesa/main/remap.c @@ -37,9 +37,6 @@ */ #include mfeatures.h - -#if FEATURE_remap_table - #include remap.h #include imports.h #include glapi/glapi.h @@ -223,6 +220,3 @@ _mesa_init_remap_table(void) driDispatchRemapTable_size, MESA_remap_table_functions); } - - -#endif /* FEATURE_remap_table */ diff --git a/src/mesa/main/remap.h b/src/mesa/main/remap.h index fa31724..6f20c3e 100644 --- a/src/mesa/main/remap.h +++ b/src/mesa/main/remap.h @@ -42,8 +42,6 @@ struct gl_function_remap { }; -#if FEATURE_remap_table - extern int driDispatchRemapTable[]; @@ -62,37 +60,5 @@ _mesa_map_static_functions(void); extern void _mesa_init_remap_table(void); -#else /* FEATURE_remap_table */ - -static inline const char * -_mesa_get_function_spec(int func_index) -{ - return NULL; -} - -static inline int -_mesa_map_function_spec(const char *spec) -{ - return -1; -} - -static inline void -_mesa_map_function_array(const struct gl_function_remap *func_array) -{ -} - -static inline void -_mesa_map_static_functions(void) -{ -} - - -static inline void -_mesa_init_remap_table(void) -{ -} - -#endif /* FEATURE_remap_table */ - #endif /* REMAP_H */ -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 0/9] remove mfeatures.h file
This series removes the dependencies on the mfeatures.h file and the file itself. I'd appreciated someone doing a test build of this series to double-check my work. The last thing left to do is remove the -DFEATURE_GL/ES1/ES2 stuff from the autoconf and scons files. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] llvmpipe: Fix creation of shared and scanout textures.
I'd still like to have this applied. On Tue, Dec 18, 2012 at 3:16 PM, John Kåre Alsaker john.kare.alsa...@gmail.com wrote: On Tue, Dec 18, 2012 at 11:20 AM, Jose Fonseca jfons...@vmware.com wrote: Looks fine. I'm curious, what does this fix in practice? It fixes Weston crashing when running with llvmpipe. Jose - Original Message - NOTE: This is a candidate for the stable branches. --- src/gallium/drivers/llvmpipe/lp_texture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 2e9c6bf..f17a04a 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -295,7 +295,9 @@ llvmpipe_resource_create(struct pipe_screen *_screen, /* assert(lpr-base.bind); */ if (resource_is_texture(lpr-base)) { - if (lpr-base.bind PIPE_BIND_DISPLAY_TARGET) { + if (lpr-base.bind (PIPE_BIND_DISPLAY_TARGET | +PIPE_BIND_SCANOUT | +PIPE_BIND_SHARED)) { /* displayable surface */ if (!llvmpipe_displaytarget_layout(screen, lpr)) goto fail; -- 1.8.0.2 ___ 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/3] dri: Add another duplicateImage to DRIimageExtension which allows you to create a sRGB view of a DRI image
duplicateImage will allow you to create a linear or sRGB view into a DRIimage you have access to. This is useful because compositors may want a specific view which doesn't correspond to the one used by applications. --- include/GL/internal/dri_interface.h | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 42147e9..f4948a8 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -938,7 +938,7 @@ struct __DRIdri2ExtensionRec { * extensions. */ #define __DRI_IMAGE DRI_IMAGE -#define __DRI_IMAGE_VERSION 6 +#define __DRI_IMAGE_VERSION 7 /** * These formats correspond to the similarly named MESA_FORMAT_* @@ -1009,6 +1009,15 @@ struct __DRIdri2ExtensionRec { #define __DRI_IMAGE_COMPONENTS_Y_UV0x3004 #define __DRI_IMAGE_COMPONENTS_Y_XUXV 0x3005 +/** + * Flags for duplicateImage. + * + * \since 7 + */ + +#define __DRI_IMAGE_FLAG_SRGB_VIEW 0x0001 +#define __DRI_IMAGE_FLAG_LINEAR_VIEW 0x0002 + /** * queryImage attributes @@ -1105,6 +1114,7 @@ struct __DRIimageExtensionRec { __DRIimage *(*fromPlanar)(__DRIimage *image, int plane, void *loaderPrivate); + /** * Create image from texture. * @@ -1117,6 +1127,15 @@ struct __DRIimageExtensionRec { int level, unsigned *error, void *loaderPrivate); + + /** +* The new __DRIimage will share the raw content with the old one, +* but it might have a different format. +* +* \since 7 +*/ +__DRIimage *(*duplicateImage)(__DRIscreen *screen, __DRIimage *image, + unsigned int flags, void *loaderPrivate); }; -- 1.8.1.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/3] gallium: Implement DRIimageExtension.duplicateImage
--- src/gallium/include/state_tracker/st_api.h | 1 + src/gallium/state_trackers/dri/common/dri_screen.c | 1 + src/gallium/state_trackers/dri/common/dri_screen.h | 1 + src/gallium/state_trackers/dri/drm/dri2.c | 39 +- src/mesa/state_tracker/st_manager.c| 4 +++ 5 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 9f3d2a1..1e63ed3 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -203,6 +203,7 @@ struct st_egl_image { /* this is owned by the caller */ struct pipe_resource *texture; + enum pipe_format format; unsigned level; unsigned layer; diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index a908e28..92abaf9 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -315,6 +315,7 @@ dri_get_egl_image(struct st_manager *smapi, stimg-texture = NULL; pipe_resource_reference(stimg-texture, img-texture); + stimg-format = img-format; stimg-level = img-level; stimg-layer = img-layer; diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/common/dri_screen.h index 181b22f..d37c393 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.h +++ b/src/gallium/state_trackers/dri/common/dri_screen.h @@ -84,6 +84,7 @@ dri_screen(__DRIscreen * sPriv) struct __DRIimageRec { struct pipe_resource *texture; + enum pipe_format format; unsigned level; unsigned layer; uint32_t dri_format; diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index f8d311c..54339fe 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -658,6 +658,7 @@ dri2_dup_image(__DRIimage *image, void *loaderPrivate) pipe_resource_reference(img-texture, image-texture); img-level = image-level; img-layer = image-layer; + img-format = image-format; /* This should be 0 for sub images, but dup is also used for base images. */ img-dri_components = image-dri_components; img-loader_private = loaderPrivate; @@ -749,6 +750,40 @@ dri2_from_planar(__DRIimage *image, int plane, void *loaderPrivate) return img; } +static __DRIimage * +dri2_duplicate_image(__DRIscreen *_screen, __DRIimage *image, + unsigned int flags, void *loaderPrivate) +{ + enum pipe_format format; + struct dri_screen *screen = dri_screen(_screen); + __DRIimage *img = NULL; + + if((flags __DRI_IMAGE_FLAG_SRGB_VIEW) (flags __DRI_IMAGE_FLAG_LINEAR_VIEW)) + return NULL; + + if(flags (__DRI_IMAGE_FLAG_SRGB_VIEW | __DRI_IMAGE_FLAG_LINEAR_VIEW)) { + if(!image-texture) + return NULL; + + if(flags __DRI_IMAGE_FLAG_SRGB_VIEW) + format = util_format_srgb(image-texture-format); + else + format = util_format_linear(image-texture-format); + + if(!screen-base.screen-is_format_supported(screen-base.screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW)) + return NULL; + + img = dri2_dup_image(image, loaderPrivate); + + if (img) + img-format = format; + } else if (flags == 0) { + img = dri2_dup_image(image, loaderPrivate); + } + + return img; +} + static void dri2_destroy_image(__DRIimage *img) { @@ -757,7 +792,7 @@ dri2_destroy_image(__DRIimage *img) } static struct __DRIimageExtensionRec dri2ImageExtension = { -{ __DRI_IMAGE, 5 }, +{ __DRI_IMAGE, 7 }, dri2_create_image_from_name, dri2_create_image_from_renderbuffer, dri2_destroy_image, @@ -767,6 +802,8 @@ static struct __DRIimageExtensionRec dri2ImageExtension = { dri2_validate_usage, dri2_from_names, dri2_from_planar, +NULL, +dri2_duplicate_image, }; /* diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index a3a6771..3659499 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -810,6 +810,10 @@ st_manager_get_egl_image_surface(struct st_context *st, void *eglimg) return NULL; u_surface_default_template(surf_tmpl, stimg.texture); + + if(stimg.format != PIPE_FORMAT_NONE) + surf_tmpl.format = stimg.format; + surf_tmpl.u.tex.level = stimg.level; surf_tmpl.u.tex.first_layer = stimg.layer; surf_tmpl.u.tex.last_layer = stimg.layer; -- 1.8.1.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] egl: Add MESA_image_sRGB extension.
This gives applications access to use DRIimage.duplicateImage to create sRGB and linear views from EGL images. --- docs/MESA_image_sRGB.spec | 132 include/EGL/eglmesaext.h| 7 ++ src/egl/drivers/dri2/egl_dri2.c | 115 +++- src/egl/drivers/dri2/egl_dri2.h | 2 +- src/egl/drivers/dri2/platform_android.c | 19 - src/egl/drivers/dri2/platform_drm.c | 18 - src/egl/drivers/dri2/platform_x11.c | 18 - src/egl/main/eglcurrent.c | 5 ++ src/egl/main/egldisplay.h | 1 + src/egl/main/eglimage.c | 6 ++ src/egl/main/eglimage.h | 3 + src/egl/main/eglmisc.c | 1 + 12 files changed, 281 insertions(+), 46 deletions(-) create mode 100644 docs/MESA_image_sRGB.spec diff --git a/docs/MESA_image_sRGB.spec b/docs/MESA_image_sRGB.spec new file mode 100644 index 000..f8a0bea --- /dev/null +++ b/docs/MESA_image_sRGB.spec @@ -0,0 +1,132 @@ +Name + +MESA_image_sRGB + +Name Strings + +EGL_MESA_image_sRGB + +Contact + +John Kåre Alsaker john.kare.alsa...@gmail.com + +Status + +Complete + +Version + +Version 2, February 23, 2013 + +Number + +EGL Extension #not assigned + +Dependencies + +EGL 1.2 or later is required. + +EGL_KHR_image_base is required. + +This extension is written against the wording of the EGL 1.2 +specification. + +Overview + +This extension provides a way for applications to allocate sRGB +or linear gamma views for EGLImage sources. This means that +sampling from the resulting EGLImage should convert from sRGB's +gamma into linear gamma. + +IP Status + +Open-source; freely implementable. + +New Tokens + +Accepted in the attrib_list parameter of eglCreateImageKHR: + +EGL_GAMMA_MESA 0x3290 + +Accepted as values for the EGL_GAMMA_MESA attribute: + +EGL_DEFAULT_MESA 0x3291 + +Error states: + +EGL_BAD_VIEW_MESA 0x3292 + +Additions to the EGL 1.2 Specification: + +Add to section 2.5.1 EGLImage Specification (as defined by the +EGL_KHR_image_base specification), in the description of +eglCreateImageKHR: + + Attributes names accepted in attrib_list are shown in Table bbb + + ++-+--+ + | Attribute | Description | Default Value| + ++-+--+ + | EGL_GAMMA_MESA | Specifies the gamma | EGL_DEFAULT_MESA | + || view of the | | + || EGLImage created. | | + ++-+--+ + Table bbb. Legal attributes for eglCreateImageKHR + attrib_list parameter + +... + +If the value of attribute EGL_GAMMA_MESA is EGL_DEFAULT_MESA (the +default), then the gamma view of the resulting EGLImage will be +the same as the EGLImage source. + +If the value of attribute EGL_GAMMA_MESA is EGL_COLORSPACE_LINEAR, +then the gamma view of the resulting EGLImage will be linear +and no gamma conversions will be done when sampling the image +in client APIs. + +If the value of attribute EGL_GAMMA_MESA is EGL_COLORSPACE_sRGB, +then the gamma view of the resulting EGLImage will be an sRGB +view and the red, green and blue color components will be +converted from sRGB gamma to linear gamma when sampling the image +in client APIs. This conversion should ideally take place before +any filtering, but that is not required. The conversion from an +sRGB gamma component, cs, to a linear gamma component, cl, is as +follows. + +{ cs / 12.92, cs = 0.04045 + cl = { +{ ((cs + 0.055)/1.055)^2.4, cs 0.04045 + +Assume cs is the sRGB gamma component in the range [0,1]. + +Add to the list of error conditions for eglCreateImageKHR: + + * If the value specified in attrib_list for EGL_GAMMA_MESA + is not EGL_DEFAULT_MESA, and the implementation does not + support creating the specified gamma view, the error + EGL_BAD_VIEW_MESA is generated. + + * If the value specified in attrib_list for EGL_GAMMA_MESA + is EGL_COLORSPACE_sRGB, and the EGLImage source does not have + red, green and blue color components, the error + EGL_BAD_VIEW_MESA is generated. + +Issues + +1) Should creating multiple EGLImages from the same source +with a different gamma view be allowed? + +RESOLVED: Yes. + +This is so applications can easily switch between using +an sRGB and a linear gamma view for a single EGLImage +source. + +Revision History + +Version 2, February 23, 2013 +
[Mesa-dev] [Bug 61361] New: Version mismatch error. This is libtool 2.4.2, but the definition of this LT_INIT comes from libtool 2.2.8.
https://bugs.freedesktop.org/show_bug.cgi?id=61361 Priority: medium Bug ID: 61361 Assignee: mesa-dev@lists.freedesktop.org Summary: Version mismatch error. This is libtool 2.4.2, but the definition of this LT_INIT comes from libtool 2.2.8. Severity: blocker Classification: Unclassified OS: Linux (All) Reporter: dh-b...@online.de Hardware: x86 (IA32) Status: NEW Version: unspecified Component: Other Product: Mesa This happens since 9.0.1 make[3]: Entering directory `(...)/Mesa-9.1/src/mapi/shared-glapi' CC entry.lo libtool: Version mismatch error. This is libtool 2.4.2, but the libtool: definition of this LT_INIT comes from libtool 2.2.8. libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 libtool: and run autoconf again. make[3]: *** [entry.lo] error 63 -- 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 61364] New: LLVM assertion when starting X11
https://bugs.freedesktop.org/show_bug.cgi?id=61364 Priority: medium Bug ID: 61364 Assignee: mesa-dev@lists.freedesktop.org Summary: LLVM assertion when starting X11 Severity: major Classification: Unclassified OS: Linux (All) Reporter: john.kare.alsa...@gmail.com Hardware: x86-64 (AMD64) Status: NEW Version: git Component: Other Product: Mesa Created attachment 75418 -- https://bugs.freedesktop.org/attachment.cgi?id=75418action=edit LLVM Assertion I get an LLVM assertion when running startx in VMware. This applies to git (I tried commit 7ae6864f0dbec33270c83c4181a8182139662d0f) and Arch Linux's 9.1 packages. -- 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 04/14] mesa: Fix _mesa_problem() on context destroy after application debug output
On Fri, Feb 22, 2013 at 7:52 PM, Eric Anholt e...@anholt.net wrote: This was apparently not noticed because we don't have any testing of application-generated debug output. However, as I'm changing the GL-generated debug output to use the same path as application/middleware-generated debug output, this obviously became an issue. --- src/mesa/main/errors.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 3714067..6adc466 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -756,6 +756,11 @@ _mesa_init_errors(struct gl_context *ctx) } } +static void +do_nothing(GLuint key, void *data, void *userData) +{ +} + void _mesa_free_errors_data(struct gl_context *ctx) { @@ -765,6 +770,7 @@ _mesa_free_errors_data(struct gl_context *ctx) /* Tear down state for filtering client-provided debug messages. */ for (s = 0; s SOURCE_COUNT; s++) for (t = 0; t MESA_DEBUG_TYPE_COUNT; t++) { + _mesa_HashDeleteAll(ClientIDs-Namespaces[s][t].IDs, do_nothing, NULL); Maybe _mesa_HashDeleteAll should accept a NULL callback routine? -Jordan ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] llvmpipe: Fix creation of shared and scanout textures.
Pushed now. - Original Message - I'd still like to have this applied. On Tue, Dec 18, 2012 at 3:16 PM, John Kåre Alsaker john.kare.alsa...@gmail.com wrote: On Tue, Dec 18, 2012 at 11:20 AM, Jose Fonseca jfons...@vmware.com wrote: Looks fine. I'm curious, what does this fix in practice? It fixes Weston crashing when running with llvmpipe. Jose - Original Message - NOTE: This is a candidate for the stable branches. --- src/gallium/drivers/llvmpipe/lp_texture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 2e9c6bf..f17a04a 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -295,7 +295,9 @@ llvmpipe_resource_create(struct pipe_screen *_screen, /* assert(lpr-base.bind); */ if (resource_is_texture(lpr-base)) { - if (lpr-base.bind PIPE_BIND_DISPLAY_TARGET) { + if (lpr-base.bind (PIPE_BIND_DISPLAY_TARGET | +PIPE_BIND_SCANOUT | +PIPE_BIND_SHARED)) { /* displayable surface */ if (!llvmpipe_displaytarget_layout(screen, lpr)) goto fail; -- 1.8.0.2 ___ 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 03/14] mesa: Move debug type/severity enums to mesa core.
On Fri, Feb 22, 2013 at 7:52 PM, Eric Anholt e...@anholt.net wrote: +static enum mesa_debug_type +gl_enum_to_debug_type(GLenum e) +{ + int i; + + for (i = 0; i Elements(debug_type_enums); i++) { I guess we have both Elements and ARRAY_SIZE. Should we try to merge these? Elements appears to be used more, but doesn't ARRAY_SIZE follow the coding style better? -Jordan ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 61366] New: oprofilejit should be included in the list of LLVM components required
https://bugs.freedesktop.org/show_bug.cgi?id=61366 Priority: medium Bug ID: 61366 Assignee: mesa-dev@lists.freedesktop.org Summary: oprofilejit should be included in the list of LLVM components required Severity: minor Classification: Unclassified OS: Linux (All) Reporter: ats...@offog.org Hardware: x86-64 (AMD64) Status: NEW Version: 9.0 Component: Other Product: Mesa Created attachment 75423 -- https://bugs.freedesktop.org/attachment.cgi?id=75423action=edit My patch I'm using Mesa 9.0.3 on Linux, built with automake. llvmpipe uses llvm::JITEventListener::createOProfileJITEventListener if LLVM was compiled with OProfile support, so it needs to link with libLLVMOProfileJIT -- i.e. include oprofilejit in the list of LLVM components required in configure.ac, if it exists. There's already a similar test for mcjit; duplicating this for oprofilejit works for me. Patch to this effect attached, but you may prefer a different fix. Without this, I get the following link error: gmake[5]: Entering directory `/src/x11/mesa/work/Mesa-9.0.3/src/gallium/drivers/llvmpipe' g++ -Wl,-O2 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed -L/gar/packages/llvm-3.2/lib -lbfd -lpthread -ldl -lm -lopagent -L/gar/lib/oprofile -Wl,-rpath,/gar/lib/oprofile lp_test_format.o lp_test_main.o -o lp_test_format -Wl,--start-group -L../../auxiliary/ -lgallium libllvmpipe.a -lLLVMMCJIT -lLLVMBitWriter -lLLVMX86Disassembler -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86AsmParser -lLLVMMCParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -L/gar/lib -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb-glx -lxcb -lXxf86vm -L/gar/lib -ldrm -lm -lpthread -ldl -Wl,--end-group ../../auxiliary//libgallium.a(lp_bld_misc.o): In function `lp_register_oprofile_jit_event_listener': lp_bld_misc.cpp:(.text+0x1c): undefined reference to `llvm::JITEventListener::createOProfileJITEventListener()' collect2: error: ld returned 1 exit status gmake[5]: *** [lp_test_format] Error 1 gmake[5]: Leaving directory `/src/x11/mesa/work/Mesa-9.0.3/src/gallium/drivers/llvmpipe' I guess this error doesn't show up for people who've got LLVM built as one large library, which isn't the default configuration. -- 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 12/14] mesa: Remove unused gl_winsys_error enum.
On Fri, Feb 22, 2013 at 7:52 PM, Eric Anholt e...@anholt.net wrote: --- src/mesa/main/mtypes.h |8 1 file changed, 8 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 11e1f9e..65c823d 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3403,14 +3403,6 @@ typedef enum { } gl_api_error; typedef enum { - WINSYS_ERROR_UNKNOWN, -} gl_winsys_error; - -typedef enum { - SHADER_ERROR_UNKNOWN, -} gl_shader_error; This is not mentioned in commit message. -Jordan - -typedef enum { OTHER_ERROR_UNKNOWN, OTHER_ERROR_OUT_OF_MEMORY, } gl_other_error; -- 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] GL_ARB_debug_output from drivers
Series Reviewed-by: Jordan Justen jordan.l.jus...@intel.com On Fri, Feb 22, 2013 at 7:52 PM, Eric Anholt e...@anholt.net wrote: One of the features Valve asked for, that they expected after using other drivers, is that they can easily get information about performance traps (and other important stuff) from drivers. We wrote INTEL_DEBUG=perf this summer as a quick fix, but it's not how most drivers integrate this sort of feedback. Instead, you make a debug context, and you take a bit of a performance hit but you get GL_ARB_debug_output messages from the driver. I didn't want to just dump the same ID in every message, since that's definitely not what the spec intends you to do, so I'd been delaying the ARB_debug_output work until I could decide how to make that possible. This is what I came up with after a few false starts. I haven't fixed up the current messages to have unique IDs, though. I'd like to do something that doesn't involve spamming a static msg_id into each caller, but to avoid that I need a #define with varargs. Is __VA_ARGS__ or some equivalent standard enough that we can rely on it outside of drivers? ___ 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] util/u_blitter: Set pipe_sampler_state::normalized_coords correctly.
Reviewed-by: Marek Olšák mar...@gmail.com Marek On Sat, Feb 23, 2013 at 2:50 PM, jfons...@vmware.com wrote: From: José Fonseca jfons...@vmware.com We might want to revisit the normalized_coords semantics, but this is the current expected behavior. Fixes fdo bug 61091. --- src/gallium/auxiliary/util/u_blitter.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 9522402..e37be4e 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -103,7 +103,10 @@ struct blitter_context_priv void *velem_state_readbuf; /* Sampler state. */ - void *sampler_state, *sampler_state_linear; + void *sampler_state; + void *sampler_state_linear; + void *sampler_state_rect; + void *sampler_state_rect_linear; /* Rasterizer state. */ void *rs_state, *rs_state_scissor, *rs_discard_state; @@ -223,10 +226,15 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) sampler_state.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; sampler_state.normalized_coords = 1; ctx-sampler_state = pipe-create_sampler_state(pipe, sampler_state); + sampler_state.normalized_coords = 0; + ctx-sampler_state_rect = pipe-create_sampler_state(pipe, sampler_state); sampler_state.min_img_filter = PIPE_TEX_FILTER_LINEAR; sampler_state.mag_img_filter = PIPE_TEX_FILTER_LINEAR; + sampler_state.normalized_coords = 1; ctx-sampler_state_linear = pipe-create_sampler_state(pipe, sampler_state); + sampler_state.normalized_coords = 0; + ctx-sampler_state_rect_linear = pipe-create_sampler_state(pipe, sampler_state); /* rasterizer state */ memset(rs_state, 0, sizeof(rs_state)); @@ -365,8 +373,10 @@ void util_blitter_destroy(struct blitter_context *blitter) ctx-delete_fs_state(pipe, ctx-fs_col_int[i]); } - pipe-delete_sampler_state(pipe, ctx-sampler_state); + pipe-delete_sampler_state(pipe, ctx-sampler_state_rect_linear); + pipe-delete_sampler_state(pipe, ctx-sampler_state_rect); pipe-delete_sampler_state(pipe, ctx-sampler_state_linear); + pipe-delete_sampler_state(pipe, ctx-sampler_state); u_upload_destroy(ctx-upload); FREE(ctx); } @@ -1317,9 +1327,17 @@ void util_blitter_blit_generic(struct blitter_context *blitter, src_samples = 1 (dstbox-width != abs(srcbox-width) || dstbox-height != abs(srcbox-height))) { - sampler_state = ctx-sampler_state_linear; + if (src_target == PIPE_TEXTURE_RECT) { + sampler_state = ctx-sampler_state_rect_linear; + } else { + sampler_state = ctx-sampler_state_linear; + } } else { - sampler_state = ctx-sampler_state; + if (src_target == PIPE_TEXTURE_RECT) { + sampler_state = ctx-sampler_state_rect; + } else { + sampler_state = ctx-sampler_state; + } } /* Set samplers. */ -- 1.7.10.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 61364] LLVM assertion when starting X11
https://bugs.freedesktop.org/show_bug.cgi?id=61364 --- Comment #1 from John Kåre Alsaker john.kare.alsa...@gmail.com --- Backtrace #0 0x7f40f703d2c5 in raise () from /usr/lib/libc.so.6 #1 0x7f40f703e748 in abort () from /usr/lib/libc.so.6 #2 0x7f40f7036312 in __assert_fail_base () from /usr/lib/libc.so.6 #3 0x7f40f70363c2 in __assert_fail () from /usr/lib/libc.so.6 #4 0x7f40f45b1b59 in llvm::cl::parserllvm::ScheduleDAGSDNodes* (*)(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level)::addLiteralOptionllvm::ScheduleDAGSDNodes* (*)(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level) (this=0x7f40f38ae9d0 ISHeuristic+96, Name=0x7f40f308a1d5 default, V=@0x7fff83a92008: 0x7f40f4598600 llvm::createDefaultScheduler(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level), HelpStr=0x7f40f2f2b68c Best scheduler for the target) at /home/zoxc/llvm-build/llvm/include/llvm/Support/CommandLine.h:646 #5 0x7f40f45b25aa in llvm::RegisterPassParserllvm::RegisterScheduler::NotifyAdd (this=0x7f40f38ae9c8 ISHeuristic+88, N=0x7f40f308a1d5 default, C=0x7f40f4598600 llvm::createDefaultScheduler(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level), D=0x7f40f2f2b68c Best scheduler for the target) at /home/zoxc/llvm-build/llvm/include/llvm/CodeGen/MachinePassRegistry.h:148 #6 0x7f40f480ba8f in llvm::MachinePassRegistry::Add (this=0x7f40f5a18320 llvm::RegisterScheduler::Registry, Node=0x7f40f38aeb38 defaultListDAGScheduler) at /home/zoxc/llvm-build/llvm/lib/CodeGen/MachinePassRegistry.cpp:41 #7 0x7f40f22ae445 in llvm::RegisterScheduler::RegisterScheduler (this=0x7f40f38aeb38 defaultListDAGScheduler, N=0x7f40f308a1d5 default, D=0x7f40f2f2b68c Best scheduler for the target, C=0x7f40f4598600 llvm::createDefaultScheduler(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level)) at /home/zoxc/llvm-build/llvm/include/llvm/CodeGen/SchedulerRegistry.h:43 #8 0x7f40f22a0e1d in llvm::RegisterScheduler::RegisterScheduler (this=0x7f40f38aeb38 defaultListDAGScheduler, N=0x7f40f308a1d5 default, D=0x7f40f2f2b68c Best scheduler for the target, C=0x7f40f4598600 llvm::createDefaultScheduler(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level)) at /home/zoxc/llvm-build/llvm/include/llvm/CodeGen/SchedulerRegistry.h:43 #9 0x7f40f1bb4129 in __cxx_global_var_init38 () from /usr/lib/xorg/modules/dri/swrast_dri.so #10 0x7f40f1bb41aa in global constructors keyed to a () from /usr/lib/xorg/modules/dri/swrast_dri.so #11 0x7f40f8c629d6 in call_init () from /lib64/ld-linux-x86-64.so.2 #12 0x7f40f8c62aba in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2 #13 0x7f40f8c66af9 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2 #14 0x7f40f8c62816 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2 #15 0x7f40f8c66329 in _dl_open () from /lib64/ld-linux-x86-64.so.2 #16 0x7f40f85c3026 in ?? () from /usr/lib/libdl.so.2 #17 0x7f40f8c62816 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2 #18 0x7f40f85c35ec in ?? () from /usr/lib/libdl.so.2 #19 0x7f40f85c30c1 in dlopen () from /usr/lib/libdl.so.2 #20 0x7f40f5ce80a6 in ?? () from /usr/lib/xorg/modules/extensions/libglx.so #21 0x7f40f5ce79d6 in ?? () from /usr/lib/xorg/modules/extensions/libglx.so #22 0x7f40f5ce6fda in ?? () from /usr/lib/xorg/modules/extensions/libglx.so #23 0x004aace9 in InitExtensions () #24 0x0042670c in ?? () #25 0x7f40f7029a15 in __libc_start_main () from /usr/lib/libc.so.6 #26 0x00426c0d in _start () -- 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] st/vega: Fix memory leak in combine_shaders.
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/gallium/state_trackers/vega/shaders_cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/vega/shaders_cache.c b/src/gallium/state_trackers/vega/shaders_cache.c index eceae54..c1082ca 100644 --- a/src/gallium/state_trackers/vega/shaders_cache.c +++ b/src/gallium/state_trackers/vega/shaders_cache.c @@ -225,8 +225,10 @@ combine_shaders(const struct shader_asm_info *shaders[SHADER_STAGES], int num_sh ureg_END(ureg); shader-tokens = ureg_finalize(ureg); - if(!shader-tokens) + if (!shader-tokens) { + ureg_destroy(ureg); return NULL; + } p = pipe-create_fs_state(pipe, shader); -- 1.8.1.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] radeonsi: Fix memory leak in si_set_constant_buffer.
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/gallium/drivers/radeonsi/si_state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 769ba0c..a395ec4 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2523,6 +2523,7 @@ static void si_set_constant_buffer(struct pipe_context *ctx, uint shader, uint i default: R600_ERR(unsupported %d\n, shader); + FREE(pm4); } if (cb-buffer != rbuffer-b.b) -- 1.8.1.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev