[Mesa-dev] [PATCH] android: use gralloc_drm_get_gem_handle api

2013-01-23 Thread Tapani Pälli
currently a gralloc internal structure is exposed to mesa, use a query function instead to maintain ABI compatibility. Signed-off-by: Tapani Pälli --- src/egl/drivers/dri2/platform_android.c | 8 ++-- src/egl/main/Android.mk | 4 +++- src

[Mesa-dev] [PATCH] android interface change

2013-01-23 Thread Tapani Pälli
Hello; Following patch introduces API change between Mesa and gralloc module. Gralloc module with appropriate change is available at 01.org Android repository. This change is not compatible with current android-x86 project gralloc. As this kind of API changes may happen in future, I'd like to prop

[Mesa-dev] [PATCH] android: fix stride to be bytes instead of pixels

2013-01-23 Thread Tapani Pälli
commit 60894edeef973e86a73067276f658b72f84271b6 changed the way dri2 buffer pitch is interpreted in intel driver createImageFromName implementation, caller must set pitch in bytes, not pixels. Signed-off-by: Tapani Pälli --- src/egl/drivers/dri2/platform_android.c | 2 +- 1 file changed, 1 inser

Re: [Mesa-dev] [PATCH 12/32] glsl: Add ir_variable::interface_type field

2013-01-23 Thread Paul Berry
On 23 January 2013 21:19, Ian Romanick wrote: > On 01/23/2013 10:07 PM, Paul Berry wrote: > >> On 22 January 2013 00:52, Ian Romanick > > wrote: >> >> From: Ian Romanick > > >> >> >> For variables that are in an interfac

Re: [Mesa-dev] [PATCH 00/32] UBOs for OpenGL ES 3.0

2013-01-23 Thread Ian Romanick
On 01/22/2013 03:51 AM, Ian Romanick wrote: So here it is. I've just pushed a re-spin of this patch series to the gles3 branch. I have incorporated all of the review comments received so far *except* Paul's question on patch 10, and his NULL initialization suggestion on patch 12. This is

Re: [Mesa-dev] [PATCH] i965: Use GL_RED for DEPTH_TEXTURE_MODE in ES 3.0 for unsized formats.

2013-01-23 Thread Ian Romanick
On 01/23/2013 06:27 PM, Kenneth Graunke wrote: Khronos has apparently decided that depth textures with sized formats (allowed with ARB_internalformat_query or ES 3.0) should be treated as GL_RED, while unsized formats (an existing feature) should be treated as GL_INTENSITY for compatibility with

Re: [Mesa-dev] [PATCH] intel: callocing a 32 byte temp is silly, so don't

2013-01-23 Thread Anuj Phogat
On Thu, Jan 24, 2013 at 10:06 AM, Ian Romanick wrote: > From: Ian Romanick > > I believe that the size used to vary, so the dynamic allocation is > necessary. > > Signed-off-by: Ian Romanick > --- > src/mesa/drivers/dri/intel/intel_context.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 dele

Re: [Mesa-dev] [PATCH 12/32] glsl: Add ir_variable::interface_type field

2013-01-23 Thread Ian Romanick
On 01/23/2013 10:07 PM, Paul Berry wrote: On 22 January 2013 00:52, Ian Romanick mailto:i...@freedesktop.org>> wrote: From: Ian Romanick mailto:ian.d.roman...@intel.com>> For variables that are in an interface block or are an instance of an interface block, this is the GLSL_TYPE_INT

[Mesa-dev] [PATCH] intel: callocing a 32 byte temp is silly, so don't

2013-01-23 Thread Ian Romanick
From: Ian Romanick I believe that the size used to vary, so the dynamic allocation is necessary. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/intel/intel_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/sr

Re: [Mesa-dev] [PATCH 20/32] glsl: Recurs into uniform blocks just like uniform structures

2013-01-23 Thread Paul Berry
On 23 January 2013 11:45, Ian Romanick wrote: > On 01/23/2013 01:32 PM, Carl Worth wrote: > >> Ian Romanick writes: >> >>> From: Ian Romanick >>> >> >> Misspelled "recurse" as "recurs" above. >> > > That's what I thought, but my spell checker assured me that recurse is > wrong. I think you sh

Re: [Mesa-dev] [PATCH 19/32] glsl: Handle instance array declarations

2013-01-23 Thread Paul Berry
On 22 January 2013 00:52, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/glsl/ast_to_hir.cpp | 17 ++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp > index d485bc8..c922

Re: [Mesa-dev] [PATCH 16/32] glsl: Modify uniform_field_visitor::visit_field to take a row_major parameter

2013-01-23 Thread Paul Berry
On 22 January 2013 00:52, Ian Romanick wrote: > From: Ian Romanick > > Not used yet, but the UBO layout visitor will use this. > > Signed-off-by: Ian Romanick > --- > src/glsl/link_uniforms.cpp | 15 ++- > src/glsl/linker.h | 4 +++- > src/mesa/program/ir_to_mes

Re: [Mesa-dev] [PATCH 15/32] glsl: Modify uniform_field_visitor::recursion to take a row_major parameter

2013-01-23 Thread Paul Berry
On 22 January 2013 00:52, Ian Romanick wrote: > From: Ian Romanick > > Not used yet, but the UBO layout visitor will use this. > > Signed-off-by: Ian Romanick > --- > src/glsl/link_uniforms.cpp | 10 ++ > src/glsl/linker.h | 3 ++- > 2 files changed, 8 insertions(+), 5 deleti

