Re: [Mesa-dev] [PATCH] glsl: Flip around "if" statements with empty "then" blocks.

2013-05-03 Thread Matt Turner
On Fri, May 3, 2013 at 3:05 PM, Eric Anholt wrote: > This cleans up some funny-looking code in some unigine shaders I was > looking at. Also slightly helps on planeshift and a few shaders in an > upcoming Valve release. > > total instructions in shared programs: 1653715 -> 1653587 (-0.01%) > inst

Re: [Mesa-dev] [PATCH 15/14] i965/fs: Don't emit 16-wide BFI1 instructions.

2013-05-03 Thread Matt Turner
On Fri, May 3, 2013 at 5:02 PM, Eric Anholt wrote: > Matt Turner writes: > >> The Haswell Bspec says "A SIMD16 instruction is not allowed." (but >> 16-wide BFI1 works for me so far). Since GLSL's bitfieldInsert() >> function takes int parameters BFI1 produces the same results in all >> channels,

[Mesa-dev] [PATCH 1/2] i965/gen7: Add defines for Memory Object Control State

2013-05-03 Thread Chad Versace
CC: Stéphane Marchesin CC: Kenneth Graunke CC: Eric Anholt CC: Matt Turner Signed-off-by: Chad Versace --- src/mesa/drivers/dri/i965/brw_defines.h | 20 1 file changed, 20 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/br

[Mesa-dev] [PATCH 2/2] i965/hsw: Set MOCS for surfaces

2013-05-03 Thread Chad Versace
The drivers was setting MOCS (Memory Object Control State) to 0 for all objects. This patch sets it as following: renderbuffer, depthbuffer => LLC uncacheable, L3 cacheable texture, stencil, hiz => LLC cacheable, L3 cacheable The goal here is to avoid blowing out the LLC with too-large buf

[Mesa-dev] [PATCH 0/2] i965/hsw: Set MOCS for surfaces

2013-05-03 Thread Chad Versace
+32% on GLBenchmark 2.5 Egypt Offscreen DXT1. Tested on Harris Beach GT3 with Android. Please please please, someone run Piglit on this series. I currently have no Haswell hardware that is stable on non-Android Linux, and so can't run Piglit myself. I don't want to commit this series until it's

Re: [Mesa-dev] [PATCH] i965: Enable fast clears on non-8x4-aligned sizes.

2013-05-03 Thread Eric Anholt
Kenneth Graunke writes: > On 05/02/2013 01:58 PM, Eric Anholt wrote: >> Improves glb2.7 performance at a misaligned size by 2.3% +/- 0.7% (n=11). >> The workaround was to avoid bad primitive/surface sizes, but that's worked >> around as of a14dc4f92cdad6177d83f051a088a66e31a973bc. (One might not

Re: [Mesa-dev] [PATCH 15/14] i965/fs: Don't emit 16-wide BFI1 instructions.

2013-05-03 Thread Eric Anholt
Matt Turner writes: > The Haswell Bspec says "A SIMD16 instruction is not allowed." (but > 16-wide BFI1 works for me so far). Since GLSL's bitfieldInsert() > function takes int parameters BFI1 produces the same results in all > channels, so there's never any reason to emit a 16-wide BFI1. Suppos

[Mesa-dev] [PATCH 12/12] glsl: Death to array dereferences of vectors!

2013-05-03 Thread Ian Romanick
From: Ian Romanick Now that all the places that used to generate array derefeneces of vectors have been changed to generate either ir_binop_vector_extract or ir_triop_vector_insert (or both), remove all support for dealing with this deprecated construct. As an added safeguard, modify ir_validate

[Mesa-dev] [PATCH 11/12] glsl: Generate correct ir_binop_vector_extract code for out and inout parameters

2013-05-03 Thread Ian Romanick
From: Ian Romanick Like with type conversions on out parameters, some extra copies need to occur to handle these cases. The fundamental problem is that ir_binop_vector_extract is not an lvalue, but out and inout parameters must be lvalues. A previous patch delt with a similar problem in the LHS

[Mesa-dev] [PATCH 10/12] glsl: Use vector-insert and vector-extract on elements of gl_ClipDistanceMESA

2013-05-03 Thread Ian Romanick
From: Ian Romanick Variable indexing into vectors using ir_dereference_array is being removed, so this lowering pass has to generate something different. v2: Convert tabs to spaces. Suggested by Eric. Signed-off-by: Ian Romanick Cc: Paul Berry --- src/glsl/lower_clip_distance.cpp | 36 +

[Mesa-dev] [PATCH 09/12] glsl: Convert lower_clip_distance_visitor to be an ir_rvalue_visitor

2013-05-03 Thread Ian Romanick
From: Ian Romanick Right now the lower_clip_distance_visitor lowers variable indexing into gl_ClipDistance into variable indexing into both the array gl_ClipDistanceMESA and the vectors of that array. For example, gl_ClipDistance[i] = f; becomes gl_ClipDistanceMESA[i/4][i%4] = f; How

