[Mesa-dev] [PATCH 1/1] Fix minor inconsistency for new method try_emit_mad_for_and_not()

2011-08-22 Thread Kai Wasserbäch
Commits ff2cfb8989cd and 5379a70d3fab introduced try_emit_mad_for_and_not for ir_to_mesa and glsl_to_tgsi respectively. In both cases the methods had a return type of "bool" instead of "GLboolean". Signed-off-by: Kai Wasserbäch --- src/mesa/program/ir_to_mesa.cpp|4 ++-- src/mes

Re: [Mesa-dev] [PATCH 0/6] textureSize support

2011-08-22 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/22/2011 04:26 PM, Kenneth Graunke wrote: > This series adds textureSize() support. I think it should be ready to go. > I've tested it on Broadwater, Eaglelake, Ironlake, Sandybridge, and > Ivybridge. textureSize now works on all of them, and th

Re: [Mesa-dev] [PATCH 2/6] texture_builtins.py: Add support for textureSize (txs).

2011-08-22 Thread Kenneth Graunke
On 08/22/2011 04:32 PM, Ian Romanick wrote: > On 08/22/2011 04:26 PM, Kenneth Graunke wrote: >> --- >> src/glsl/builtins/tools/texture_builtins.py | 50 >> +++--- >> 1 files changed, 36 insertions(+), 14 deletions(-) > >> diff --git a/src/glsl/builtins/tools/texture_builtin

Re: [Mesa-dev] [PATCH 2/6] texture_builtins.py: Add support for textureSize (txs).

2011-08-22 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/22/2011 04:26 PM, Kenneth Graunke wrote: > --- > src/glsl/builtins/tools/texture_builtins.py | 50 +++--- > 1 files changed, 36 insertions(+), 14 deletions(-) > > diff --git a/src/glsl/builtins/tools/texture_builtins.py >

[Mesa-dev] [PATCH 6/6] i965: Implement textureSize (TXS) on Gen4.

2011-08-22 Thread Kenneth Graunke
Also, remove the BRW_SAMPLER_MESSAGE_SIMD8_RESINFO #define because there totally isn't a SIMD8 variant. Unfortunately, resinfo returns FLOAT32 on Broadwater/Crestline, unlike G45 which returns a proper UINT32. This turns out to be simple, however: when we emit MOVs to select the desired half of t

[Mesa-dev] [PATCH 5/6] i965/fs: Implement textureSize (TXS) on Gen5+.

2011-08-22 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_defines.h |2 + src/mesa/drivers/dri/i965/brw_fs.cpp |1 + src/mesa/drivers/dri/i965/brw_fs.h |3 +- src/mesa/drivers/dri/i965/brw_fs_emit.cpp|4 +++ src/mesa/drivers/dri/i965/brw_fs_visito

[Mesa-dev] [PATCH 4/6] i965/fs: Rudimentary support for non-floating point texture results.

2011-08-22 Thread Kenneth Graunke
Not all texturing operations return floating point data. For example, the resinfo message (textureSize or TXS) returns integer data. In the future, we'll also add integer texture support. ir_texture's type field contains this information; use its base type to appropriately type the destination r

[Mesa-dev] [PATCH 3/6] glsl/builtins: Uncomment textureSize prototypes.

2011-08-22 Thread Kenneth Graunke
--- src/glsl/builtins/profiles/130.frag |2 -- src/glsl/builtins/profiles/130.vert |2 -- 2 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/glsl/builtins/profiles/130.frag b/src/glsl/builtins/profiles/130.frag index 0e3c7ac..c121859 100644 --- a/src/glsl/builtins/profiles

[Mesa-dev] [PATCH 2/6] texture_builtins.py: Add support for textureSize (txs).

2011-08-22 Thread Kenneth Graunke
--- src/glsl/builtins/tools/texture_builtins.py | 50 +++--- 1 files changed, 36 insertions(+), 14 deletions(-) diff --git a/src/glsl/builtins/tools/texture_builtins.py b/src/glsl/builtins/tools/texture_builtins.py index a4054ca..7e569bf 100755 --- a/src/glsl/builtins/tools

