[Mesa-dev] [PATCH V3 4/8] glsl: only call mark_max_array if we are assigning an array

2014-01-22 Thread Timothy Arceri
This change does not help fix or prevent any bugs it just seems reasonable to do Signed-off-by: Timothy Arceri --- src/glsl/ast_to_hir.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index e25cba3..be12f97 100644 ---

[Mesa-dev] [PATCH V3 0/8] glsl: Start implementing ARB_arrays_of_arrays

2014-01-22 Thread Timothy Arceri
This is a first pass at implementing the ARB_arrays_of_arrays extension in Mesa. This series allows the glsl front-end to parse and compile shaders that don't require linking of arrays of arrays e.g. multi dimensional uniforms. I'm sending this extension in parts because my time working on this i

[Mesa-dev] [PATCH V3 2/8] glsl: Add arrays_of_arrays to yacc definition

2014-01-22 Thread Timothy Arceri
Signed-off-by: Timothy Arceri --- src/glsl/glsl_parser.yy | 128 +--- 1 file changed, 56 insertions(+), 72 deletions(-) diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index 5451b76..2786e92 100644 --- a/src/glsl/glsl_parser.yy +++ b/src

[Mesa-dev] [PATCH V3 1/8] mesa: Add ARB_arrays_of_arrays

2014-01-22 Thread Timothy Arceri
Signed-off-by: Timothy Arceri Reviewed-by: Paul Berry --- src/glsl/glcpp/glcpp-parse.y | 3 +++ src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + 3 files changed, 5 insertions(+) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 55c4981..4df69a

[Mesa-dev] [PATCH V3 8/8] docs: Mark ARB_arrays_of_arrays as started

2014-01-22 Thread Timothy Arceri
Signed-off-by: Timothy Arceri Reviewed-by: Paul Berry --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 0672ec7..9f756e9 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -142,7 +142,7 @@ GL 4.2: GL 4.3: GLSL 4.3

[Mesa-dev] [PATCH V3 5/8] glsl: Allow arrays of arrays as input to vertex shader

2014-01-22 Thread Timothy Arceri
Signed-off-by: Timothy Arceri Reviewed-by: Paul Berry --- src/glsl/ast_to_hir.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index be12f97..f13ac51 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @

[Mesa-dev] [PATCH V3 7/8] glsl: remove remaining is_array variables

2014-01-22 Thread Timothy Arceri
Previously the reason we needed is_array was because we used array_size == NULL to represent both non-arrays and unsized arrays. Now that we use a non-NULL array_specifier to represent an unsized array, is_array is redundant. Signed-off-by: Timothy Arceri --- src/glsl/ast.h |

[Mesa-dev] [PATCH V3 6/8] glsl: create type name for arrays of arrays

2014-01-22 Thread Timothy Arceri
We need to insert outermost dimensions in the correct spot otherwise the dimension order will be backwards Signed-off-by: Timothy Arceri Reviewed-by: Paul Berry --- src/glsl/glsl_types.cpp | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/glsl/glsl_types

[Mesa-dev] [PATCH V3 3/8] glsl: Add array specifier to ast code

2014-01-22 Thread Timothy Arceri
Signed-off-by: Timothy Arceri --- src/glsl/ast.h | 66 +++ src/glsl/ast_array_index.cpp| 13 +++ src/glsl/ast_to_hir.cpp | 172 src/glsl/ast_type.cpp | 8 +- src/glsl/glsl_parser_extras.cpp | 19 ++---

Re: [Mesa-dev] [PATCH] glsl: Simplify aggregate type inference to prepare for ARB_arrays_of_arrays.

2014-01-22 Thread Timothy Arceri
On Tue, 2014-01-21 at 16:14 -0800, Paul Berry wrote: > Timothy: I was inspired to write this patch by the complexities you > encountered during "[PATCH V2 5/8] glsl: Aggregate initializer support > for arrays of array". Glad I could help spark some inspiration. > Can you try rebasing your serie

Re: [Mesa-dev] [PATCH] gallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formats

2014-01-22 Thread Marek Olšák
There is only one caller, which is fixed by this patch. Marek On Wed, Jan 22, 2014 at 12:52 AM, Brian Paul wrote: > On 01/21/2014 02:21 PM, Marek Olšák wrote: >> >> From: Marek Olšák >> >> This fixes a serious regression introduced >> in 4e549ddb500cf677b6fa16d9ebdfa67cc23da097. >> >> Cc: 9.2 1