Re: [Mesa-dev] [PATCH] glsl: Flip around "if" statements with empty "then" blocks.

2013-05-03 Thread Kenneth Graunke
On 05/03/2013 03:05 PM, Eric Anholt wrote: This cleans up some funny-looking code in some unigine shaders I was looking at. Also slightly helps on planeshift and a few shaders in an upcoming Valve release. total instructions in shared programs: 1653715 -> 1653587 (-0.01%) instructions in affect

[Mesa-dev] [PATCH 08/12] glsl: Generate ir_binop_vector_extract for indexing of vectors

2013-05-03 Thread Ian Romanick
From: Ian Romanick Now ir_dereference_array of a vector will never occur in the RHS of an expression. v2: Add back the { } around the if-statement body to make it more readable. Suggested by Eric. Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt --- src/glsl/ast_array_index.cpp | 20 +++

[Mesa-dev] [PATCH 07/12] glsl: Convert ir_binop_vector_extract in the LHS to ir_triop_vector_insert

2013-05-03 Thread Ian Romanick
From: Ian Romanick The ast_array_index code can't know whether to generate an ir_binop_vector_extract or an ir_triop_vector_insert. Instead it will always generate ir_binop_vector_extract, and the LHS and RHS have to be re-written. v2: Convert tabs to spaces. Suggested by Eric. Signed-off-by:

[Mesa-dev] [PATCH 06/12] glsl: Add lowering pass for ir_triop_vector_insert

2013-05-03 Thread Ian Romanick
From: Ian Romanick This will eventually replace do_vec_index_to_cond_assign. This lowering pass is called in all the places where do_vec_index_to_cond_assign or do_vec_index_to_swizzle is called. v2: Use WRITEMASK_* instead of integer literals. Use a more concise method of generating broadcast

[Mesa-dev] [PATCH 05/12] glsl: Lower ir_binop_vector_extract to conditional moves

2013-05-03 Thread Ian Romanick
From: Ian Romanick Lower ir_binop_vector_extract with a non-constant index to a series of conditional moves. This is exactly like ir_dereference_array of a vector with a non-constant index. v2: Convert tabs to spaces. Suggested by Eric. Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt -

[Mesa-dev] [PATCH 04/12] glsl: Lower ir_binop_vector_extract to swizzle

2013-05-03 Thread Ian Romanick
From: Ian Romanick Lower ir_binop_vector_extract with a constant index to a swizzle. This is exactly like ir_dereference_array of a vector with a constant index. v2: Convert tabs to spaces. Suggested by Eric. v3: Correctly call convert_vector_extract_to_swizzle in ir_vec_index_to_swizzle_visi

[Mesa-dev] [PATCH 03/12] glsl: Refactor part of convert_vec_index_to_cond_assign

2013-05-03 Thread Ian Romanick
From: Ian Romanick Use a first function that extract the vector being indexed and the index from the deref. Call the second function that does the real work. Coming patches will add a new ir_expression for variable indexing into a vector. Having the lowering pass split into two functions will

[Mesa-dev] [PATCH 02/12] glsl: Add ir_triop_vector_insert

2013-05-03 Thread Ian Romanick
From: Ian Romanick The new opcode is used to generate a new vector with a single field from the source vector replaced. This will eventually replace ir_dereference_array of vectors in the LHS of assignments. v2: Convert tabs to spaces. Suggested by Eric. v3: Add constant expression handling f

[Mesa-dev] [PATCH 01/12] glsl: Add ir_binop_vector_extract

2013-05-03 Thread Ian Romanick
From: Ian Romanick The new opcode is used to get a single field from a vector. The field index may not be constant. This will eventually replace ir_dereference_array of vectors. This is similar to the extractelement instruction in LLVM IR. http://llvm.org/docs/LangRef.html#extractelement-inst

Re: [Mesa-dev] [PATCH] r600g: don't emit surface_sync after FLUSH_AND_INV_EVENT

2013-05-03 Thread Aaron Watry
I know it's been pushed already, but this also fixes some lockups that I was seeing on Barts (HD6850) when running piglit's OpenCL tests. Thanks for fixing this. --Aaron On Fri, May 3, 2013 at 9:47 AM, Marek Olšák wrote: > Reviewed-by: Marek Olšák > > Marek > > On Fri, May 3, 2013 at 4:01 PM,

Re: [Mesa-dev] [PATCH 2/2] vbo: implement primitive merging for glBegin/End sequences

2013-05-03 Thread Brian Paul
On 05/03/2013 03:52 PM, Eric Anholt wrote: Brian Paul writes: diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index b8dd90c..9ce3c6e 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -305,9 +305,9 @@ _save_reset_counters(struct gl_context *ctx)

[Mesa-dev] [PATCH 3/3] r600g/llvm: Parse config values in register / value pairs

