Re: [Mesa-dev] [PATCH] glsl/gallium: add a remove_output lowering pass

2012-01-02 Thread Kenneth Graunke
On 12/31/2011 03:52 PM, Vincent Lejeune wrote: Current glsl_to_tgsi::remove_output_read pass did not work properly when indirect addressing was involved ; this commit replaces it with a lowering pass that occurs before glsl_to_tgsi visitor is called. This patch fix varying-array related piglit

[Mesa-dev] [PATCH 1/3] glsl: Add a lowering pass to remove reads of shader output variables.

2012-01-02 Thread Kenneth Graunke
From: Vincent Lejeune v...@ovi.com This is similar to Gallium's existing glsl_to_tgsi::remove_output_read lowering pass, but done entirely inside the GLSL compiler. Signed-off-by: Vincent Lejeune v...@ovi.com Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/Makefile.sources

[Mesa-dev] [PATCH 2/3] glsl_to_tgsi: Use the GLSL compiler's new remove-output-reads pass.

2012-01-02 Thread Kenneth Graunke
From: Vincent Lejeune v...@ovi.com The existing glsl_to_tgsi::remove_output_read pass did not work properly when indirect addressing was involved; this commit replaces it with a lowering pass that occurs before TGSI code generation. Fixes varying-array related piglit tests. Signed-off-by:

[Mesa-dev] [PATCH 3/3] glsl_to_tgsi: Remove the obsolete remove_output_reads pass.

2012-01-02 Thread Kenneth Graunke
This is now handled by the GLSL compiler, so this code is dead. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 84 1 files changed, 0 insertions(+), 84 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp

Re: [Mesa-dev] [PATCH 1/3] intel: Fix bad read/write flags on self-copies for glCopyBufferSubData().

2012-01-02 Thread Kenneth Graunke
On 12/28/2011 11:14 AM, Eric Anholt wrote: We didn't consume these flags in any way that would produce a functional difference, but we might have some day. --- src/mesa/drivers/dri/intel/intel_buffer_objects.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git

Re: [Mesa-dev] [PATCH] vbo: Clean up recalculate_input_bindings.

2012-01-02 Thread Kenneth Graunke
On 12/26/2011 11:51 PM, Mathias Fröhlich wrote: Hi, On Tuesday, December 27, 2011 00:17:09 Brian Paul wrote: LGTM. I presume you've done a piglit run and tested with a few other things? I have run piglit quick with classic swrast an piglit r600g on gallium rv670 with this change. Also

Re: [Mesa-dev] [PATCH 2/2] gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY

2012-01-02 Thread Christian König
Looks good on first sign. I'm waiting for this for quite some time now, cause it makes XvMC state tracker implementation more cleaner and faster. Acked-by: Christian König deathsim...@vodafone.de On 02.01.2012 01:22, Marek Olšák wrote: Please see the diff for further info. This paves the way

Re: [Mesa-dev] [PATCH 3/3] vl: replace decode_buffers with auxiliary data field

2012-01-02 Thread Christian König
Hi Maarten, first of all: Happy new Year and sorry for the late reply, have been on vacation for the last week. On 29.12.2011 16:41, Maarten Lankhorst wrote: Hey Christian, Op 26-12-11 14:00, Christian König schreef: Based on patches from Maarten Lankhorstm.b.lankho...@gmail.com

[Mesa-dev] [PATCH 1/3] u_format: implement fetch_rgba_uint and fetch_rgba_sint for integer formats

2012-01-02 Thread Marek Olšák
Fetching int as float and vice versa is not allowed. Fetching unsigned int as signed int and vice versa is not allowed either. Doing conversions like that isn't allowed in OpenGL. The three hooks could be consolidated into one fetch hook, which would fetch uint as uint32, sint as sint32, and

[Mesa-dev] [PATCH 2/3] translate: implement translation of (pure) integer formats

2012-01-02 Thread Marek Olšák
The conversion is limited to only a few cases, because converting to any other type shouldn't happen in any driver. --- .../auxiliary/translate/translate_generic.c| 346 ++-- 1 files changed, 252 insertions(+), 94 deletions(-) diff --git