Re: [Mesa-dev] [PATCH v3 1/1] clover: Don't crash on NULL global buffer objects.

2014-01-22 Thread Francisco Jerez
Jan Vesely writes: > On Sat, 2014-01-18 at 13:34 +0100, Francisco Jerez wrote: >> Jan Vesely writes: >> >> > Specs say "If the argument is a buffer object, the arg_value >> > pointer can be NULL or point to a NULL value in which case a NULL >> > value will be used as the value for the argument

Re: [Mesa-dev] [PATCH] glsl: Add image type to the GLSL IR.

2014-01-22 Thread Francisco Jerez
Paul Berry writes: > On 15 January 2014 11:42, Francisco Jerez wrote: > >> v2: Reuse the glsl_sampler_dim enum for images. Reuse the >> glsl_type::sampler_* fields instead of creating new ones specific >> to image types. Reuse the same constructor as for samplers adding >> a new 'b

[Mesa-dev] [Bug 73672] Half Life 2 in Wine is broken since 4e549ddb

2014-01-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=73672 --- Comment #21 from Benjamin Bellec --- I confirm that the patch works. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.

[Mesa-dev] [Bug 73854] GoldSrc and Source Games Segfault on Launch

2014-01-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=73854 --- Comment #20 from Benjamin Bellec --- (In reply to comment #18) > Created attachment 92554 [details] [review] > glx: link loader when building with dri3 > > While Keith's patch does work on the overall issue with libudev, we should > not link

Re: [Mesa-dev] [PATCH] glsl: Add image type to the GLSL IR.

2014-01-22 Thread Paul Berry
On 22 January 2014 04:50, Francisco Jerez wrote: > Paul Berry writes: > > > On 15 January 2014 11:42, Francisco Jerez wrote: > > > >> v2: Reuse the glsl_sampler_dim enum for images. Reuse the > >> glsl_type::sampler_* fields instead of creating new ones specific > >> to image types. R

[Mesa-dev] Atomics not really atomic?

2014-01-22 Thread Lauri Kasanen
Hi, The two atomic helpers in u_atomic.h, p_atomic_set and p_atomic_read, are just passthrough macros, without the atomic guarantees. Why? I believe I saw some corruption because of this, where a 64-bit write on a 32-bit platform may not be naturally atomic. - Lauri

[Mesa-dev] [PATCH 1/2] mesa: Ensure that transform feedback refers to the correct program.

2014-01-22 Thread Paul Berry
Previous to this patch, the _mesa_{Begin,Resume}TransformFeedback functions were using ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] to find the program that would be the source of transform feedback data. This isn't correct--if there's a geometry shader present it should be ctx->Shader.CurrentPro

[Mesa-dev] [PATCH 2/2] i965/gen7: Use to the correct program when uploading transform feedback state.

2014-01-22 Thread Paul Berry
Transform feedback may come from either the geometry shader or the vertex shader, so we can't use ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] to find the current post-link transform feedback information. Fortunately we can use ctx->TransformFeedback.CurrentObject->shader_program. --- src/mesa/

Re: [Mesa-dev] Atomics not really atomic?

2014-01-22 Thread Maarten Lankhorst
op 22-01-14 14:44, Lauri Kasanen schreef: Hi, The two atomic helpers in u_atomic.h, p_atomic_set and p_atomic_read, are just passthrough macros, without the atomic guarantees. Why? I believe I saw some corruption because of this, where a 64-bit write on a 32-bit platform may not be naturally at

[Mesa-dev] [Bug 73934] New: Function roundf undeclared in textparam.c when building with MSVC11

2014-01-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=73934 Priority: medium Bug ID: 73934 Assignee: mesa-dev@lists.freedesktop.org Summary: Function roundf undeclared in textparam.c when building with MSVC11 Severity: normal Clas

[Mesa-dev] [Bug 73934] Function roundf undeclared in textparam.c when building with MSVC11

2014-01-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=73934 --- Comment #1 from Grigori Goronzy --- MSVC has bad C99 support. roundf was introduced by C99. You can easily implement roundf yourself, though. Calling floorf or ceilf according to sign of the number should do it. -- You are receiving this ma

Re: [Mesa-dev] [PATCH 05/18] glapi: Add infrastructure for ARB_multi_bind

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: --- src/mapi/glapi/gen/ARB_multi_bind.xml | 53 +++ src/mapi/glapi/gen/Makefile.am |1 + src/mapi/glapi/gen/gl_API.xml |4 +++ src/mesa/main/bufferobj.c | 13 s