2013-05-03 Thread Tom Stellard
From: Tom Stellard Rather than relying on a predetermined order for the config values. --- src/gallium/drivers/r600/r600_llvm.c | 33 ++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/

[Mesa-dev] [PATCH 2/3] r600g/llvm: Don't feed LLVM output through r600_bytecode_build()

2013-05-03 Thread Tom Stellard
From: Tom Stellard The LLVM backend emits raw ISA now, so we can just its output unmodified. --- src/gallium/drivers/r600/r600_llvm.c | 11 +- src/gallium/drivers/r600/r600_llvm.h | 2 - src/gallium/drivers/r600/r600_shader.c | 401 ++--- 3 files changed, 20 in

[Mesa-dev] [PATCH 1/3] r600g/llvm: Don't emit CALL_FS for vertex shaders

2013-05-03 Thread Tom Stellard
From: Tom Stellard The LLVM backend takes care of this now. --- src/gallium/drivers/r600/r600_shader.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 9afd57f..b3b124e 1006

[Mesa-dev] R600 Patchset: Emit true ISA

2013-05-03 Thread Tom Stellard
Hi, The attached patches modify the CodeEmitter to emit true ISA. Previously, we were prefixing all instructions with an instruction type byte. Vincent did most of the work to convert the CodeEmitter to true ISA, these patches are just the last few cleanups that are needed to finish the project.

[Mesa-dev] [PATCH] glsl: Flip around "if" statements with empty "then" blocks.

2013-05-03 Thread Eric Anholt
This cleans up some funny-looking code in some unigine shaders I was looking at. Also slightly helps on planeshift and a few shaders in an upcoming Valve release. total instructions in shared programs: 1653715 -> 1653587 (-0.01%) instructions in affected programs: 16550 -> 16422 (-0.77%) ---

Re: [Mesa-dev] [PATCH 2/2] vbo: implement primitive merging for glBegin/End sequences

2013-05-03 Thread Eric Anholt
Brian Paul writes: > diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c > index b8dd90c..9ce3c6e 100644 > --- a/src/mesa/vbo/vbo_save_api.c > +++ b/src/mesa/vbo/vbo_save_api.c > @@ -305,9 +305,9 @@ _save_reset_counters(struct gl_context *ctx) > * previous prim. > */ > stat

[Mesa-dev] [PATCH] gallium: more tgsi documentation updates

2013-05-03 Thread sroland
From: Roland Scheidegger Adds the remaining integer opcodes, and some opcodes are moved to more appropriate places, along with getting rid of the (already nearly empty) ps_2_x section. Though the CAP bits for some of these are still a bit in the air so the documentation isn't quite as watertight

[Mesa-dev] [Bug 39527] 3D Driving-School - missing textures

2013-05-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39527 David "okias" Heidelberger changed: What|Removed |Added Status|NEW |RESOLVED Resolution

Re: [Mesa-dev] [PATCH] i965: Enable fast clears on non-8x4-aligned sizes.

2013-05-03 Thread Chad Versace
On 05/02/2013 04:58 PM, Kenneth Graunke wrote: On 05/02/2013 01:58 PM, Eric Anholt wrote: Improves glb2.7 performance at a misaligned size by 2.3% +/- 0.7% (n=11). The workaround was to avoid bad primitive/surface sizes, but that's worked around as of a14dc4f92cdad6177d83f051a088a66e31a973bc. (

Re: [Mesa-dev] visual leak?

2013-05-03 Thread Andy Skinner
Thank you. As far as I can tell, the pointer in question was allocated to be stored in the object that is freed there, and XMesaDestroyVisual frees them together. But because of your caution, and because it is a lot smaller than the larger object which will be freed if I register it with the d

Re: [Mesa-dev] [PATCH 10/12] sso: update glGet: GL_PROGRAM_PIPELINE_BINDING

2013-05-03 Thread Matt Turner
On Fri, May 3, 2013 at 10:44 AM, Gregory Hainaut wrote: > --- > src/mesa/main/get.c |9 + > src/mesa/main/get_hash_params.py |3 +++ > 2 files changed, 12 insertions(+) > > diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c > index 54159c0..6cbb7db 100644 > --- a/

Re: [Mesa-dev] [PATCH 04/12] sso: implement ActiveShaderProgram & GetProgramPipelineiv

2013-05-03 Thread Matt Turner
On Fri, May 3, 2013 at 10:44 AM, Gregory Hainaut wrote: > V2: > * Rename object > * Formatting improvement > --- > src/mesa/main/pipelineobj.c | 77 > +++ > 1 file changed, 77 insertions(+) > > diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pip

Re: [Mesa-dev] [PATCH 2/2] vbo: implement primitive merging for glBegin/End sequences