Re: [Mesa-dev] [PATCH] i965/vs/gen7: Emit code for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Eric Anholt
Chad Versace writes: > +void > +vec4_visitor::emit_unpack_half_2x16(dst_reg dst, src_reg src0) > +{ > + if (intel->gen < 7) > + assert(!"ir_unop_unpack_half_2x16 should be lowered"); > + > + assert(dst.type == BRW_REGISTER_TYPE_F); > + assert(src0.type == BRW_REGISTER_TYPE_UD); > + > +

Re: [Mesa-dev] [PATCH 14/32] glsl: Add a predicate to determine whether a variable is an interface block

2013-01-23 Thread Paul Berry
On 22 January 2013 00:52, Ian Romanick wrote: > From: Ian Romanick > > For the first declaration below, there will be an ir_variable named > "instance" whose type and whose instance_type will be the same > glsl_type. For the second declaration, there will be an ir_variable > named "f" whose typ

Re: [Mesa-dev] [PATCH 12/32] glsl: Add ir_variable::interface_type field

2013-01-23 Thread Paul Berry
On 22 January 2013 00:52, Ian Romanick wrote: > From: Ian Romanick > > For variables that are in an interface block or are an instance of an > interface block, this is the GLSL_TYPE_INTERFACE type for that block. > > Convert the ir_variable::is_in_uniform_block method added in the > previous com

Re: [Mesa-dev] [PATCH 10/32] glsl: Generate an interface type for uniform blocks

2013-01-23 Thread Paul Berry
On 22 January 2013 00:52, Ian Romanick wrote: > From: Ian Romanick > > If the block has an instance name, add the instance name to the symbol > table instead of the individual fields. > > Fixes the piglit test interface-name-access-without-interface-name.vert > for real. > > Signed-off-by: Ian R

Re: [Mesa-dev] [PATCH] i965/fs/gen7: Emit code for GLSL 3.00 pack/unpack operations (v3)

2013-01-23 Thread Eric Anholt
Chad Versace writes: > diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp > b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp > index 324e665..9b54796 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp > @@ -923,6 +923,96 @@ fs_generator::gene

[Mesa-dev] [PATCH] i965/vs/gen7: Emit code for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Chad Versace
WARNING: This patch emits VS code that violates documented hardware restrictions and then foolishly relies on the undocumented behavior that results from violating those restrictions. v2: Explain undocumented hardware behavior. Improve comments. CC: Eric Anholt CC: Paul Berry Reviewed-by: Ian R

[Mesa-dev] [PATCH] i965/fs/gen7: Emit code for GLSL 3.00 pack/unpack operations (v3)

2013-01-23 Thread Chad Versace
v2: Remove lewd comment. [for idr] v3: - Optimize away tmp register for packHalf2x16. [for anholt, paul] - Improve comments. [for anholt, paul] - Reduce near-duplicate code by removing vec4_visitor emit_pack/unpack methods. [for chadv] CC: Eric Anholt CC: Paul Berry Paul Berry Revi

[Mesa-dev] [PATCH] R600: Fold remaining CONST_COPY after expand pseudo inst

2013-01-23 Thread Vincent Lejeune
--- lib/Target/R600/AMDGPUTargetMachine.cpp | 2 +- lib/Target/R600/R600LowerConstCopy.cpp | 167 +--- 2 files changed, 157 insertions(+), 12 deletions(-) diff --git a/lib/Target/R600/AMDGPUTargetMachine.cpp b/lib/Target/R600/AMDGPUTargetMachine.cpp index 7b069e7..

[Mesa-dev] [PATCH] R600: Do not fold vector inst

2013-01-23 Thread Vincent Lejeune
--- lib/Target/R600/AMDILISelDAGToDAG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/R600/AMDILISelDAGToDAG.cpp b/lib/Target/R600/AMDILISelDAGToDAG.cpp index 84223f6..b08d39f 100644 --- a/lib/Target/R600/AMDILISelDAGToDAG.cpp +++ b/lib/Target/R600/AMDILISelDA

Re: [Mesa-dev] [PATCH 1/4] i965: Also examine _BaseFormat when deciding to perform xRGB_alpha fixups

2013-01-23 Thread Carl Worth
Michel Dänzer writes: > Are these tests unreliable themselves, or rather the driver paths > they're hitting? If it's the latter (a phenomenon which is well-known to > me with radeonsi :), neither approach seems appropriate. Yes, that's a good question. For glsl-fs-user-varying-ff, it was probing

[Mesa-dev] [PATCH] i965: Use GL_RED for DEPTH_TEXTURE_MODE in ES 3.0 for unsized formats.

2013-01-23 Thread Kenneth Graunke
Khronos has apparently decided that depth textures with sized formats (allowed with ARB_internalformat_query or ES 3.0) should be treated as GL_RED, while unsized formats (an existing feature) should be treated as GL_INTENSITY for compatibility with ES 2.0. Ian is proposing changes to ARB_internal

[Mesa-dev] [PATCH] i965: Correct gen6+ guardband calculation.

2013-01-23 Thread Eric Anholt
Too much attention was paid to the first paragraphs, and not enough to the last little note that "oh, by the way, the rendered things themselves still have to be clipped to just 8192 wide/high". Fixes GTF's clip.c test with 4096 or higher width on ivb, where one of the triangles got the upper half

Re: [Mesa-dev] [PATCH] i965/disasm: Fix horizontal stride of dest registers

2013-01-23 Thread Eric Anholt
Chad Versace writes: > The bug: The printed horizontal stride was the numerical value of the > BRW_HORIZONTAL_$N enum. > The fix: Translate the enum before printing. > > Note: This is a candidate for the stable releases. > Signed-off-by: Chad Versace > @@ -537,8 +539,8 @@ static int dest (FIL

Re: [Mesa-dev] [PATCH 09/32] glsl: Add GLSL_TYPE_INTERFACE

2013-01-23 Thread Paul Berry
\On 22 January 2013 00:52, Ian Romanick wrote: > From: Ian Romanick > > Interfaces are structurally identical to structures from the compiler's > point of view. They have some additional restrictions, and generally > GPUs use different instructions to access them. Using a different base > type

Re: [Mesa-dev] [PATCH 07/32] glsl: Refactor out processing of structure fields

2013-01-23 Thread Paul Berry
On 22 January 2013 00:51, Ian Romanick wrote: > From: Ian Romanick > > This will soon also be used for processing interface block fields. > > Signed-off-by: Ian Romanick > --- > src/glsl/ast_to_hir.cpp | 42 +- > 1 file changed, 29 insertions(+), 13 dele

Re: [Mesa-dev] [PATCH 06/32] glsl: Parse interface array size

2013-01-23 Thread Paul Berry
On 22 January 2013 00:51, Ian Romanick wrote: > From: Ian Romanick > > For now, just drop the value on the floor. > > Signed-off-by: Ian Romanick > --- > src/glsl/ast.h | 12 ++- > src/glsl/glsl_parser.yy | 55 > ++--- > 2 files chan

Re: [Mesa-dev] [PATCH 05/32] glsl: Parse non-array uniform block instance names in GLSL ES 3.00.

2013-01-23 Thread Paul Berry
On 22 January 2013 00:51, Ian Romanick wrote: > From: Kenneth Graunke > > In GLSL ES 3.00 (and GLSL 1.50), uniform blocks can have an associated > "instance name", which essentially namespaces the variables inside. > > This patch adds basic parsing for this new feature, but doesn't yet hook > it

Re: [Mesa-dev] [PATCH] r600g: improve inputs/interpolation handling with llvm backend

2013-01-23 Thread Tom Stellard
On Wed, Jan 23, 2013 at 09:30:02PM +0100, Vincent Lejeune wrote: > From: Vadim Girlin > > Get rid of special handling for reserved regs. > Use one intrinsic for all kinds of interpolation. > > Signed-off-by: Vadim Girlin > > v2[Vincent Lejeune]: Rebased against current master Reviewed-by: Tom

Re: [Mesa-dev] [PATCH] R600: improve inputs/interpolation handling

2013-01-23 Thread Tom Stellard
On Wed, Jan 23, 2013 at 09:28:34PM +0100, Vincent Lejeune wrote: > From: Vadim Girlin > > Use one intrinsic for all sorts of interpolation. > Use two separate unexpanded instructions to represent INTERP_XY and _ZW - > this will allow to eliminate one part if it's not used. > Track liveness of spe

Re: [Mesa-dev] [PATCH 1/4] i965: Also examine _BaseFormat when deciding to perform xRGB_alpha fixups

2013-01-23 Thread Carl Worth
Eric Anholt writes: > I think the _mesa_get_format_bits could just be dropped -- we shouldn't > have ALPHA_BITS==0 unless the baseformat has no alpha. Good point. I did have the same thought after the fact. > Patches 3 and 4 are: > > Reviewed-by: Eric Anholt Thanks. I'll change patch 1 as sugg

Re: [Mesa-dev] [PATCH 1/4] i965: Also examine _BaseFormat when deciding to perform xRGB_alpha fixups

2013-01-23 Thread Eric Anholt
Carl Worth writes: > The renderbuffer's Format field may have an alpha channel even when the > underlying _BaseFormat does not. This can happen when mesa chooses to use > RGBA16 for an RGB16 format, for example. > > So look at both fields when deciding whether to fixup the blend factors. > > Thi

Re: [Mesa-dev] [PATCH 2/2] R600: Do not fold vector inst

2013-01-23 Thread Tom Stellard
On Wed, Jan 23, 2013 at 09:23:03PM +0100, Vincent Lejeune wrote: > --- > lib/Target/R600/AMDILISelDAGToDAG.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/Target/R600/AMDILISelDAGToDAG.cpp > b/lib/Target/R600/AMDILISelDAGToDAG.cpp > index 84223f6..2cc4724 100644

Re: [Mesa-dev] [PATCH 1/2] R600: Fold remaining CONST_COPY after expand pseudo inst

2013-01-23 Thread Tom Stellard
On Wed, Jan 23, 2013 at 09:21:14PM +0100, Vincent Lejeune wrote: > v2:fix a bug with write masked inst I usually only version patches if I've already submitted a previous version to the mailiing list, so if you haven't submitted a version of this patch before you don't need this. If this is reall

Re: [Mesa-dev] [PATCH] R600: Consider bitcast when folding const_address node.

2013-01-23 Thread Tom Stellard
On Tue, Jan 22, 2013 at 10:19:14PM +0100, Vincent Lejeune wrote: Reviewed-by: Tom Stellard > --- > lib/Target/R600/AMDILISelDAGToDAG.cpp | 3 +++ > lib/Target/R600/R600ISelLowering.cpp | 8 > 2 files changed, 11 insertions(+) > > diff --git a/lib/Target/R600/AMDILISelDAGToDAG.cpp >

Re: [Mesa-dev] [PATCH (gles3) 15/20] glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Ian Romanick
On 01/23/2013 03:48 PM, Chad Versace wrote: On 01/23/2013 06:06 AM, Ian Romanick wrote: On 01/22/2013 10:36 PM, Matt Turner wrote: On Mon, Jan 21, 2013 at 12:49 AM, Chad Versace wrote: + /** +* \brief Lower a packSnorm2x16 expression. +* +* \param vec2_rval is packSnorm2x16's in

Re: [Mesa-dev] [PATCH 1/2] R600: handle loops to self in the structurizer v2

2013-01-23 Thread Tom Stellard
On Mon, Jan 21, 2013 at 10:28:56PM +0100, Christian König wrote: > v2: don't mess up other loops > Hi Christian, This patch regresses the glsl1-do-loop test, this test worked fine with v1 of the patch, but the structurizer creates an infinite loop with v2. See attached LLVM IR. -Tom > Signed

Re: [Mesa-dev] [PATCH (gles3) 15/20] glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Paul Berry
On 23 January 2013 12:44, Chad Versace wrote: > On 01/22/2013 09:19 PM, Paul Berry wrote: > > On 21 January 2013 00:49, Chad Versace > wrote: > > > >> Lower them to arithmetic and bit manipulation expressions. > >> > >> v2: > >> - Rewrite using ir_builder. [for idr] > >> - In lowering packHa

Re: [Mesa-dev] [PATCH (gles3) 15/20] glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Chad Versace
On 01/23/2013 06:06 AM, Ian Romanick wrote: > On 01/22/2013 10:36 PM, Matt Turner wrote: >> On Mon, Jan 21, 2013 at 12:49 AM, Chad Versace >> wrote: >>> + /** >>> +* \brief Lower a packSnorm2x16 expression. >>> +* >>> +* \param vec2_rval is packSnorm2x16's input >>> +* \return pa

Re: [Mesa-dev] [PATCH (gles3) 15/20] glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Chad Versace
On 01/22/2013 09:19 PM, Paul Berry wrote: > On 21 January 2013 00:49, Chad Versace wrote: > >> Lower them to arithmetic and bit manipulation expressions. >> >> v2: >> - Rewrite using ir_builder. [for idr] >> - In lowering packHalf2x16, don't truncate subnormal float16 values to >> zero. >>

Re: [Mesa-dev] thread safe llvmpipe

2013-01-23 Thread Rob Schneider
>> Which LLVM version where you using? The lp_bld_init.c behavior varies tremendously with LLVM version. LLVM version was 3.2 System was a Ivy Bridge Quadcore (so AVX would be the best vector ISA available on that machine) OS was Windows 7 64 Bit___ me

Re: [Mesa-dev] [PATCH (gles3) 15/20] glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Chad Versace
On 01/22/2013 07:36 PM, Matt Turner wrote: > On Mon, Jan 21, 2013 at 12:49 AM, Chad Versace > wrote: >> Lower them to arithmetic and bit manipulation expressions. >> >> v2: >> - Rewrite using ir_builder. [for idr] >> - In lowering packHalf2x16, don't truncate subnormal float16 values to >> ze

[Mesa-dev] [PATCH] r600g: improve inputs/interpolation handling with llvm backend

2013-01-23 Thread Vincent Lejeune
From: Vadim Girlin Get rid of special handling for reserved regs. Use one intrinsic for all kinds of interpolation. Signed-off-by: Vadim Girlin v2[Vincent Lejeune]: Rebased against current master --- src/gallium/drivers/r600/r600_llvm.c | 195 +++ src/gallium/d

[Mesa-dev] [PATCH] R600: improve inputs/interpolation handling

2013-01-23 Thread Vincent Lejeune
From: Vadim Girlin Use one intrinsic for all sorts of interpolation. Use two separate unexpanded instructions to represent INTERP_XY and _ZW - this will allow to eliminate one part if it's not used. Track liveness of special interpolation regs instead of reserving them - this will allow to reuse

[Mesa-dev] [PATCH 2/2] R600: Do not fold vector inst

2013-01-23 Thread Vincent Lejeune
--- lib/Target/R600/AMDILISelDAGToDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/R600/AMDILISelDAGToDAG.cpp b/lib/Target/R600/AMDILISelDAGToDAG.cpp index 84223f6..2cc4724 100644 --- a/lib/Target/R600/AMDILISelDAGToDAG.cpp +++ b/lib/Target/R600/AMDILISelDAGT

[Mesa-dev] [Bug 59777] New: [softpipe] piglit interpolation-noperspective-gl_BackColor-flat-distance regression

2013-01-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59777 Priority: medium Bug ID: 59777 Keywords: regression CC: bri...@vmware.com Assignee: mesa-dev@lists.freedesktop.org Summary: [softpipe] piglit interpolation-no

[Mesa-dev] [PATCH 1/2] R600: Fold remaining CONST_COPY after expand pseudo inst

2013-01-23 Thread Vincent Lejeune
v2:fix a bug with write masked inst --- lib/Target/R600/AMDGPUTargetMachine.cpp | 2 +- lib/Target/R600/R600LowerConstCopy.cpp | 164 +--- 2 files changed, 154 insertions(+), 12 deletions(-) diff --git a/lib/Target/R600/AMDGPUTargetMachine.cpp b/lib/Target/R600/AMD

Re: [Mesa-dev] [PATCH 03/32] linker: Refactor intra-stage block compatabililty testing

2013-01-23 Thread Carl Worth
Ian Romanick writes: > But that's functionally different. Right, my mistake. As is then: >> Reviewed-by: Carl Worth -Carl pgpCudR3n1Srw.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedeskto

Re: [Mesa-dev] [PATCH 20/32] glsl: Recurs into uniform blocks just like uniform structures

2013-01-23 Thread Ian Romanick
On 01/23/2013 01:32 PM, Carl Worth wrote: Ian Romanick writes: From: Ian Romanick Misspelled "recurse" as "recurs" above. That's what I thought, but my spell checker assured me that recurse is wrong. -Carl PS. While I'm here, the missing "why part" of the commit message here might sim

Re: [Mesa-dev] [PATCH 16/32] glsl: Modify uniform_field_visitor::visit_field to take a row_major parameter

2013-01-23 Thread Ian Romanick
On 01/23/2013 01:19 PM, Carl Worth wrote: Ian Romanick writes: @@ -454,7 +460,6 @@ link_update_uniform_buffer_variables(struct gl_shader *shader) for (unsigned j = 0; j < shader->UniformBlocks[i].NumUniforms; j++) { if (!strcmp(var->name, shader->UniformBlocks[i].Uniforms[

Re: [Mesa-dev] [PATCH 03/32] linker: Refactor intra-stage block compatabililty testing

2013-01-23 Thread Ian Romanick
On 01/23/2013 12:35 PM, Carl Worth wrote: Ian Romanick writes: +bool +link_uniform_blocks_are_compatible(const gl_uniform_block *a, + const gl_uniform_block *b) +{ + assert(strcmp(a->Name, b->Name) == 0); ... + if (strcmp(old_block->Name, new_block->Nam

[Mesa-dev] [PATCH 8/8] i965: Pass in the glarray to get_surface_type.

2013-01-23 Thread Eric Anholt
Dereffing all the values in the two callers was just pointless, and the function isn't inlined so there was actual code impact. --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 51 --- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 7/8] i965: Remove nonsense comment.

2013-01-23 Thread Eric Anholt
vb.inputs_read has never been a thing, even in the initial import. --- src/mesa/drivers/dri/i965/brw_draw_upload.c |2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 2a3d767..78ff61f 100644 --- a/

[Mesa-dev] [PATCH 5/8] i965: reuse _mesa_sizeof_type for index buffer types.

2013-01-23 Thread Eric Anholt
The core Mesa code has just one more case than this (GL_BITMAP), so I don't see any cause to special-case it. --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 26 ++ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.

[Mesa-dev] [PATCH 6/8] i965: Remove NDEBUG undef that was snuck in.

2013-01-23 Thread Eric Anholt
If you want debug, set --enable-debug in your config flags. --- src/mesa/drivers/dri/i965/brw_draw_upload.c |2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 1c8ade5..2a3d767 100644 --- a/src/mes

[Mesa-dev] [PATCH 4/8] i965: Reuse precalculated ib_type_size value.

2013-01-23 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_draw_upload.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 43848f7..0775148 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/sr

[Mesa-dev] [PATCH 3/8] i965: Drop debug check for knowing the size of a type.

2013-01-23 Thread Eric Anholt
This was added in b93684f5f311f89c965960ab42bfea71a397b180, but there's no need for it -- get_size has to succeed, and it has an assert for us in debug builds. --- src/mesa/drivers/dri/i965/brw_draw_upload.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/drivers/

[Mesa-dev] [PATCH 1/8] i965: Use the glarray _ElementSize that Mesa tracks for us.

2013-01-23 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_context.h |2 -- src/mesa/drivers/dri/i965/brw_draw_upload.c | 10 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index f3a3efe..620f09f 100644

[Mesa-dev] [PATCH 2/8] i965: Stop worrying about alignment of vertex data.

2013-01-23 Thread Eric Anholt
For our current types, the required alignment is actually just 1 byte. When we get doubles, we have to worry (those have to be aligned to the natural size), but we don't have doubles yet and they'll just be a special case. --- src/mesa/drivers/dri/i965/brw_draw_upload.c |8 +--- 1 file cha

[Mesa-dev] i965: brw_draw_upload.c cleanup

2013-01-23 Thread Eric Anholt
This removes some bad code that got spammed into the hottest path of the driver over time, and makes use of a few new things that didn't exist when the driver was originally written. Results for glb21 offscreen: x before + after +---

[Mesa-dev] [PATCH] i965/disasm: Fix horizontal stride of dest registers

2013-01-23 Thread Chad Versace
The bug: The printed horizontal stride was the numerical value of the BRW_HORIZONTAL_$N enum. The fix: Translate the enum before printing. Note: This is a candidate for the stable releases. Signed-off-by: Chad Versace --- src/mesa/drivers/dri/i965/brw_disasm.c | 8 +--- 1 file changed, 5 i

[Mesa-dev] [PATCH demos] demos: Bump version to 9.0.0

2013-01-23 Thread Andreas Boll
--- I'd like to do a new mesa-demos release. The main motivation is the newly introduced OpenGL core profile support for glxinfo. CMakeLists.txt |4 ++-- configure.ac |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 484eea6..5

Re: [Mesa-dev] [PATCH (gles3) 15/20] glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Matt Turner
On Wed, Jan 23, 2013 at 6:06 AM, Ian Romanick wrote: > On 01/22/2013 10:36 PM, Matt Turner wrote: >> >> On Mon, Jan 21, 2013 at 12:49 AM, Chad Versace >> wrote: >>> >>> + /** >>> +* \brief Lower a packSnorm2x16 expression. >>> +* >>> +* \param vec2_rval is packSnorm2x16's input >>>

Re: [Mesa-dev] [PATCH 00/32] UBOs for OpenGL ES 3.0

2013-01-23 Thread Carl Worth
Ian Romanick writes: > This is the last of the UBO instance and array instance rework for the > linker. It's a giant pile of patches, so let me explain what's going > on. Hi Ian, I just read through what I could of the patch series. You'll see that I emailed out some tiny nit-picky things about

Re: [Mesa-dev] [PATCH 1/4] i965: Also examine _BaseFormat when deciding to perform xRGB_alpha fixups

2013-01-23 Thread Eric Anholt
Carl Worth writes: > Ian Romanick writes: >> These tests intermittently pass / fail for me for quite some time (since >> always?). > > Oh, well in that case I feel better about my patch series. > > We should come up with a better plan for unreliable tests in piglit. It > seems that the current

Re: [Mesa-dev] [PATCH 1/4] i965: Also examine _BaseFormat when deciding to perform xRGB_alpha fixups

2013-01-23 Thread Eric Anholt
Carl Worth writes: > Carl Worth writes: >> Note: The test results mentioned here, (and in the following patches), expect >> the fixes I recently submitted to the fbo-* tests in piglit. That series >> consists of 5 patches starting with: > > While developing this patch series, I did most of my te

Re: [Mesa-dev] (intel) looking for opinions on how to deal with UMS/CMS differences in ARB_texture_multisample

2013-01-23 Thread Eric Anholt
Paul Berry writes: > Cc-ing mesa-dev--I don't want to make this design decision in a vacuum. > > For those entering the conversation, the question on the table is how to > make ARB_texture_multisample deal with the fact that on Gen7, compressed > (CMS) and non-compressed (UMS or IMS) multisampled

Re: [Mesa-dev] [PATCH 20/32] glsl: Recurs into uniform blocks just like uniform structures

2013-01-23 Thread Carl Worth
Ian Romanick writes: > From: Ian Romanick Misspelled "recurse" as "recurs" above. -Carl PS. While I'm here, the missing "why part" of the commit message here might simply be: The only difference is how to access the name. This is one of the cases where there's not really much rationa

Re: [Mesa-dev] [PATCH V5 7/7] intel: implement create image from texture

2013-01-23 Thread Eric Anholt
Abdiel Janulgue writes: > On Tuesday, January 22, 2013 11:02:34 AM Eric Anholt wrote: > >> 128 pixels of 32bpp is a tile width, and 128 pixels high of that is 16 >> tiles. The values I see this function having are: >> >> mask_x = 127 >> mask_y = 15 >> draw_x = 0 >> draw_y = 128 >> image->offset

Re: [Mesa-dev] [PATCH 18/32] glsl: Track blocks in the symbol table using the glsl_type instead of the gl_uniform_block

2013-01-23 Thread Carl Worth
Ian Romanick writes: > From: Ian Romanick Missing the "why" part of the commit message again. Does this commit change the behavior? Or is it just a cleanup that is made possible by earlier commits? Enquiring minds want to know... -Carl pgphdJxMfInKM.pgp Description: PGP signature ___

Re: [Mesa-dev] [PATCH 16/32] glsl: Modify uniform_field_visitor::visit_field to take a row_major parameter

2013-01-23 Thread Carl Worth
Ian Romanick writes: > @@ -454,7 +460,6 @@ link_update_uniform_buffer_variables(struct gl_shader > *shader) >for (unsigned j = 0; j < shader->UniformBlocks[i].NumUniforms; j++) { > if (!strcmp(var->name, shader->UniformBlocks[i].Uniforms[j].Name)) { > found = true;

Re: [Mesa-dev] [PATCH] build: Enable cross compiling assembly by building gen_matypes for the host

2013-01-23 Thread Jose Fonseca
- Original Message - > Matt Turner writes: > > > Fixes https://bugs.freedesktop.org/show_bug.cgi?id=49360 > > But gen_matypes on the host will print the wrong structure offsets > and > you'll build garbage code for the target. Yep. It's probably just disabling the subset of assembly c

Re: [Mesa-dev] [PATCH] build: Enable cross compiling assembly by building gen_matypes for the host

2013-01-23 Thread Eric Anholt
Matt Turner writes: > Fixes https://bugs.freedesktop.org/show_bug.cgi?id=49360 But gen_matypes on the host will print the wrong structure offsets and you'll build garbage code for the target. pgpU5LTWZxOq0.pgp Description: PGP signature ___ mesa-dev

Re: [Mesa-dev] [PATCH 06/32] glsl: Parse interface array size

2013-01-23 Thread Carl Worth
Ian Romanick writes: > From: Ian Romanick > > For now, just drop the value on the floor. And this gets picked up again in patch 19/32? It would be nice if the commit messages for those two patches referenced each other a bit more clearly, (just to make it easier to review that nothing got droppe

Re: [Mesa-dev] [PATCH 04/32] glsl: Refactor uniform block parser rules.

2013-01-23 Thread Carl Worth
Ian Romanick writes: > From: Kenneth Graunke > > The existing code has a lot of duplication; the only difference between > the two cases is whether we merge in an additional layout qualifier. I'm always in favor of a simpler grammar. Thanks! Reviewed-by: Carl Worth -Carl -- carl.d.wo...@int

Re: [Mesa-dev] [PATCH 03/32] linker: Refactor intra-stage block compatabililty testing

2013-01-23 Thread Carl Worth
Ian Romanick writes: > +bool > +link_uniform_blocks_are_compatible(const gl_uniform_block *a, > +const gl_uniform_block *b) > +{ > + assert(strcmp(a->Name, b->Name) == 0); ... > + if (strcmp(old_block->Name, new_block->Name) == 0) > + return link_uniform

Re: [Mesa-dev] [PATCH 02/32] mesa: Track the packing mode of a UBO in gl_uniform_buffer

2013-01-23 Thread Carl Worth
Ian Romanick writes: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- I really prefer not to see commits with only the single-line summary for a commit message. The single-line summary is perfect for describing "what" the patch does. And the above is a great example. The rest of the

[Mesa-dev] [PATCH 2/2] glsl: use glsl_strtof() instead of glsl_strtod()

2013-01-23 Thread Brian Paul
Since the result of those calls is always assigned to a float. --- src/glsl/glsl_lexer.ll| 10 +- src/glsl/s_expression.cpp |6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index 2f66c58..ddc9f80 100644 ---

[Mesa-dev] [PATCH 1/2] glsl: add new glsl_strtof() function

2013-01-23 Thread Brian Paul
Note, we could alternately implement this in terms of glsl_strtod() with a (float) cast. --- src/glsl/strtod.c | 22 ++ src/glsl/strtod.h |3 +++ 2 files changed, 25 insertions(+), 0 deletions(-) diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c index 47c1f0e..46f4dc5 1

Re: [Mesa-dev] [PATCH 1/6] glsl: Eliminate ambiguity between function ins/outs and shader ins/outs

2013-01-23 Thread Paul Berry
On 23 January 2013 09:01, Carl Worth wrote: > Paul Berry writes: > > This patch replaces the three ir_variable_mode enums: > ... > > with the following five: > > In my review of this patch, I'm not familiar with the code enough to > know a priori which things should become "var" and which should

Re: [Mesa-dev] [PATCH 11/11] glsl: add cast to silence MSVC double->float assignment warning

2013-01-23 Thread Brian Paul
On 01/23/2013 07:25 AM, Ian Romanick wrote: On 01/22/2013 07:51 PM, Brian Paul wrote: --- src/glsl/s_expression.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp index 57de9d3..52fa7ae 100644 --- a/src/glsl/s_expressio

Re: [Mesa-dev] [PATCH 1/6] glsl: Eliminate ambiguity between function ins/outs and shader ins/outs

2013-01-23 Thread Carl Worth
Paul Berry writes: > This patch replaces the three ir_variable_mode enums: ... > with the following five: In my review of this patch, I'm not familiar with the code enough to know a priori which things should become "var" and which should be come "function". I did look for obvious cues (such as a

Re: [Mesa-dev] [PATCH 3/6] glsl: Generalize compute_packing_order for varying structs.

2013-01-23 Thread Paul Berry
On 23 January 2013 08:36, Ian Romanick wrote: > On 01/23/2013 11:16 AM, Paul Berry wrote: > >> On 23 January 2013 07:38, Ian Romanick > > wrote: >> >> On 01/21/2013 05:16 PM, Paul Berry wrote: >> >> This patch paves the way for allowing varying structs by

Re: [Mesa-dev] [PATCH 3/6] glsl: Generalize compute_packing_order for varying structs.

2013-01-23 Thread Ian Romanick
On 01/23/2013 11:16 AM, Paul Berry wrote: On 23 January 2013 07:38, Ian Romanick mailto:i...@freedesktop.org>> wrote: On 01/21/2013 05:16 PM, Paul Berry wrote: This patch paves the way for allowing varying structs by generalizing varying_matches::compute___packing_or

Re: [Mesa-dev] [PATCH 1/4] i965: Also examine _BaseFormat when deciding to perform xRGB_alpha fixups

2013-01-23 Thread Michel Dänzer
On Mit, 2013-01-23 at 08:17 -0800, Carl Worth wrote: > Ian Romanick writes: > > These tests intermittently pass / fail for me for quite some time (since > > always?). > > Oh, well in that case I feel better about my patch series. > > We should come up with a better plan for unreliable tests in

Re: [Mesa-dev] [PATCH 3/6] glsl: Generalize compute_packing_order for varying structs.

2013-01-23 Thread Paul Berry
On 23 January 2013 07:38, Ian Romanick wrote: > On 01/21/2013 05:16 PM, Paul Berry wrote: > >> This patch paves the way for allowing varying structs by generalizing >> varying_matches::compute_**packing_order to handle any type of varying. >> Previously, we packed in the order (vec4, vec2, float,

Re: [Mesa-dev] [PATCH 1/4] i965: Also examine _BaseFormat when deciding to perform xRGB_alpha fixups

2013-01-23 Thread Carl Worth
Ian Romanick writes: > These tests intermittently pass / fail for me for quite some time (since > always?). Oh, well in that case I feel better about my patch series. We should come up with a better plan for unreliable tests in piglit. It seems that the current approach is developing human filt

Re: [Mesa-dev] [PATCH (gles3) 20/20] i965/fs/gen7: Emit code for GLSL 3.00 pack/unpack operations (v2)

2013-01-23 Thread Paul Berry
On 21 January 2013 00:49, Chad Versace wrote: > v2: Remove lewd comment [for idr]. > > Signed-off-by: Chad Versace > I don't have any comments on this patch beyond what Eric already said. Hopefully I'll be able to give a pretty quick R-b once I see the re-spin on this patch. And with that I th

Re: [Mesa-dev] [PATCH (gles3) 19/20] i965/vs/gen7: Emit code for GLSL ES 3.00 pack/unpack operations

2013-01-23 Thread Paul Berry
On 21 January 2013 00:49, Chad Versace wrote: > Signed-off-by: Chad Versace > --- > src/mesa/drivers/dri/i965/brw_vec4.h | 3 + > src/mesa/drivers/dri/i965/brw_vec4_emit.cpp| 8 ++ > src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 155 > + > 3 files ch

Re: [Mesa-dev] [PATCH 05/11] st/mesa: silence assorted MSVC warnings

2013-01-23 Thread Brian Paul
On 01/23/2013 07:18 AM, Ian Romanick wrote: On 01/22/2013 07:51 PM, Brian Paul wrote: --- src/mesa/state_tracker/st_cb_drawpixels.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c inde

Re: [Mesa-dev] [PATCH 3/6] glsl: Generalize compute_packing_order for varying structs.

2013-01-23 Thread Ian Romanick
On 01/21/2013 05:16 PM, Paul Berry wrote: This patch paves the way for allowing varying structs by generalizing varying_matches::compute_packing_order to handle any type of varying. Previously, we packed in the order (vec4, vec2, float, vec3), with matrices being packed according to the size of t

Re: [Mesa-dev] [PATCH 1/4] i965: Also examine _BaseFormat when deciding to perform xRGB_alpha fixups

2013-01-23 Thread Ian Romanick
On 01/22/2013 05:54 PM, Carl Worth wrote: Carl Worth writes: Note: The test results mentioned here, (and in the following patches), expect the fixes I recently submitted to the fbo-* tests in piglit. That series consists of 5 patches starting with: While developing this patch series, I did mo

Re: [Mesa-dev] (intel) looking for opinions on how to deal with UMS/CMS differences in ARB_texture_multisample

2013-01-23 Thread Paul Berry
Cc-ing mesa-dev--I don't want to make this design decision in a vacuum. For those entering the conversation, the question on the table is how to make ARB_texture_multisample deal with the fact that on Gen7, compressed (CMS) and non-compressed (UMS or IMS) multisampled surfaces require a different

Re: [Mesa-dev] [PATCH 11/11] glsl: add cast to silence MSVC double->float assignment warning

2013-01-23 Thread Ian Romanick
On 01/22/2013 07:51 PM, Brian Paul wrote: --- src/glsl/s_expression.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp index 57de9d3..52fa7ae 100644 --- a/src/glsl/s_expression.cpp +++ b/src/glsl/s_expression.cpp

Re: [Mesa-dev] [PATCH 05/11] st/mesa: silence assorted MSVC warnings

2013-01-23 Thread Ian Romanick
On 01/22/2013 07:51 PM, Brian Paul wrote: --- src/mesa/state_tracker/st_cb_drawpixels.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index ff8a9dc..4d9c825 100644 --- a/src/m

Re: [Mesa-dev] [PATCH (gles3) 15/20] glsl: Add lowering pass for GLSL ES 3.00 pack/unpack operations (v2)

2013-01-23 Thread Ian Romanick
On 01/22/2013 10:36 PM, Matt Turner wrote: On Mon, Jan 21, 2013 at 12:49 AM, Chad Versace wrote: + /** +* \brief Lower a packSnorm2x16 expression. +* +* \param vec2_rval is packSnorm2x16's input +* \return packSnorm2x16's output as a uint rvalue +*/ + ir_rvalue* + lowe

Re: [Mesa-dev] [PATCH V5 7/7] intel: implement create image from texture

2013-01-23 Thread Abdiel Janulgue
On Tuesday, January 22, 2013 11:02:34 AM Eric Anholt wrote: > 128 pixels of 32bpp is a tile width, and 128 pixels high of that is 16 > tiles. The values I see this function having are: > > mask_x = 127 > mask_y = 15 > draw_x = 0 > draw_y = 128 > image->offset = (16 * 4096) > > So when we go to

Re: [Mesa-dev] [PATCH 11/11] glsl: add cast to silence MSVC double->float assignment warning

2013-01-23 Thread Jose Fonseca
Looks good AFAICT. Reviewed-by: Jose Fonseca - Original Message - > --- > src/glsl/s_expression.cpp |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp > index 57de9d3..52fa7ae 100644 > --- a/src/glsl/s_ex

  1   2   >