Re: [Mesa-dev] [PATCH 04/18] mesa: Add functions for doing unlocked hash table lookups

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: This patch adds functions for locking/unlocking the mutex, along with _mesa_HashLookupWithoutLocking() and _mesa_HashInsertWithoutLocking() that do lookups and insertions without locking the mutex. These functions will be used by the ARB_multi_bind

Re: [Mesa-dev] [PATCH 08/18] mesa: Implement glBindTextures()

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: --- src/mesa/main/texobj.c | 121 1 file changed, 121 insertions(+) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index c9fe11d..2ff3f9d 100644 --- a/src/mesa/main/texobj.c +++ b/sr

Re: [Mesa-dev] [PATCH] rtasm: deal with size overflows by casting to ptrdiff_t

2014-01-22 Thread Brian Paul
On 01/21/2014 06:37 PM, Ilia Mirkin wrote: This was discovered as a result of the draw-elements-base-vertex-neg piglit test, which passes very negative offsets in, followed up by large indices. The nouveau code correctly adjusts the pointer, but the transfer code needs to do the proper inverse co

Re: [Mesa-dev] [PATCH 00/18] Implement GL_ARB_multi_bind

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: So here is my take on GL_ARB_multi_bind. I tried to come up with names for the new hash table functions that don't suggest that they should be used to do unlocked insertions/lookups. I'm not entirely happy with the ones I came up with though, so I'm

Re: [Mesa-dev] [PATCH 03/18] mesa: Optimize unbind_texobj_from_texunits()

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: The texture can only be bound to the index that corresponds to its target, so there is no need to loop over all possible indices for every unit and checking if the texture is bound to it. --- src/mesa/main/texobj.c | 20 ++-- 1 f

Re: [Mesa-dev] [PATCH 01/18] mesa: Store the target index in gl_texture_object

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: This will be used by glBindTextures() so we don't have to look it up for each texture. --- src/mesa/main/mtypes.h |1 + src/mesa/main/texobj.c |2 ++ 2 files changed, 3 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mt

Re: [Mesa-dev] [PATCH 10/18] mesa: Add helper functions for looking up multiple buffers

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: --- src/mesa/main/bufferobj.c | 66 + src/mesa/main/bufferobj.h | 14 ++ 2 files changed, 80 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 4094e31..

Re: [Mesa-dev] [PATCH 06/18] mesa: Implement glBindSamplers()

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: --- src/mesa/main/samplerobj.c | 115 1 file changed, 115 insertions(+) diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 077ee9e..f34d95d 100644 --- a/src/mesa/main/samplerob

Re: [Mesa-dev] [PATCH 02/18] mesa: Add a _BoundTextures field in gl_texture_unit

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: This will be used by glBindTextures() when unbinding textures, to avoid having to loop over all the targets. --- src/mesa/main/mtypes.h |3 +++ src/mesa/main/texobj.c |6 ++ src/mesa/main/texstate.c |3 +++ 3 files changed, 1

Re: [Mesa-dev] [PATCH 11/18] mesa: Refactor set_ubo_binding()

2014-01-22 Thread Brian Paul
On 01/21/2014 03:35 PM, Fredrik Höglund wrote: Make set_ubo_binding() just update the binding, and move the code that does validation, flushes the vertices etc. into a new bind_uniform_buffer() function. --- src/mesa/main/bufferobj.c | 50 - 1 file

Re: [Mesa-dev] [PATCH 1/2] mesa: Ensure that transform feedback refers to the correct program.

2014-01-22 Thread Kenneth Graunke
On 01/22/2014 06:07 AM, Paul Berry wrote: > Previous to this patch, the _mesa_{Begin,Resume}TransformFeedback > functions were using ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] to > find the program that would be the source of transform feedback data. > This isn't correct--if there's a geometry

[Mesa-dev] [PATCH] mesa: Set gl_constants::MinMapBufferAlignment