2013-05-03 Thread Jose Fonseca
Series looks alright AFAICT. Jose - Original Message - > A surprising number of apps and benchmarks have poor code like this: > > glBegin(GL_LINE_STRIP); > glVertex(v1); > glVertex(v2); > glEnd(); > // Possibly some no-op state changes here > glBegin(GL_LINE_STRIP); > glVertex(v3); > glVe

[Mesa-dev] [PATCH 12/12] sso: Finally enable the extension on Gallium

2013-05-03 Thread Gregory Hainaut
Note: it probably work on others drivers. --- src/mesa/state_tracker/st_extensions.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index f986480..4ce74f2 100644 --- a/src/mesa/state_tracker/st_extensions.c ++

[Mesa-dev] [PATCH 11/12] sso: implement ValidateProgramPipeline and GetProgramPipelineInfoLog

2013-05-03 Thread Gregory Hainaut
Implementation note: I don't use context for ralloc (don't know how). The check on PROGRAM_SEPARABLE flags is also done when the pipeline isn't bound. It doesn't make any sense in a DSA style API. Maybe we could replace _mesa_validate_program_pipeline by _mesa_validate_program_pipeline. For exa

[Mesa-dev] [PATCH 10/12] sso: update glGet: GL_PROGRAM_PIPELINE_BINDING

2013-05-03 Thread Gregory Hainaut
--- src/mesa/main/get.c |9 + src/mesa/main/get_hash_params.py |3 +++ 2 files changed, 12 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 54159c0..6cbb7db 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -369,6 +369,7 @@ EXTRA_

[Mesa-dev] [PATCH 09/12] sso: implement BindProgramPipeline

2013-05-03 Thread Gregory Hainaut
Test become green in piglit: The updated ext_transform_feedback-api-errors:useprogstage_noactive useprogstage_active bind_pipeline arb_separate_shader_object-GetProgramPipelineiv arb_separate_shader_object-IsProgramPipeline For the moment I reuse Driver.UseProgram but I guess it will be better to

[Mesa-dev] [PATCH 08/12] sso: Implement _mesa_UseProgramStages

2013-05-03 Thread Gregory Hainaut
Implement _mesa_UseProgramStages => arb_separate_shader_object-GetProgramPipelineiv is now pass :) Extend use_shader_program to support a different target. Allow to reuse the function to update the pipeline state. Note I bypass the flush when target isn't current. Maybe it would be better to cr

[Mesa-dev] [PATCH 05/12] sso: replace Shader binding point with _Shader

2013-05-03 Thread Gregory Hainaut
To avoid NULL pointer check a default pipeline object is installed in _Shader when no program is current The spec say that UseProgram/UseShaderProgramEXT/ActiveProgramEXT got an higher priority over the pipeline object. When default program is uninstall, the pipeline is used if any was bound. N

[Mesa-dev] [PATCH 07/12] sso: update meta state

2013-05-03 Thread Gregory Hainaut
save and restore _Shader/Pipeline binding point. Rational we don't want any conflict when the program will be unattached. V2: formatting improvement --- src/mesa/drivers/common/meta.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/mesa/dri

[Mesa-dev] [PATCH 06/12] sso: rename Shader to the pointer _Shader

2013-05-03 Thread Gregory Hainaut
Basically a sed but shaderapi.c and get.c. get.c => GL_CURRENT_PROGAM always refer to the "old" UseProgram behavior shaderapi.c => the old api stil update the Shader object directly V2: formatting improvement --- src/mesa/drivers/common/meta.c | 10 ++-- src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 04/12] sso: implement ActiveShaderProgram & GetProgramPipelineiv

2013-05-03 Thread Gregory Hainaut
V2: * Rename object * Formatting improvement --- src/mesa/main/pipelineobj.c | 77 +++ 1 file changed, 77 insertions(+) diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index d81bd0e..ffbeeae 100644 --- a/src/mesa/main/pipelineobj.c

[Mesa-dev] [PATCH 03/12] sso: add support of GL_PROGRAM_SEPARABLE and CreateShaderProgramv

2013-05-03 Thread Gregory Hainaut
V1: CreateShaderProgramv is similar as CreateShaderProgramEXT. The 2 differences are 1/ it an array of strings 2/ it support the GL_PROGRAM_SEPARABLE (aka SeparateShader) flag V2: Formatting improvement --- src/mesa/main/mtypes.h|5 +++ src/mesa/main/shaderapi.c | 94 +++

[Mesa-dev] [PATCH 02/12] sso: Add pipeline container/state

2013-05-03 Thread Gregory Hainaut
V1: * Extend gl_shader_state as pipeline object state * Add a new container gl_pipeline_shader_state that contains binding point of the previous object * Update mesa init/free shader state due to the extension of the attibute * Add an init/free pipeline function for the context * Implement GenP

[Mesa-dev] [PATCH 00/12] RFC: add support of ARB_separate_shader_object extensions V3