[Mesa-dev] [PATCH 3/3] translate: implement translation of 10_10_10_2 types

2012-01-02 Thread Marek Olšák
This is for GL_ARB_vertex_type_2_10_10_10_rev. I just took the code from u_format_table.c. It's based on pack_rgba_float. I had no other choice. The u_format hooks are not exactly compatible with translate. The cleanup of it is left for future work. --- .../auxiliary/translate/translate_generic.c

Re: [Mesa-dev] [PATCH 1/3] u_format: implement fetch_rgba_uint and fetch_rgba_sint for integer formats

2012-01-02 Thread Dave Airlie
On Mon, Jan 2, 2012 at 1:07 PM, Marek Olšák mar...@gmail.com wrote: Fetching int as float and vice versa is not allowed. Fetching unsigned int as signed int and vice versa is not allowed either. The first is true, the second isn't, otherwise I'd have implemented this that way. Doing

[Mesa-dev] State of xcb-glx integration

2012-01-02 Thread Ingo Krabbe
Hey, in the last two weeks I did some experiments with xcb, glx and mesa gallium drivers (nouveau). Is there any work group that takes care for this part of mesa. There still seem to be some very basic problems using that configuration. cheers, ingo -- i don't do signatures

[Mesa-dev] [RFC PATCH] mesa/gl3: introduce a new option to the gl3 version enable.

2012-01-02 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com EXT_texture_integer isn't strictly equivalent to GL3, the L/I/A integer formats are not required in GL3, and some drivers may not require them. I've no idea if we have any hw that requires it, just sending the patch along after discussion on irc.

Re: [Mesa-dev] [RFC PATCH] mesa/gl3: introduce a new option to the gl3 version enable.

2012-01-02 Thread Dave Airlie
EXT_texture_integer isn't strictly equivalent to GL3, the L/I/A integer formats are not required in GL3, and some drivers may not require them. I've no idea if we have any hw that requires it, just sending the patch along after discussion on irc. Another reason was mentioned on irc,

Re: [Mesa-dev] [PATCH 1/3] u_format: implement fetch_rgba_uint and fetch_rgba_sint for integer formats

2012-01-02 Thread Dave Airlie
On Mon, Jan 2, 2012 at 4:40 PM, Marek Olšák mar...@gmail.com wrote: On Mon, Jan 2, 2012 at 3:31 PM, Dave Airlie airl...@gmail.com wrote: On Mon, Jan 2, 2012 at 1:07 PM, Marek Olšák mar...@gmail.com wrote: Fetching int as float and vice versa is not allowed. Fetching unsigned int as signed int

Re: [Mesa-dev] [RFC PATCH] mesa/gl3: introduce a new option to the gl3 version enable.

2012-01-02 Thread Marek Olšák
I agree that we shouldn't be exposing EXT_texture_integer. I think it would be cleaner to just say that if GLSL 1.3 is supported, all the other features which are part of it are supported too. I would simplify the code like this (see below), and most of the checks for EXT_texture_integer should

Re: [Mesa-dev] [PATCH 1/3] u_format: implement fetch_rgba_uint and fetch_rgba_sint for integer formats

2012-01-02 Thread Marek Olšák
On Mon, Jan 2, 2012 at 5:56 PM, Dave Airlie airl...@gmail.com wrote: On Mon, Jan 2, 2012 at 4:40 PM, Marek Olšák mar...@gmail.com wrote: On Mon, Jan 2, 2012 at 3:31 PM, Dave Airlie airl...@gmail.com wrote: On Mon, Jan 2, 2012 at 1:07 PM, Marek Olšák mar...@gmail.com wrote: Fetching int as

[Mesa-dev] [PATCH] draw: fix piglit base vertex + user vertex array tests

2012-01-02 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This fixes draw-elements-base-vertex user_varrays draw-elements-instanced-base-vertex user_varrays for softpipe with no llvm support (DRAW_USE_LLVM=false) I'm not sure if this is the correct answer, but these tests were showing a max_index of 7, then trying