[Mesa-dev] [PATCH 1/6] glsl: Add a new ir_txs (textureSize) opcode to ir_texture.

2011-08-22 Thread Kenneth Graunke
One unique aspect of TXS is that it doesn't have a coordinate. --- src/glsl/ir.cpp | 16 +++ src/glsl/ir.h|4 ++- src/glsl/ir_clone.cpp|4 ++- src/glsl/ir_hv_accept.cpp|9

[Mesa-dev] [PATCH 0/6] textureSize support

2011-08-22 Thread Kenneth Graunke
This series adds textureSize() support. I think it should be ready to go. I've tested it on Broadwater, Eaglelake, Ironlake, Sandybridge, and Ivybridge. textureSize now works on all of them, and there were no regressions on Gen4-6 (I didn't regression test Ivybridge because I'd already spent most

Re: [Mesa-dev] [PATCH] intel: fix read_only/write_only

2011-08-22 Thread Kenneth Graunke
On 08/22/2011 10:37 AM, Ben Widawsky wrote: Here was my patch which I forgot to send to the list. I think you missed map. Actually, I think he deleted intel_bufferobj_map in favor of just using intel_bufferobj_map_range. So it didn't need fixing. Signed-off-by: Ben Widawsky --- src/mesa/

[Mesa-dev] [PATCH 13/12] i965: Only map the necessary buffer range in brw_prepare_indices

2011-08-22 Thread Ian Romanick
From: Ian Romanick --- src/mesa/drivers/dri/i965/brw_draw_upload.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index ed1964f..7bc69c6 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH] intel: fix read_only/write_only

2011-08-22 Thread Ben Widawsky
Here was my patch which I forgot to send to the list. I think you missed map. Signed-off-by: Ben Widawsky --- src/mesa/drivers/dri/intel/intel_buffer_objects.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/sr

Re: [Mesa-dev] [PATCH 06/12] intel: Correctly check for read-only mappings in intel_bufferobj_map_range

2011-08-22 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/22/2011 12:32 AM, Ian Romanick wrote: > From: Ian Romanick > > The old code was an obvious cut-and-paste fail from intel_bufferobj_map. > > Cc: Eric Anholt > Cc: Ben Widawsky > --- > src/mesa/drivers/dri/intel/intel_buffer_objects.c |4

Re: [Mesa-dev] [PATCH 01/12] mesa: Remove target parameter from dd_function_table::UnmapBuffer

2011-08-22 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/22/2011 03:00 AM, Kenneth Graunke wrote: > On 08/22/2011 12:32 AM, Ian Romanick wrote: >> From: Ian Romanick >> >> No driver used that parameter, and most drivers ended up with a bunch >> of unused-parameter warnings because it was there. > > L

Re: [Mesa-dev] [PATCH 1/1] Fix minor inconsistency for new method try_emit_mad_for_and_not()

2011-08-22 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/22/2011 03:10 AM, Kai Wasserbäch wrote: > > Commits ff2cfb8989cd and 5379a70d3fab introduced > try_emit_mad_for_and_not for ir_to_mesa and glsl_to_tgsi respectively. > In both cases the methods had a return type of "bool" instead of > "GLboolean

Re: [Mesa-dev] [PATCH 4/5] mesa: Fix glGetUniformfv of native integer uniforms.

2011-08-22 Thread Eric Anholt
On Sat, 20 Aug 2011 00:16:05 -0700, Kenneth Graunke wrote: > On 08/19/2011 05:56 PM, Eric Anholt wrote: > > We have to actually convert the values on the way out. Fixes piglit > > ARB_shader_objects/getuniform. > > --- > > src/mesa/main/uniforms.c | 32 > > 1

Re: [Mesa-dev] [PATCH 08/12] mesa: Fix incorrect access parameter passed to MapBuffer

2011-08-22 Thread Eric Anholt
On Mon, 22 Aug 2011 00:33:00 -0700, "Ian Romanick" wrote: > From: Ian Romanick > > The code previously passed GL_DYNAMIC_DRAW for the access parameter. > By inspection, I believe that all drivers would treat this as > GL_READ_WRITE because it's not GL_READ_ONLY and it's not > GL_WRITE_ONLY. How