2013-05-03 Thread Gregory Hainaut
Please find an implementation of the ARB_separate_shader_objects extensions. I concentrate mostly on the state part of the extensions aka the pipeline object. I think GLSL already compiled program separately anyway. I test my implementation on the test that I send on piglit mailing list. All tes

Re: [Mesa-dev] [PATCH] st/xvmc/tests: Fix build failure, v2

2013-05-03 Thread Andreas Boll
Pushed as http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ff81cfd8640d02dc78d736cad5020d54ef7a0dc 2013/5/3 Matt Turner > On Fri, May 3, 2013 at 1:48 AM, Lauri Kasanen wrote: > > v2: Removed extra libs as requested by Matt Turner. > > > > Signed-off-by: Lauri Kasanen > > --- > > src/gallium

Re: [Mesa-dev] [PATCH] r600g: Correctly initialize the shader key, v2

2013-05-03 Thread Andreas Boll
Pushed as http://cgit.freedesktop.org/mesa/mesa/commit/?id=e495d88453076a4fe552502d66d6a3869ab70e4a 2013/5/3 Marek Olšák > As long as the commit message contains a note matching this regular > expression '^[[:space:]]*NOTE: .*[Cc]andidate', it won't be missed. > Usually the release manager take

Re: [Mesa-dev] visual leak?

2013-05-03 Thread Brian Paul
On 05/03/2013 09:42 AM, Andy Skinner wrote: Hi, Brian. Did you have thoughts one these? Would it make sense, if we can't update Mesa right now, to just put the register_with_display() call into Fake_glXChooseFBConfig(), as it is for Fake_glxChooseVisual()? It allows the visual to be cleaned

Re: [Mesa-dev] [PATCH] st/xvmc/tests: Fix build failure, v2

2013-05-03 Thread Matt Turner
On Fri, May 3, 2013 at 1:48 AM, Lauri Kasanen wrote: > v2: Removed extra libs as requested by Matt Turner. > > Signed-off-by: Lauri Kasanen > --- > src/gallium/state_trackers/xvmc/Makefile.am |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/gallium/state_tracker

Re: [Mesa-dev] [PATCH] r600g: Correctly initialize the shader key, v2

2013-05-03 Thread Marek Olšák
As long as the commit message contains a note matching this regular expression '^[[:space:]]*NOTE: .*[Cc]andidate', it won't be missed. Usually the release manager takes care of cherry-picking if there are no conflicts. Marek On Fri, May 3, 2013 at 5:39 PM, Lauri Kasanen wrote: > On Fri, 3 May 2

[Mesa-dev] [Bug 64170] [llvmpipe] piglit fbo-cubemap regression

2013-05-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64170 Roland Scheidegger changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] visual leak?

2013-05-03 Thread Andy Skinner
Hi, Brian. Did you have thoughts one these? Would it make sense, if we can't update Mesa right now, to just put the register_with_display() call into Fake_glXChooseFBConfig(), as it is for Fake_glxChooseVisual()? It allows the visual to be cleaned up when the Display is closed. Unless it int

Re: [Mesa-dev] [PATCH] r600g: Correctly initialize the shader key, v2

2013-05-03 Thread Lauri Kasanen
On Fri, 3 May 2013 10:54:09 -0400 Alex Deucher wrote: > On Fri, May 3, 2013 at 9:55 AM, Lauri Kasanen wrote: > > This patch fixes constant shader recompiles by initializing the struct > > to zero. For completeness, memcpy is used to copy the key to the shader > > struct. > > > > Candidate for t

Re: [Mesa-dev] [PATCHv2] gallium: fix type of flags in pipe_context::flush()