Re: [Mesa-dev] softpipe and tgsi_exec.c FAST_MATH

2012-01-02 Thread Brian Paul
On 12/31/2011 09:46 AM, Dave Airlie wrote: Hi, So in the interest of correctness perf wrt softpipe, flicking tgsi_exec.c FAST_MATH to 0 fixes 15 piglit tests with 0 regressions, I could probably be persuaded to make a SOFTPIPE_FAST_MATH run time set to 0 by default, anyone care one way or

[Mesa-dev] glsl lowering pass

2012-01-02 Thread Vincent Lejeune
Hi, thank for your review, your tips about ralloc, and your fixed patches. I spotted a tab indent instead of a 3 whitespace indent in lower_output_read.cpp. Other than that, your patch is fine for me. I don't know how many reviews are needed before a patch is merged so I'm sending your patches

[Mesa-dev] [PATCH 1/2] glsl: Add a lowering pass to remove reads of shader output variables.

2012-01-02 Thread Vincent Lejeune
This is similar to Gallium's existing glsl_to_tgsi::remove_output_read lowering pass, but done entirely inside the GLSL compiler. Signed-off-by: Vincent Lejeune v...@ovi.com Signed-off-by: Kenneth Graunke kenn...@whitecape.org v2 [Kayden]: - Don't reallocate the array for every shader output.

[Mesa-dev] [PATCH 2/2] glsl_to_tgsi: Use the GLSL compiler's new remove-output-reads pass.

2012-01-02 Thread Vincent Lejeune
The existing glsl_to_tgsi::remove_output_read pass did not work properly when indirect addressing was involved; this commit replaces it with a lowering pass that occurs before TGSI code generation. Fixes varying-array related piglit tests. Signed-off-by: Vincent Lejeune v...@ovi.com

[Mesa-dev] [PATCH 1/4] i965/gen7: Use the updated interface for SO write pointer resetting.

2012-01-02 Thread Eric Anholt
The new kernel patch I submitted makes the interface opt-in, so all batchbuffers aren't preceded by the 4 MI_LOAD_REGISTER_IMMs. --- src/mesa/drivers/dri/i965/gen7_sol_state.c |2 ++ src/mesa/drivers/dri/intel/intel_batchbuffer.c | 13 +

[Mesa-dev] [PATCH 3/4] i965/gen7: Fix up the transform feedback buffer pointers on later batches.

2012-01-02 Thread Eric Anholt
Fixes piglit EXT_transform_feedback/intervening-read --- src/mesa/drivers/dri/i965/brw_context.h|1 + src/mesa/drivers/dri/i965/brw_vtbl.c |6 ++ src/mesa/drivers/dri/i965/gen6_sol.c |1 + src/mesa/drivers/dri/i965/gen7_sol_state.c | 13 ++--- 4 files

[Mesa-dev] [PATCH 2/4] i965/gen7: Flush the batch between transform feedbacks.

2012-01-02 Thread Eric Anholt
We need the kernel to reset our pointers to 0 in between. Note that the initialization of function pointer had to move to after InitContext since we didn't have intel-gen set up yet. Fixes piglit EXT_transform_feedback/immediate-reuse --- src/mesa/drivers/dri/i965/brw_context.c| 13

[Mesa-dev] Finishing gen7 transform feedback.

2012-01-02 Thread Eric Anholt
Here's my patch series for finishing off gen7 transform feedback. It's not quite ready because it relies on new libdrm, which relies on the kernel patch landing, so I won't push without requiring a new libdrm release. ___ mesa-dev mailing list

[Mesa-dev] [PATCH 4/4] i965/gen7: Enable transform feedback as long as kernel support is present.

2012-01-02 Thread Eric Anholt
The last major issue (intervening-read) is fixed, so let's turn this on for real. The only other known issue is a hardware limitation for tesselation with flat shading. --- src/mesa/drivers/dri/intel/intel_extensions.c |3 ++- src/mesa/drivers/dri/intel/intel_screen.c |4