2014-01-22 Thread Ian Romanick
From: Ian Romanick Leaving it set to zero isn't really correct since every allocation has at least an alignment of 1 byte. It also caused a problem in the i965 driver after I removed the MAX(64, ...) from the alignment calculation. That's what I get for changing a patch without retesting it. :(

Re: [Mesa-dev] [PATCH] mesa: Set gl_constants::MinMapBufferAlignment

2014-01-22 Thread Kenneth Graunke
On 01/22/2014 08:31 AM, Ian Romanick wrote: > From: Ian Romanick > > Leaving it set to zero isn't really correct since every allocation has > at least an alignment of 1 byte. It also caused a problem in the i965 > driver after I removed the MAX(64, ...) from the alignment calculation. > That's w

Re: [Mesa-dev] [PATCH] rtasm: deal with size overflows by casting to ptrdiff_t

2014-01-22 Thread Ilia Mirkin
On Wed, Jan 22, 2014 at 12:03 PM, Brian Paul wrote: > On 01/21/2014 06:37 PM, Ilia Mirkin wrote: >> >> This was discovered as a result of the draw-elements-base-vertex-neg >> piglit test, which passes very negative offsets in, followed up by large >> indices. The nouveau code correctly adjusts the

[Mesa-dev] [Bug 73934] Function roundf undeclared in textparam.c when building with MSVC11

2014-01-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=73934 --- Comment #2 from Roland Scheidegger --- The stable branches and hence the tarballs are missing commit bba8f10598866776ae198b363b3752c2e3bbb126 from master at the moment which fixes this. You can just manually replace *params = (GLint) roundf(o

[Mesa-dev] [v2 03/23] i965: rename tex_ms to tex_cms

2014-01-22 Thread Topi Pohjolainen
Prepares for the introduction of non-compressed multi-sampled lookup used in the blorp programs. v2: now also taking into account gen8 Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry (v1) --- src/mesa/drivers/dri/i965/brw_defines.h | 2 +- src/mesa/drivers/dri/i965/brw_fs.cpp

[Mesa-dev] [v2 14/23] i965/blorp: wrap SHL (/brw_SHL(&func, /emit_shl(/)

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 24 src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 7 +++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blor

[Mesa-dev] [v2 06/23] i965/blorp: move emission of rt-write into eu-emitter

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp| 15 +-- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 18 ++ src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 5 + 3 files changed, 28 insertions(+)

[Mesa-dev] [v2 10/23] i965/blorp: wrap MOV (/brw_MOV(&func, /emit_mov(/)

2014-01-22 Thread Topi Pohjolainen
In addition, the two special cases requiring explicit execution size control are wrapped manually. Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 68 +-- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 12 +

[Mesa-dev] [v2 12/23] i965/blorp: wrap ADD (/brw_ADD(&func, /emit_add(/)

2014-01-22 Thread Topi Pohjolainen
In addition, the special case requiring explicit execution size control is wrapped manually. Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 34 +-- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 16 +++

[Mesa-dev] [v2 16/23] i965/blorp: wrap MUL (/brw_MUL(&func, /emit_mul(/)

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 18 +- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 7 +++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.

[Mesa-dev] [v2 17/23] i965/blorp: wrap FRC (/brw_FRC(&func, /emit_frc(/)

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 8 src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 6 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/me

[Mesa-dev] [v2 05/23] i965/blorp: move emission of texture lookup into eu-emitter

2014-01-22 Thread Topi Pohjolainen
Resolving of the hardware message type is moved into the emitter also in preparation for switching to use fs_generator. The generator wants to translate the high level op-code into the message type and hence the emitter needs to know the original op-code. Signed-off-by: Topi Pohjolainen Reviewed-

[Mesa-dev] [PATCH RFC 06/11] glsl: add swizzle_component() to ir_builder

2014-01-22 Thread Connor Abbott
Like swizzle_x(), swizzle_y(), etc., except the index is programmable. --- src/glsl/ir_builder.cpp | 6 ++ src/glsl/ir_builder.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp index 7f41ed6..2229cd2 100644 --- a/src/glsl/ir_builder.cpp

[Mesa-dev] [v2] Blorp blit compiler to use FS LIR

2014-01-22 Thread Topi Pohjolainen
Here are the remaining patches rebased on top of the two small fixes submitted earlier. Even though I included the entire remaining series, I have revised only patches 1, 3, 4, 7, 19, 20, 21 and 23. These consist of manual changes due to the aforementioned fixes, similar patching of gen8 as gen6/7

[Mesa-dev] [v2 13/23] i965/blorp: wrap SHR (/brw_SHR(&func, /emit_shr(/)

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 24 src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 7 +++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blor

[Mesa-dev] [v2 22/23] i965/fs: add support for BRW_OPCODE_AVG in fs_generator

2014-01-22 Thread Topi Pohjolainen
Needed for compiling blorp blit programs. Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generato

[Mesa-dev] [v2 11/23] i965/blorp: wrap AND (/brw_AND(&func, /emit_and(/)

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 78 +-- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 7 +++ 2 files changed, 46 insertions(+), 39 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp

[Mesa-dev] [PATCH RFC 04/11] glsl: add dead branch analysis

2014-01-22 Thread Connor Abbott
Dead branch analysis determines when the then or else branches of an if statement will always terminate in a loop jump or return statement, and hence once we enter that branch we will never get to the statements after the if. This is useful for determining the dominance tree, which is needed for th

[Mesa-dev] [v2 19/23] i965/blorp: wrap brw_IF/ELSE/ENDIF() into eu-emitter

2014-01-22 Thread Topi Pohjolainen
v2 (Paul): renamed emit_if() to emit_cmp_if() Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 14 +- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 18 ++ 2 files changed, 23 insertions(+), 9 deletions(-)

[Mesa-dev] [PATCH RFC 05/11] glsl: add loop jump visitor

2014-01-22 Thread Connor Abbott
This visitor will allow us to determine all the loop jumps that correspond to each loop. In SSA form, each input to a phi node is associated with a predecessor basic block. In the case of phi nodes at the beginning and end of loops, these predecessor blocks will include all blocks that end with a l

[Mesa-dev] [PATCH RFC 09/11] glsl: add pass to convert GLSL IR to SSA form

2014-01-22 Thread Connor Abbott
opt_to_ssa will convert temporaries and local variables to SSA form, although for now it can't handle array and record dereferences. --- src/glsl/Makefile.sources |1 + src/glsl/ir_optimization.h |2 + src/glsl/opt_to_ssa.cpp| 1155 3 files

[Mesa-dev] [v2 09/23] i965/blorp: wrap emission of if-equal-assignment

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 30 ++- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 6 ++ 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_bl

[Mesa-dev] [v2 04/23] i965/fs: introduce non-compressed equivalent of tex_cms

2014-01-22 Thread Topi Pohjolainen
v2: introduces 'SHADER_OPCODE_TXF_UMS' also for gen8 Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry (v1) --- src/mesa/drivers/dri/i965/brw_defines.h | 1 + src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 5 + src/mesa/drivers/dri/i965/brw_shader.cpp| 3 +++ src/me

[Mesa-dev] [v2 02/23] i965/blorp: move emission of pixel kill into eu-emitter

2014-01-22 Thread Topi Pohjolainen
The combination of four separate comparison operations and and the masked "and" require special treatment when moving to FS LIR. Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp| 28 +++-- src/mesa/drivers/dri/i965/

[Mesa-dev] [v2 07/23] i965/blorp: move emission of sample combining into eu-emitter

2014-01-22 Thread Topi Pohjolainen
v2 (Paul): pass the combining opcode as an argument to emit_combine(). This keeps manual_blend_average() selfcontained documentation wise. Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry (v1) --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp| 14 +-

[Mesa-dev] [v2 18/23] i965/blorp: wrap RNDD (/brw_RNDD(&func, /emit_rndd(/)

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 4 ++-- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 6 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/dr

[Mesa-dev] [PATCH RFC 01/11] glsl: fix handling of quadop_vector constant expression

2014-01-22 Thread Connor Abbott
We forgot to handle the case where the base type was a boolean. --- src/glsl/ir_constant_expression.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index f811fd1..9edc378 100644 --- a/src/glsl/ir_constant_express

[Mesa-dev] [v2 15/23] i965/blorp: wrap OR (/brw_OR(&func, /emit_or(/)

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 48 +-- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 7 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blor

[Mesa-dev] [PATCH RFC 10/11] glsl: add a pass to convert out of SSA form

2014-01-22 Thread Connor Abbott
Right now we are being basically as naive as possible, and inserting more copies than necessary. It is possible to implement a more sophisticated algorithm later, although extending the current copy propagation pass to support loops better and/or relying on backends to do copy propagation may make

[Mesa-dev] [PATCH RFC 07/11] glsl: add SSA infrastructure

2014-01-22 Thread Connor Abbott
This patch introduces all the changes to the IR that are necessary for representing programs in the SSA form. This consists of a new variable mode, the SSA temporary, which is guarenteed to be written to exactly once, and classes to represent phi nodes in the IR. In the current code, variables are

[Mesa-dev] [v2 20/23] i965/fs: allow unit tests to dump the final patched assembly

2014-01-22 Thread Topi Pohjolainen
Unit tests comparing generated blorp programs to known good need to have the dump in designated file instead of in default standard output. The comparison also expects the jump counters of if-else-instructions to be correctly set and hence the dump needs to be taken _after_ 'patch_IF_ELSE()' is run

[Mesa-dev] [v2 01/23] i965/blorp: introduce separate eu-emitter for blit compiler

2014-01-22 Thread Topi Pohjolainen
Prepares for presenting blorp blit programs using FS IR that allows EU-assembly generation using i965 glsl-compiler backend (fs_generator). v2: rebased on top of endif-jump counter fix (moving the added brw_set_uip_jip() into the emitter) Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Ber

[Mesa-dev] [v2 08/23] i965/blorp: wrap emission of conditional assignment

2014-01-22 Thread Topi Pohjolainen
Signed-off-by: Topi Pohjolainen Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 19 --- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 11 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp

[Mesa-dev] [v2 23/23] i965/blorp: switch eu-emitter to use FS IR and fs_generator

2014-01-22 Thread Topi Pohjolainen
No regressions on IVB (piglit quick + unit tests). v2 (Paul): - no need to patch the unit tests anymore. Original logic was altered and unit tests updated to match the fs-generator - lrp emission moves from the blorp compiler core into the emitter here (previously there was a separ

[Mesa-dev] [v2 21/23] i965/fs: introduce blorp specific rt-write for fs_generator

2014-01-22 Thread Topi Pohjolainen
The compiler for blorp programs likes to emit instructions for the message construction itself meaning that the generator needs to skip any such when blorp programs are translated for the hw. In addition, the binding table control is special for blorp programs and the generator does not need to upd

[Mesa-dev] [PATCH RFC 00/11] glsl: add Single Static Assignment (SSA)

2014-01-22 Thread Connor Abbott
This series enables GLSL IR support for SSA, including passes to convert to and from SSA form. SSA is a form of the intermediate representation of a compiler in which each variable is assigned exactly once. SSA form makes many optimizations faster and easier to write, and enables other more powerfu

[Mesa-dev] [PATCH RFC 02/11] glsl: add as_loop_jump() method to ir_instruction

2014-01-22 Thread Connor Abbott
This will let us dynamically downcast to ir_loop_jump, which will be needed later. --- src/glsl/ir.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 19e8383..d1e790d 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -138,6 +138,7 @@ public: virtual

[Mesa-dev] [PATCH RFC 08/11] glsl: add ssa_assign() to ir_builder

2014-01-22 Thread Connor Abbott
ssa_assign() creates an SSA variable and assignment at the same time. With this, simple sequences of SSA statements can be easily created. --- src/glsl/ir_builder.cpp | 14 ++ src/glsl/ir_builder.h | 1 + 2 files changed, 15 insertions(+) diff --git a/src/glsl/ir_builder.cpp b/src/

[Mesa-dev] [PATCH RFC 11/11] glsl: convert to and from SSA form in the compiler

2014-01-22 Thread Connor Abbott
This patch is mainly for allowing me to test these changes with piglit. In the future, a do_ssa_optimizations() function will need to be created and used by this code, as well as all other users of do_common_optimizations(). --- src/glsl/glsl_parser_extras.cpp | 4 1 file changed, 4 insertion

[Mesa-dev] [PATCH RFC 03/11] glsl: add a foreach_list_reverse macro

2014-01-22 Thread Connor Abbott
--- src/glsl/list.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glsl/list.h b/src/glsl/list.h index 694b686..2de20c3 100644 --- a/src/glsl/list.h +++ b/src/glsl/list.h @@ -383,6 +383,11 @@ inline void exec_node::insert_before(exec_list *before) ; (__node)->next != NULL

Re: [Mesa-dev] [PATCH 1/2] mesa: Ensure that transform feedback refers to the correct program.

2014-01-22 Thread Paul Berry
On 22 January 2014 08:20, Kenneth Graunke wrote: > On 01/22/2014 06:07 AM, Paul Berry wrote: > > @@ -376,25 +376,48 @@ _mesa_compute_max_transform_feedback_vertices( > > **/ > > > > > > +/** > > + * Figure out which stage of the pipeline is the source of transform > feedback > > + * data given

Re: [Mesa-dev] [v2 23/23] i965/blorp: switch eu-emitter to use FS IR and fs_generator

2014-01-22 Thread Paul Berry
On 22 January 2014 09:17, Topi Pohjolainen wrote: > No regressions on IVB (piglit quick + unit tests). > > v2 (Paul): > - no need to patch the unit tests anymore. Original logic > was altered and unit tests updated to match the > fs-generator > - lrp emission moves from the blorp compi

Re: [Mesa-dev] [PATCH 1/4] radeon / r200: Fix incompatible pointer type warning

2014-01-22 Thread Alex Deucher
On Mon, Jan 20, 2014 at 2:26 PM, Ian Romanick wrote: > From: Ian Romanick > > When parameters were removed from dd_function_table::Viewport (commit > 065bd6ff), radeon_viewport (in both radeon and r200) started generating > a warning. > > radeon_common.c: In function 'r200_radeon_viewport': > rad

Re: [Mesa-dev] [PATCH V3 7/8] glsl: remove remaining is_array variables

2014-01-22 Thread Paul Berry
On 22 January 2014 03:33, Timothy Arceri wrote: > Previously the reason we needed is_array was because we used array_size == > NULL to > represent both non-arrays and unsized arrays. Now that we use a non-NULL > array_specifier to represent an unsized array, is_array is redundant. > > Signed-off

[Mesa-dev] Can we commit the Spanish and Catalan translations?

2014-01-22 Thread Alex Henrie
Hi, It's been a week and no new concerns have been raised with the proposed Spanish and Catalan translations: http://lists.freedesktop.org/archives/mesa-dev/2014-January/051610.html http://lists.freedesktop.org/archives/mesa-dev/2014-January/051611.html http://lists.freedesktop.org/archives/mesa-

[Mesa-dev] [PATCH] i965: Replace *_generator::shader with is_glsl boolean.

2014-01-22 Thread Paul Berry
The "shader" field in fs_generator, vec4_generator, and gen8_generator was only used for one purpose; to figure out if we were compiling an assembly shader or a GLSL shader. And it wasn't being used properly: in vec4 shaders we were always initializing it based on prog->_LinkedShaders[MESA_SHADER_

[Mesa-dev] [PATCH 02/22] r600g: only emit NOP relocations for queries if VM is disabled

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_cs.h| 14 ++ src/gallium/drivers/radeon/r600_query.c | 14 +- src/gallium/drivers/radeon/r600_streamout.c | 14 -- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/gallium/dr

[Mesa-dev] [PATCH 10/22] r600g, radeonsi: consolidate get_timestamp, get_driver_query_info

2014-01-22 Thread Marek Olšák
From: Marek Olšák This enables more queries for the Gallium HUD with radeonsi. --- src/gallium/drivers/r600/r600_pipe.c | 32 -- src/gallium/drivers/radeon/r600_pipe_common.c | 33 +++ src/gallium/drivers/radeonsi/si_pipe.c| 9 ---

[Mesa-dev] [PATCH 12/22] r600g, radeonsi: consolidate get_paramf and get_video_param

2014-01-22 Thread Marek Olšák
From: Marek Olšák radeonsi now reports PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE = true if UVD support isn't available. It's what all the other drivers do. Also, some #include directives were missing in radeon_uvd.h. --- src/gallium/drivers/r600/r600_pipe.c | 64 - sr

[Mesa-dev] [PATCH 05/22] radeonsi: use queries from r600g

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/Makefile.sources | 1 - src/gallium/drivers/radeonsi/si.h | 45 --- src/gallium/drivers/radeonsi/si_blit.c| 22 +- src/gallium/drivers/radeonsi/si_hw_context.c | 525 +- src/gallium/drivers/radeon

[Mesa-dev] [PATCH 13/22] r600g, radeonsi: consolidate get_compute_param

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_pipe.c | 162 -- src/gallium/drivers/r600/r600_pipe.h | 3 - src/gallium/drivers/radeon/r600_pipe_common.c | 157 + src/gallium/drivers/radeon/r600_pipe_common.h | 1 + src/g

[Mesa-dev] [PATCH 18/22] radeonsi: remove si.h

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si.h | 43 -- src/gallium/drivers/radeonsi/si_pipe.c | 1 - src/gallium/drivers/radeonsi/si_pipe.h | 6 - 3 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 src/gallium/drivers/radeon

[Mesa-dev] [PATCH 21/22] radeonsi: remove open-coded PS_PARTIAL_FLUSH event

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_hw_context.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index bb3d080..2e1e9f2 100644 --- a/src/gallium/drivers/rade

[Mesa-dev] [PATCH 04/22] r600g: remove a no-op while loop

2014-01-22 Thread Marek Olšák
From: Marek Olšák for (;;) { } while (); I was surprised to see such a statement. --- src/gallium/drivers/radeon/r600_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index bf73a14..91

[Mesa-dev] [PATCH 06/22] radeonsi: advertise the pipeline statistics query

2014-01-22 Thread Marek Olšák
From: Marek Olšák Implemented by the common code. You can now visualize the statistics with the HUD, see GALLIUM_HUD=help for all available queries. For example: GALLIUM_HUD=clipper-primitives-generated --- src/gallium/drivers/radeonsi/si_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[Mesa-dev] [PATCH 17/22] radeonsi: move si_upload_const_buffer to a better place

2014-01-22 Thread Marek Olšák
From: Marek Olšák This gets rid of another file. --- src/gallium/drivers/radeonsi/Makefile.sources | 1 - src/gallium/drivers/radeonsi/si_buffer.c | 63 --- src/gallium/drivers/radeonsi/si_descriptors.c | 27 src/gallium/drivers/radeonsi/si_resource.h

[Mesa-dev] [PATCH 20/22] radeonsi: move some inline functions from si_pipe.h to si_state.c

2014-01-22 Thread Marek Olšák
From: Marek Olšák And si_tex_aniso_filter is unused. --- src/gallium/drivers/radeonsi/si_pipe.h | 39 - src/gallium/drivers/radeonsi/si_state.c | 30 + 2 files changed, 30 insertions(+), 39 deletions(-) diff --git a/src/gallium/drivers/ra

[Mesa-dev] [PATCH 15/22] radeonsi: inline si_upload_index_buffer

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_buffer.c | 7 --- src/gallium/drivers/radeonsi/si_pipe.h | 5 - src/gallium/drivers/radeonsi/si_state_draw.c | 3 ++- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_buffer.c

[Mesa-dev] [PATCH 14/22] r600g, radeonsi: consolidate remaining obviously duplicated pipe_screen code

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_pipe.c | 35 ++- src/gallium/drivers/radeon/r600_pipe_common.c | 24 +++--- src/gallium/drivers/radeon/r600_pipe_common.h | 2 +- src/gallium/drivers/radeonsi/si_pipe.c| 26 +

[Mesa-dev] [PATCH 07/22] r600g, radeonsi: consolidate the contents of r600_resource.c

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/Makefile.sources | 1 - src/gallium/drivers/r600/r600_pipe.c | 13 - src/gallium/drivers/r600/r600_pipe.h | 3 -- src/gallium/drivers/r600/r600_resource.c | 76 --- src/gallium/drivers/r600/r6

[Mesa-dev] [PATCH 11/22] r600g, radeonsi: consolidate variables for CS tracing

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_hw_context.c| 6 +++--- src/gallium/drivers/r600/r600_pipe.c | 18 +- src/gallium/drivers/r600/r600_pipe.h | 5 + src/gallium/drivers/r600/r600_state_common.c | 8 src/gallium/drivers/radeo

[Mesa-dev] [PATCH 08/22] radeon: place context-related functions first in r600_pipe_common.c

2014-01-22 Thread Marek Olšák
From: Marek Olšák To follow the unwritten convention of r600g and radeonsi. --- src/gallium/drivers/radeon/r600_pipe_common.c | 166 ++ 1 file changed, 87 insertions(+), 79 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/rad

[Mesa-dev] [PATCH 22/22] radeonsi: cleanup includes, add missing license

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_blit.c| 5 ++--- src/gallium/drivers/radeonsi/si_commands.c| 1 - src/gallium/drivers/radeonsi/si_compute.c | 25 +++ src/gallium/drivers/radeonsi/si_descriptors.c | 1 + src/gallium/drivers/radeonsi/si_

[Mesa-dev] [PATCH 03/22] r600g: convert query emission code to radeon_emit

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_query.c | 100 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 14e8427..bf73a14 100644 --- a/src/gallium

[Mesa-dev] [PATCH 19/22] radeonsi: remove si_resource.h

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_descriptors.c | 1 - src/gallium/drivers/radeonsi/si_pipe.c| 1 - src/gallium/drivers/radeonsi/si_pipe.h| 14 +++- src/gallium/drivers/radeonsi/si_resource.h| 47 --- 4 files changed, 13 inser

[Mesa-dev] [PATCH 09/22] r600g, radeonsi: consolidate get_name and get_vendor queries

2014-01-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_pipe.c | 45 src/gallium/drivers/radeon/r600_pipe_common.c | 50 +++ src/gallium/drivers/radeonsi/si_pipe.c| 29 3 files changed, 50 insertions(+), 74 deletions(

  1   2   >