2013-05-03 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, May 3, 2013 at 5:19 PM, Chia-I Wu wrote: > It should be unsigned, not enum pipe_flush_flags. > > Fixed a build error: > > src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: > invalid conversion from 'int' to 'pipe_flush_flags' [-f

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Roland Scheidegger
Am 03.05.2013 16:45, schrieb Christoph Bumiller: > On 03.05.2013 16:32, Jose Fonseca wrote: >> >> - Original Message - >>> Am 03.05.2013 06:58, schrieb Jose Fonseca: - Original Message - > Currently, there's no way to get the high bits of a 32x32 > signed/unsigned

Re: [Mesa-dev] [PATCH] gallium: fix type of flags in pipe_context::flush()

2013-05-03 Thread Chia-I Wu
On Fri, May 3, 2013 at 4:00 PM, Jose Fonseca wrote: > - Original Message - >> It should be unsigned, not enum pipe_flush_flags. >> >> Fixed a build error: >> >> src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: >> invalid conversion from 'int' to 'pipe_flush_flag

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Roland Scheidegger
Am 03.05.2013 16:32, schrieb Jose Fonseca: > > > - Original Message - >> Am 03.05.2013 06:58, schrieb Jose Fonseca: >>> >>> >>> - Original Message - Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication with tgsi. However, all o

[Mesa-dev] [PATCHv2] gallium: fix type of flags in pipe_context::flush()

2013-05-03 Thread Chia-I Wu
It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by:

Re: [Mesa-dev] [PATCH] r600g: Correctly initialize the shader key, v2

2013-05-03 Thread Alex Deucher
On Fri, May 3, 2013 at 9:55 AM, Lauri Kasanen wrote: > Assigning a struct only copies the members - any padding is left as is. > > Thus this code: > > struct foo_t foo; > foo = bar; > > leaves the padding of foo intact, ie uninitialized random garbage. > > This patch fixes constant shader recompil

Re: [Mesa-dev] [PATCH] r600g: don't emit surface_sync after FLUSH_AND_INV_EVENT

2013-05-03 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, May 3, 2013 at 4:01 PM, wrote: > From: Alex Deucher > > It shouldn't be needed since the FLUSH_AND_INV_EVENT has already > made sure the destination caches are flushed. Additionally, > we didn't previously emit the surface_sync until this commit: > http

Re: [Mesa-dev] [PATCH] r600g: Correctly initialize the shader key, v2

2013-05-03 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, May 3, 2013 at 3:55 PM, Lauri Kasanen wrote: > Assigning a struct only copies the members - any padding is left as is. > > Thus this code: > > struct foo_t foo; > foo = bar; > > leaves the padding of foo intact, ie uninitialized random garbage. > > This pa

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Christoph Bumiller
On 03.05.2013 16:32, Jose Fonseca wrote: > > - Original Message - >> Am 03.05.2013 06:58, schrieb Jose Fonseca: >>> >>> - Original Message - Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication with tgsi. However, all of d3d

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Jose Fonseca
- Original Message - > Am 03.05.2013 06:58, schrieb Jose Fonseca: > > > > > > - Original Message - > >> Currently, there's no way to get the high bits of a 32x32 > >> signed/unsigned integer multiplication with tgsi. However, all of > >> d3d10, OpenGL, and OpenCL support that, s

Re: [Mesa-dev] [PATCH 1/3] gallivm: Move LLVMStartMultithreaded() static initializer into gallivm

2013-05-03 Thread Jose Fonseca
Looks ok by me. - Original Message - > From: Tom Stellard > > This does not solve all of the problems with using LLVM in a > multithreaded enivronment, but it should help in some cases. > --- > src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 15 +++ > src/gallium/drivers/r

Re: [Mesa-dev] [PATCH 2/2] scons: remove nouveau build

2013-05-03 Thread Jose Fonseca
Fine by me. Jose - Original Message - > One build system for linux/unix only drivers should be enough. > Additionally the nouveau target was disabled anyway. > --- > src/gallium/SConscript | 15 --- > src/gallium/drivers/nouveau/SConscript | 10 --

Re: [Mesa-dev] [PATCH] r600g: don't emit surface_sync after FLUSH_AND_INV_EVENT

2013-05-03 Thread Tom Stellard
On Fri, May 03, 2013 at 10:01:00AM -0400, alexdeuc...@gmail.com wrote: > From: Alex Deucher > Reviewed-by: Tom Stellard > It shouldn't be needed since the FLUSH_AND_INV_EVENT has already > made sure the destination caches are flushed. Additionally, > we didn't previously emit the surface_sync

[Mesa-dev] [PATCH] r600g: don't emit surface_sync after FLUSH_AND_INV_EVENT

2013-05-03 Thread alexdeucher
From: Alex Deucher It shouldn't be needed since the FLUSH_AND_INV_EVENT has already made sure the destination caches are flushed. Additionally, we didn't previously emit the surface_sync until this commit: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e5e4c07e7964a3258ed02b530bcdc24c0650204b

[Mesa-dev] [PATCH] r600g: Correctly initialize the shader key, v2

2013-05-03 Thread Lauri Kasanen
Assigning a struct only copies the members - any padding is left as is. Thus this code: struct foo_t foo; foo = bar; leaves the padding of foo intact, ie uninitialized random garbage. This patch fixes constant shader recompiles by initializing the struct to zero. For completeness, memcpy is use

Re: [Mesa-dev] [PATCH] draw/pt: adjust overflow calculations

2013-05-03 Thread Jose Fonseca
- Original Message - > On Thu, May 2, 2013 at 11:40 PM, Zack Rusin wrote: > > gallium lies. buffer_size is not actually buffer_size but available > > size, which is 'buffer_size - buffer_offset' so by adding buffer > > offset we'd incorrectly compute overflow. > > Maybe add a comment to

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Roland Scheidegger
Yes, that's why I said it looks like separate low and high bits in opencl. So in opencl you will get the low and high parts separately anyway. If we have only one instruction, we also probably really wanted to be able to say that we may only need one or the other destination to avoid extra work, an

Re: [Mesa-dev] [PATCH 1/2] gallivm: allow negation of all integer types

2013-05-03 Thread Jose Fonseca
- Original Message - > > Sorry to hear the hw doesn't support it, but this is supported by d3d10 > > so it's quite likely some hw indeed supports it. There's always some > > things some hw can't do natively. > > Well I was hoping before adding new things for sw driver to gallium we > shoul

Re: [Mesa-dev] [PATCH 3/3] r600g: Don't set the dest cache bits on surface sync for R600_CONTEXT_FLUSH_AND_INV

2013-05-03 Thread Vadim Girlin
On 05/03/2013 05:36 PM, Alex Deucher wrote: On Fri, May 3, 2013 at 9:30 AM, Vadim Girlin wrote: This patch results in lockups with Heaven on juniper for me. Does dropping the surface_sync packet completely help? We shouldn't need a surface_sync packet after a CACHE_FLUSH_AND_INV_EVENT packet

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Roland Scheidegger
Am 03.05.2013 06:58, schrieb Jose Fonseca: > > > - Original Message - >> Currently, there's no way to get the high bits of a 32x32 >> signed/unsigned integer multiplication with tgsi. However, all of >> d3d10, OpenGL, and OpenCL support that, so we need it as well. >> There's essentiall

Re: [Mesa-dev] [PATCH 3/3] r600g: Don't set the dest cache bits on surface sync for R600_CONTEXT_FLUSH_AND_INV

2013-05-03 Thread Alex Deucher
On Fri, May 3, 2013 at 9:30 AM, Vadim Girlin wrote: > This patch results in lockups with Heaven on juniper for me. Does dropping the surface_sync packet completely help? We shouldn't need a surface_sync packet after a CACHE_FLUSH_AND_INV_EVENT packet and prior to e5e4c07e7964a3258ed02b530bcdc24c

Re: [Mesa-dev] [PATCH 3/3] r600g: Don't set the dest cache bits on surface sync for R600_CONTEXT_FLUSH_AND_INV

2013-05-03 Thread Vadim Girlin
This patch results in lockups with Heaven on juniper for me. Vadim On 04/26/2013 09:21 PM, Tom Stellard wrote: From: Tom Stellard We are already emitting a EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT packet when this flush flag is set, so flushing the dest caches with a SURFACE_SYNC should not be n

Re: [Mesa-dev] [PATCH] gallium: tgsi documentation updates and clarification for integer opcodes.

2013-05-03 Thread Jose Fonseca
- Original Message - > From: Roland Scheidegger > > A lot of them were missing. Others were moved from the Compute ISA > to a new Integer ISA section as that seemed more appropriate. > --- > src/gallium/docs/source/tgsi.rst | 362 > ++ > 1 file cha

Re: [Mesa-dev] [PATCH] tgsi/ureg: make the dst register match the src indirection

2013-05-03 Thread Jose Fonseca
- Original Message - > In ureg src registers could have an indirect register that was > either a temp or an addr register, while dst registers allowed > only addr. That made moving between them a little difficult so > make them behave the same way and allow temp's and addr registers > as in

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Aaron Watry
Not sure if this helps much, but... With gentype being one of: char, uchar, short, ushort, int, uint, long, ulong, and the widths being scalar, 2, 3, 4, 8, or 16 components wide. From the OpenCL 1.1 spec: gentype mad_hi(gentype a, gentype b): Computes x * y and returns the high half of the produc

Re: [Mesa-dev] [PATCH] draw/pt: adjust overflow calculations

2013-05-03 Thread Alex Deucher
On Thu, May 2, 2013 at 11:40 PM, Zack Rusin wrote: > gallium lies. buffer_size is not actually buffer_size but available > size, which is 'buffer_size - buffer_offset' so by adding buffer > offset we'd incorrectly compute overflow. Maybe add a comment to that effect in the code? Alex > > Signed

Re: [Mesa-dev] [PATCH] r600g: Correctly initialize the shader key

2013-05-03 Thread Vadim Girlin
On 05/03/2013 03:10 PM, Lauri Kasanen wrote: Assigning a struct only copies the members - any padding is left as is. Thus this code: struct foo; foo = bar; leaves the padding of foo intact, ie uninitialized random garbage. This patch fixes constant shader recompiles by initializing the struct

Re: [Mesa-dev] r600 sb test results

2013-05-03 Thread Lauri Kasanen
On Fri, 03 May 2013 01:27:27 +0400 Vadim Girlin wrote: > I'm almost sure that the same issue that you have with glxgears affects > your app too, so you might want to wait until we resolve the problem > with gears, possibly this will solve other rendering issues as well. > ... > > By the way, I

[Mesa-dev] [PATCH] r600g: Correctly initialize the shader key

2013-05-03 Thread Lauri Kasanen
Assigning a struct only copies the members - any padding is left as is. Thus this code: struct foo; foo = bar; leaves the padding of foo intact, ie uninitialized random garbage. This patch fixes constant shader recompiles by initializing the struct to zero. Signed-off-by: Lauri Kasanen --- s

Re: [Mesa-dev] [PATCH] r600g: use old shader disassembler by default

2013-05-03 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, May 3, 2013 at 10:04 AM, Vadim Girlin wrote: > New disassembler is not completely isolated yet from further processing > in r600g/sb that is not required for printing the dump, so it has higher > probability to fail in case of any unexpected features in th

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Marek Olšák
FWIW, this maps nicely to r600, which also has separate instructions for the low and high 32 bits. As to what option is better, it really depends on whether shading languages and OpenCL expose the instructions directly through functions, or whether they just have 64-bit integers. Marek On Fri, Ma

[Mesa-dev] [PATCH 2/2] scons: remove nouveau build

2013-05-03 Thread Andreas Boll
One build system for linux/unix only drivers should be enough. Additionally the nouveau target was disabled anyway. --- src/gallium/SConscript | 15 --- src/gallium/drivers/nouveau/SConscript | 10 -- src/gallium/drivers/nv30/SConscript| 11 ---

[Mesa-dev] [PATCH 1/2] scons: remove radeon build

2013-05-03 Thread Andreas Boll
One build system for linux/unix only drivers should be enough. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48694 --- scons/gallium.py|1 - src/gallium/SConscript | 24 --- src/gallium/drivers/r300/SConscript

[Mesa-dev] [Bug 59591] BUILD make distclean fails

2013-05-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=59591 Andy Furniss changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH] st/xvmc/tests: Fix build failure, v2