Re: [Mesa-dev] [PATCH] st/mesa: use SINT/UINT formats for VertexAttribIPointer

2012-01-02 Thread Dave Airlie
On Sun, Jan 1, 2012 at 5:46 PM, Christoph Bumiller e0425...@student.tuwien.ac.at wrote: Ping ... Reviewed-by: Dave Airlie airl...@redhat.com Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 0/2 v4] Add support for clip distances in Gallium

2012-01-02 Thread Bryan Cain
This is the fourth revision of my changes to add support for gl_ClipDistance with Gallium. The first three revisions were sent in closer succession about two weeks ago. This revision is identical to v3 except for the inclusion of the changes suggested by Brian Paul in reply to the v3 patches.

[Mesa-dev] [PATCH 1/2] gallium: add support for clip distances

2012-01-02 Thread Bryan Cain
--- src/gallium/auxiliary/tgsi/tgsi_dump.c |3 +- src/gallium/auxiliary/tgsi/tgsi_text.c |3 +- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 38 +-- src/gallium/auxiliary/tgsi/tgsi_ureg.h |6 src/gallium/include/pipe/p_shader_tokens.h |3

[Mesa-dev] [PATCH 2/2] st/mesa: add support for gl_ClipDistance

2012-01-02 Thread Bryan Cain
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 48 +--- src/mesa/state_tracker/st_program.c| 18 ++ 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp

Re: [Mesa-dev] Finishing gen7 transform feedback.

2012-01-02 Thread Kenneth Graunke
On 01/02/2012 11:37 AM, Eric Anholt wrote: Here's my patch series for finishing off gen7 transform feedback. It's not quite ready because it relies on new libdrm, which relies on the kernel patch landing, so I won't push without requiring a new libdrm release. LGTM. Reviewed-by: Kenneth

[Mesa-dev] glx / xcb versioning

2012-01-02 Thread Brian Paul
Ian, I'm getting some warnings/errors with the latest GLX changes: clientinfo.c: In function ‘__glX_send_client_info’: clientinfo.c:128:7: warning: implicit declaration of function ‘xcb_glx_set_client_info_2arb’ clientinfo.c:139:7: warning: implicit declaration of function

[Mesa-dev] [Bug 43317] swrast: glean basic sanity fails

2012-01-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43317 Brian Paul bri...@vmware.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: [Mesa-dev] [PATCH 4/4] i965/gen7: Enable transform feedback as long as kernel support is present.

2012-01-02 Thread Eugeni Dodonov
On Mon, Jan 2, 2012 at 17:37, Eric Anholt e...@anholt.net wrote: - if (intel-gen == 6 || (intel-gen == 7 override_version = 30)) + if (intel-gen == 6 || + (intel-gen == 7 intel-intelScreen-kernel_has_gen7_sol_reset)) ctx-Extensions.EXT_transform_feedback = true; If the

[Mesa-dev] [PATCH 1/2] mesa: XCB is no longer optional for GLX or DRI

2012-01-02 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- configure.ac | 28 ++-- 1 files changed, 6 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index c29b0bb..e526d17 100644 --- a/configure.ac +++

[Mesa-dev] [PATCH 2/2] glx: Hack around versions of XCB that lack GLX_ARB_create_context support

2012-01-02 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com A lot of tests in 'make check' will fail under these circumstances, but at least the build should work. Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glx/create_context.c | 14 ++ src/glx/glxextensions.c |9 +

[Mesa-dev] Recent mesa changes are causing tinderbox to fail

2012-01-02 Thread Jeremy Huddleston
xdriinfo is failing to build in tinderbox (through no change of its own). The relevant changes in mesa were bce506f..7705833. My guess is that this was caused by one of: glx: Add __glX_send_client_info super function glx: Initial implementation of glXCreateContextAttribsARB Here's the

[Mesa-dev] [Bug 44407] New: git mesa/src/glx fails to compile

2012-01-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44407 Bug #: 44407 Summary: git mesa/src/glx fails to compile Classification: Unclassified Product: Mesa Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All)

Re: [Mesa-dev] Recent mesa changes are causing tinderbox to fail