Re: [Mesa-dev] [PATCH 0/2] share source lists between build systems

2011-08-22 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/20/2011 11:54 AM, Chia-I Wu wrote: > This patch series enables Makefile, SConscript, and Android.mk to > share their source lists. The idea is to first factor out source > lists from Makefile to Makefile.sources. Then by adding the ability > to

Re: [Mesa-dev] [PATCH 09/12] radeon: Hack up an implementation of MapBufferRange

2011-08-22 Thread Alex Deucher
On Mon, Aug 22, 2011 at 3:33 AM, Ian Romanick wrote: > From: Ian Romanick > > This doesn't implement any of the "cool" features of MapBufferRange. > Adding this function is necessary for the next commit in the series. > Looks ok to me. Reviewed-by: Alex Deucher > Cc: Maciej Cencora > Cc: Al

Re: [Mesa-dev] [PATCH] mesa: call _mesa_set_vp_override in glDrawTex*

2011-08-22 Thread Brian Paul
Reviewed-by: Brian Paul On Sun, Aug 21, 2011 at 3:17 AM, Chia-I Wu wrote: > The driver may install its own vertex shader.  _mesa_set_vp_override > must be called so that core mesa can generate correct fragment program.. > --- >  src/mesa/main/drawtex.c |    4 >  1 files changed, 4 insertion

Re: [Mesa-dev] [PATCH 08/12] mesa: Fix incorrect access parameter passed to MapBuffer

2011-08-22 Thread Keith Whitwell
Your analysis sounds reasonable to me, Ian. Looks good. Keith On Mon, 2011-08-22 at 00:33 -0700, Ian Romanick wrote: > From: Ian Romanick > > The code previously passed GL_DYNAMIC_DRAW for the access parameter. > By inspection, I believe that all drivers would treat this as > GL_READ_WRITE bec

Re: [Mesa-dev] [PATCH 01/12] mesa: Remove target parameter from dd_function_table::UnmapBuffer

2011-08-22 Thread Brian Paul
I took a quick look over the series and it looks good to me (just switch/case formatting). So, quickly Reviewed-by: Brian Paul -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 11/12] mesa: Only map the necessary buffer range in vbo_get_minmax_index

2011-08-22 Thread Brian Paul
On Mon, Aug 22, 2011 at 1:33 AM, Ian Romanick wrote: > From: Ian Romanick > > --- >  src/mesa/vbo/vbo_exec_array.c |   15 +++ >  1 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c > index 484e1a8..9e194b1 10

Re: [Mesa-dev] [PATCH 0/2] share source lists between build systems

2011-08-22 Thread Jose Fonseca
Looks good to me. Jose - Original Message - > This patch series enables Makefile, SConscript, and Android.mk to > share their source lists. The idea is to first factor out source > lists from Makefile to Makefile.sources. Then by adding the ability > to parse Makefile.sources to SConscr

Re: [Mesa-dev] [PATCH 01/12] mesa: Remove target parameter from dd_function_table::UnmapBuffer

2011-08-22 Thread Kenneth Graunke
On 08/22/2011 12:32 AM, Ian Romanick wrote: > From: Ian Romanick > > No driver used that parameter, and most drivers ended up with a bunch > of unused-parameter warnings because it was there. Looks like you forgot to remove target from _mesa_buffer_unmap (bufferobj.c:479), resulting in the follo

[Mesa-dev] [PATCH 12/12] tnl: Only map the necessary buffer range in bind_indices

2011-08-22 Thread Ian Romanick
From: Ian Romanick --- src/mesa/tnl/t_draw.c | 19 ++- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c index a23d175..e67a673 100644 --- a/src/mesa/tnl/t_draw.c +++ b/src/mesa/tnl/t_draw.c @@ -347,16 +347,25 @@ stati

[Mesa-dev] [PATCH 09/12] radeon: Hack up an implementation of MapBufferRange

2011-08-22 Thread Ian Romanick
From: Ian Romanick This doesn't implement any of the "cool" features of MapBufferRange. Adding this function is necessary for the next commit in the series. Cc: Maciej Cencora Cc: Alex Deucher --- .../drivers/dri/radeon/radeon_buffer_objects.c | 33 1 files changed,