2013-05-03 Thread Christian König
Am 03.05.2013 10:48, schrieb Lauri Kasanen: v2: Removed extra libs as requested by Matt Turner. Signed-off-by: Lauri Kasanen Reviewed-by: Christian König --- src/gallium/state_trackers/xvmc/Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium

Re: [Mesa-dev] r600-sb: glxgears wrong rendering

2013-05-03 Thread Lauri Kasanen
On Fri, 03 May 2013 00:39:09 +0400 Vadim Girlin wrote: > I see some issues issues in the dump, looks like compiler doesn't > zero-initialize some data (particularly alu_node::bc) in cases where I > expect it. Possibly it's my bug, I'll look into it, but the data in > question is definitely zer

[Mesa-dev] [PATCH] st/xvmc/tests: Fix build failure, v2

2013-05-03 Thread Lauri Kasanen
v2: Removed extra libs as requested by Matt Turner. Signed-off-by: Lauri Kasanen --- src/gallium/state_trackers/xvmc/Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/state_trackers/xvmc/Makefile.am b/src/gallium/state_trackers/xvmc/Makefile.am ind

[Mesa-dev] [PATCH] r600g: use old shader disassembler by default

2013-05-03 Thread Vadim Girlin
New disassembler is not completely isolated yet from further processing in r600g/sb that is not required for printing the dump, so it has higher probability to fail in case of any unexpected features in the bytecode. This patch adds "sbdisasm" flag for R600_DEBUG that allows to use new disassemble