2012-01-02 Thread Ian Romanick
On 01/02/2012 06:18 PM, Jeremy Huddleston wrote: xdriinfo is failing to build in tinderbox (through no change of its own). The relevant changes in mesa were bce506f..7705833. My guess is that this was caused by one of: glx: Add __glX_send_client_info super function glx: Initial

[Mesa-dev] [Bug 44407] git mesa/src/glx fails to compile

2012-01-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44407 Ian Romanick i...@freedesktop.org changed: What|Removed |Added Status|NEW |RESOLVED

Re: [Mesa-dev] [PATCH] ff_fragment_shader: Don't generate swizzles for scalar combiner inputs

2012-01-02 Thread Ian Romanick
On 12/23/2011 10:35 PM, Eric Anholt wrote: On Thu, 22 Dec 2011 17:43:57 -0800, Ian Romanicki...@freedesktop.org wrote: From: Ian Romanickian.d.roman...@intel.com There are a couple scenarios where the source could be zero and the operand could be either SRC_ALPHA or ONE_MINUS_SRC_ALPHA. For

Re: [Mesa-dev] [PATCH 1/3] u_format: implement fetch_rgba_uint and fetch_rgba_sint for integer formats

2012-01-02 Thread Ian Romanick
On 01/02/2012 09:18 AM, Marek Olšák wrote: On Mon, Jan 2, 2012 at 5:56 PM, Dave Airlieairl...@gmail.com wrote: On Mon, Jan 2, 2012 at 4:40 PM, Marek Olšákmar...@gmail.com wrote: On Mon, Jan 2, 2012 at 3:31 PM, Dave Airlieairl...@gmail.com wrote: On Mon, Jan 2, 2012 at 1:07 PM, Marek

Re: [Mesa-dev] [PATCH] glsl_to_tgsi: v2 Invalidate and revalidate uniform backing storage

2012-01-02 Thread Ian Romanick
On 01/02/2012 08:27 AM, Alex Deucher wrote: On Thu, Dec 22, 2011 at 9:35 AM, Vadim Girlinvadimgir...@gmail.com wrote: If glUniform1i and friends are going to dump data directly in driver-allocated, the pointers have to be updated when the storage moves. This should fix the regressions seen

Re: [Mesa-dev] [PATCH 1/2] glsl: Add a lowering pass to remove reads of shader output variables.

2012-01-02 Thread Ian Romanick
On 01/02/2012 11:17 AM, Vincent Lejeune wrote: This is similar to Gallium's existing glsl_to_tgsi::remove_output_read lowering pass, but done entirely inside the GLSL compiler. Signed-off-by: Vincent Lejeunev...@ovi.com Signed-off-by: Kenneth Graunkekenn...@whitecape.org v2 [Kayden]: - Don't

[Mesa-dev] [Bug 44407] git mesa/src/glx fails to compile

2012-01-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44407 Jos van Wolput wol...@onsneteindhoven.nl changed: What|Removed |Added Status|RESOLVED|REOPENED

[Mesa-dev] [PATCH 1/3] mesa: Fix typos in transform feedback error messages.

2012-01-02 Thread Paul Berry
--- src/mesa/main/shaderapi.c |2 +- src/mesa/main/transformfeedback.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index b71b44b..52a9bd4 100644 --- a/src/mesa/main/shaderapi.c +++

[Mesa-dev] [PATCH 2/3] mesa: Check that all buffers are bound in BeginTransformFeedback.

2012-01-02 Thread Paul Berry
From the EXT_transform_feedback spec: The error INVALID_OPERATION is generated by BeginTransformFeedbackEXT if any transform feedback buffer object binding point used in transform feedback mode does not have a buffer object bound. This required adding a new NumBuffers field to

[Mesa-dev] [PATCH 3/3] mesa: Additional error checks for transform feedback.

2012-01-02 Thread Paul Berry
From the EXT_transform_feedback spec: The error INVALID_OPERATION is also generated by BeginTransformFeedbackEXT if no binding points would be used, either because no program object is active or because the active program object has specified no varying variables to record.