[Mesa-dev] [PATCH 11/12] mesa: Only map the necessary buffer range in vbo_get_minmax_index

2011-08-22 Thread Ian Romanick
From: Ian Romanick --- src/mesa/vbo/vbo_exec_array.c | 15 +++ 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 484e1a8..9e194b1 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec

[Mesa-dev] [PATCH 10/12] mesa: Eliminate dd_function_table::MapBuffer

2011-08-22 Thread Ian Romanick
From: Ian Romanick Replace all calls to dd_function_table::MapBuffer with appropriate calls to dd_function_table::MapBufferRange, then remove all the cruft. --- src/mesa/drivers/dri/i965/brw_draw_upload.c|7 ++- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 69 ++

[Mesa-dev] [PATCH 06/12] intel: Correctly check for read-only mappings in intel_bufferobj_map_range

2011-08-22 Thread Ian Romanick
From: Ian Romanick The old code was an obvious cut-and-paste fail from intel_bufferobj_map. Cc: Eric Anholt Cc: Ben Widawsky --- src/mesa/drivers/dri/intel/intel_buffer_objects.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_buffe

[Mesa-dev] [PATCH 08/12] mesa: Fix incorrect access parameter passed to MapBuffer

2011-08-22 Thread Ian Romanick
From: Ian Romanick The code previously passed GL_DYNAMIC_DRAW for the access parameter. By inspection, I believe that all drivers would treat this as GL_READ_WRITE because it's not GL_READ_ONLY and it's not GL_WRITE_ONLY. However, my guess is that this code actually wants to use GL_WRITE_ONLY.

[Mesa-dev] [PATCH 07/12] mesa: Remove target parameter from dd_function_table::FlushMappedBufferRange

2011-08-22 Thread Ian Romanick
From: Ian Romanick No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. --- src/mesa/drivers/dri/intel/intel_buffer_objects.c |2 +- src/mesa/main/bufferobj.c |5 ++--- src/mesa/main/dd.h

[Mesa-dev] [PATCH 05/12] mesa: Remove target parameter from dd_function_table::MapBufferRange

2011-08-22 Thread Ian Romanick
From: Ian Romanick No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. --- src/mesa/drivers/dri/intel/intel_buffer_objects.c |2 +- src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c |3 +-- src/mesa/main/bufferobj.c

[Mesa-dev] [PATCH 04/12] mesa: Remove target parameter from dd_function_table::GetBufferSubData

2011-08-22 Thread Ian Romanick
From: Ian Romanick No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. --- src/mesa/drivers/dri/intel/intel_buffer_objects.c |1 - src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c |2 +- .../drivers/dri/radeon/radeon

[Mesa-dev] [PATCH 03/12] mesa: Remove target parameter from dd_function_table::BufferSubData

2011-08-22 Thread Ian Romanick
From: Ian Romanick No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. --- src/mesa/drivers/dri/intel/intel_buffer_objects.c |1 - src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c |2 +- .../drivers/dri/radeon/radeon

[Mesa-dev] [PATCH 02/12] mesa: Remove target parameter from dd_function_table::MapBuffer

2011-08-22 Thread Ian Romanick
From: Ian Romanick No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. --- src/mesa/drivers/dri/i965/brw_draw_upload.c|1 - src/mesa/drivers/dri/intel/intel_buffer_objects.c | 10 +++--- src/mesa/drivers/dri/

[Mesa-dev] [PATCH 01/12] mesa: Remove target parameter from dd_function_table::UnmapBuffer

2011-08-22 Thread Ian Romanick
From: Ian Romanick No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. --- src/mesa/drivers/dri/i965/brw_draw_upload.c|2 +- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 14 ++ src/mesa/drivers

Re: [Mesa-dev] [PATCH] glsl: Make ir_validate actually visit ir_if nodes.

2011-08-22 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/20/2011 12:37 AM, Kenneth Graunke wrote: > There is no ir_hierarchical_visitor::visit(ir_if *) method, since ir_if > is not a leaf node. Instead, there are visit_enter and visit_leave > methods. Use visit_enter arbitrarily (either would work fi