Re: [Mesa-dev] [PATCH] gallium: fix type of flags in pipe_context::flush()

2013-05-03 Thread Jose Fonseca
- Original Message - > It should be unsigned, not enum pipe_flush_flags. > > Fixed a build error: > > src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: > invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] > While I agree that using enum for bit

Re: [Mesa-dev] [PATCH 1/2] gallivm: allow negation of all integer types

2013-05-03 Thread Michel Dänzer
On Fre, 2013-05-03 at 02:00 +0200, Roland Scheidegger wrote: > Am 03.05.2013 00:29, schrieb Dave Airlie: > > On Fri, May 3, 2013 at 6:04 AM, Zack Rusin wrote: > >>> Well in contrast to the IF/UIF they'd be really redundant unless I'm > >>> missing something so just for supporting negation on inpu

[Mesa-dev] [PATCH 2/2] android: libsync is needed on Android 4.2+ for any driver

2013-05-03 Thread Chia-I Wu
Add libsync not only for MESA_BUILD_CLASSIC, but also for MESA_BUILD_GALLIUM. Signed-off-by: Chia-I Wu --- src/egl/main/Android.mk |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk index b2cbe05..30e5ea7 100644 --- a/

[Mesa-dev] [PATCH 1/2] android: add ilo to the build system

2013-05-03 Thread Chia-I Wu
It can be selected with BOARD_GPU_DRIVERS := ilo Signed-off-by: Chia-I Wu --- Android.mk|4 +-- src/egl/main/Android.mk |6 + src/gallium/Android.mk|5 src/gallium/drivers/ilo/Android.mk| 39 +

[Mesa-dev] [PATCH 0/2] android: add ilo

2013-05-03 Thread Chia-I Wu
Hi, This patch series allows ilo to be selected as the GPU driver on Android-IA. The second patch fixes a linking error, which should be common to other Gallium-based drivers. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesk