Re: [Mesa-dev] [PATCH v1] Remove UINT_AS_FLT, INT_AS_FLT, FLOAT_AS_FLT macros.No functional changes, only bug fixed.

2015-01-21 Thread Kenneth Graunke
On Thursday, January 22, 2015 12:12:18 AM marius.pre...@intel.com wrote: > From: Marius Predut > > On 32-bit, for floating point operations is used x86 FPU registers instead > SSE, > reason for when reinterprets an integer as a float result is unexpected > (modify floats when they are written t

[Mesa-dev] [Bug 84566] Unify the format conversion code

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84566 Jason Ekstrand changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [Bug 87137] Unable to build when configured with openmp and CFLAGS/LDFLAGS contain -fopenmp

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87137 Matt Turner changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH 5/5] nir: Add nir_lower_alu_scalar.

2015-01-21 Thread Jason Ekstrand
Overall this looks correct. I've got a few nits below and I'd like to take a look at it with fresh eyes before giving an R-B as it's complicated especially with all of the stuff to handle non-ssa. Not sure if it's really worth doing non-ssa now that I see how much more complicated it makes things

Re: [Mesa-dev] [PATCH] nir: Replace assert(0) with unreachable().

2015-01-21 Thread Connor Abbott
Reviewed-by: Connor Abbott On Wed, Jan 21, 2015 at 11:23 PM, Matt Turner wrote: > Fixes a couple of warnings in the process. > --- > src/glsl/nir/glsl_to_nir.cpp | 57 > -- > src/glsl/nir/nir.h | 3 +- > src/glsl/nir/nir_lower_syst

[Mesa-dev] [PATCH] nir: Replace assert(0) with unreachable().

2015-01-21 Thread Matt Turner
Fixes a couple of warnings in the process. --- src/glsl/nir/glsl_to_nir.cpp | 57 -- src/glsl/nir/nir.h | 3 +- src/glsl/nir/nir_lower_system_values.c | 3 +- src/glsl/nir/nir_to_ssa.c | 2 +- 4 files changed, 22 inserti

Re: [Mesa-dev] [PATCH 2/5] nir: Make an easier helper for setting up SSA defs.

2015-01-21 Thread Jason Ekstrand
Yes, please. I've made that mistake enough myself. Reviewed-by: Jason Ekstrand On Wed, Jan 21, 2015 at 5:25 PM, Eric Anholt wrote: > Almost all instructions we nir_ssa_def_init() for are nir_dests, and you > have to keep from forgetting to set is_ssa when you do. Just provide the > simpler h

Re: [Mesa-dev] [PATCH 4/5] nir: Make some helpers for copying ALU src/dests.

2015-01-21 Thread Jason Ekstrand
On Wed, Jan 21, 2015 at 5:26 PM, Eric Anholt wrote: > There aren't many users yet, but I wanted to do this from my scalarizing > pass. > --- > src/glsl/nir/nir.c | 18 ++ > src/glsl/nir/nir.h | 5 - > src/glsl/nir/nir_lower_vec_to_movs

Re: [Mesa-dev] [PATCH 1/5] nir: Expose nir_print_instr() for debug prints

2015-01-21 Thread Jason Ekstrand
On Wed, Jan 21, 2015 at 5:25 PM, Eric Anholt wrote: > It's nice to have this present in your default cases so you can see what > instruction is triggering an abort. > --- > src/glsl/nir/nir.h | 1 + > src/glsl/nir/nir_print.c | 14 -- > 2 files changed, 13 insertions(+), 2 del

Re: [Mesa-dev] [PATCH 06/16] i965: Add a brw_invert_cmod() function.

2015-01-21 Thread Matt Turner
On Wed, Jan 21, 2015 at 6:57 PM, Ian Romanick wrote: > On 01/21/2015 03:05 PM, Matt Turner wrote: >> On Wed, Jan 21, 2015 at 2:52 PM, Kenneth Graunke >> wrote: >>> On Wednesday, January 21, 2015 01:02:46 PM Matt Turner wrote: Okay, I changed the name, and in the process of thinking about th

Re: [Mesa-dev] [PATCH 3/5] nir: Fix setup of constant bool initializers.

2015-01-21 Thread Jason Ekstrand
Connor wrote *exactly* the same patch: http://lists.freedesktop.org/archives/mesa-dev/2015-January/074522.html This version can have my R-B too. And, fwiw, I like your commit message better. On Wed, Jan 21, 2015 at 5:25 PM, Eric Anholt wrote: > brw_fs_nir has only seen scalar bools so far, th

Re: [Mesa-dev] [PATCH] mesa/autoconf: attempt to use gnu99 on older gcc compilers

2015-01-21 Thread Jason Ekstrand
FYI: I just pushed the NIR patches with Connor's R-B so as soon as we're done with configure.ac, we should be building on RHEL6 again. --Jason On Wed, Jan 21, 2015 at 5:37 PM, Ian Romanick wrote: > On 01/21/2015 05:35 PM, Matt Turner wrote: > > On Wed, Jan 21, 2015 at 5:28 PM, Dave Airlie wrote

[Mesa-dev] [PATCH 2/2] st/clover: Use std::string for target IR string parameter

2015-01-21 Thread Michel Dänzer
From: Michel Dänzer That's what device::ir_target() returns. Fixes reading beyond allocated memory: ==1936== Invalid read of size 1 ==1936==at 0x4C2C1B4: strlen (vg_replace_strmem.c:412) ==1936==by 0x9E00C30: std::basic_string, std::allocator >::basic_string(char const*, std::allocator

[Mesa-dev] [PATCH 1/2] r600g, radeonsi: Fix calculation of IR target cap string buffer size

2015-01-21 Thread Michel Dänzer
From: Michel Dänzer Fixes writing beyond the allocated buffer: ==31855== Invalid write of size 1 ==31855==at 0x50AB2A9: vsprintf (iovsprintf.c:43) ==31855==by 0x508F6F6: sprintf (sprintf.c:32) ==31855==by 0xB59C7EC: r600_get_compute_param (r600_pipe_common.c:526) ==31855==by 0x5B

Re: [Mesa-dev] [PATCH 2.1/2] SQUASH nir: Get rid of more designated initializers

2015-01-21 Thread Connor Abbott
Reviewed-by: Connor Abbbott On Wed, Jan 21, 2015 at 8:25 PM, Jason Ekstrand wrote: > --- > src/glsl/nir/nir_search.c | 24 ++-- > 1 file changed, 10 insertions(+), 14 deletions(-) > > diff --git a/src/glsl/nir/nir_search.c b/src/glsl/nir/nir_search.c > index a7bd051..e69fdfd

Re: [Mesa-dev] [PATCH 06/16] i965: Add a brw_invert_cmod() function.

2015-01-21 Thread Ian Romanick
On 01/21/2015 03:05 PM, Matt Turner wrote: > On Wed, Jan 21, 2015 at 2:52 PM, Kenneth Graunke > wrote: >> On Wednesday, January 21, 2015 01:02:46 PM Matt Turner wrote: >>> On Tue, Jan 20, 2015 at 12:11 AM, Kenneth Graunke >>> wrote: On Monday, January 19, 2015 03:31:05 PM Matt Turner wrote

Re: [Mesa-dev] [PATCH 08/21] main: Add entry point for NamedBufferSubData.

2015-01-21 Thread Ian Romanick
On 01/21/2015 05:40 PM, Laura Ekstrand wrote: > --- > src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 ++ > src/mesa/main/bufferobj.c | 150 > - > src/mesa/main/bufferobj.h | 13 ++- > src/mesa/main/tests/dispatch_sanity.cpp

Re: [Mesa-dev] [PATCH 06/21] main: Add entry point for NamedBufferData.

2015-01-21 Thread Ian Romanick
On 01/21/2015 05:40 PM, Laura Ekstrand wrote: > --- > src/mapi/glapi/gen/ARB_direct_state_access.xml | 9 ++- > src/mesa/main/bufferobj.c | 77 > -- > src/mesa/main/bufferobj.h | 13 - > src/mesa/main/tests/dispatch_sanity.cpp

Re: [Mesa-dev] [PATCH] radeonsi: Enable VGPR spilling for all shader types v3

2015-01-21 Thread Michel Dänzer
On 21.01.2015 21:12, Marek Olšák wrote: > We also had a case when the CPU accidentally corrupted shaders, > because the shaders were mapped after textures and a CPU texture > upload overflowed and overwrote shaders. I suppose we should have > unmapped the shaders. Sounds like a good idea. Tom, f

Re: [Mesa-dev] [PATCH 03/21] GL: Correct function arguments for NamedBufferStorage.

2015-01-21 Thread Ian Romanick
On 01/21/2015 05:40 PM, Laura Ekstrand wrote: > --- > include/GL/glext.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/GL/glext.h b/include/GL/glext.h > index 88505b0..1ffe576 100644 > --- a/include/GL/glext.h > +++ b/include/GL/glext.h > @@ -2735,7 +2735,7 @@ G

[Mesa-dev] [PATCH 1/2] GL: Corrected function arguments for TextureBufferRange.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index d3cfbb5..88505b0 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2773,7 +2773,7 @@ GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuin

[Mesa-dev] [PATCH 2/2] main: Add entry point for glTextureBufferRange.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 8 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/teximage.c | 92 +- src/mesa/main/teximage.h | 4 ++ 4 files changed, 104 insertions(+), 1 deletion

[Mesa-dev] [PATCH 0/7] nir: Add scalarizing and use it in i965

2015-01-21 Thread Jason Ekstrand
Yes, I'm fully aware that some of this is a repeat of what eric just sent. However, most of the repeated work is in the first patch (and the 5th) which I'm not too worried about. There's two solutions to scalarizing things floating around and we can decide what we like best. The important parts h

[Mesa-dev] [PATCH 5/7] nir: Add a pass to lower things like bany and ball to scalar operations

2015-01-21 Thread Jason Ekstrand
--- src/glsl/Makefile.am | 6 +++ src/glsl/Makefile.sources| 1 + src/glsl/nir/nir.h | 2 + src/glsl/nir/nir_lower_alu_reductions.py | 78 4 files changed, 87 insertions(+) create mode 100644 src/glsl/ni

[Mesa-dev] [PATCH 2/7] nir: Add a pass to lower vector phi nodes to scalar phi nodes

2015-01-21 Thread Jason Ekstrand
--- src/glsl/Makefile.sources | 1 + src/glsl/nir/nir.h | 2 + src/glsl/nir/nir_lower_phis_to_scalar.c | 238 3 files changed, 241 insertions(+) create mode 100644 src/glsl/nir/nir_lower_phis_to_scalar.c diff --git a/src/gls

[Mesa-dev] [PATCH 6/7] i965/fs: Use NIR's scalarizing abilities and stop handling vectors

2015-01-21 Thread Jason Ekstrand
Now that we can scalarize with NIR, there's no need for all this code anymore. Let's get rid of it and just do scalar operations. --- src/mesa/drivers/dri/i965/brw_fs.h | 15 - src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 489 ++- 2 files changed, 158 insertions(+

[Mesa-dev] [PATCH 7/7] i965/fs_nir: Get rid of get_alu_src

2015-01-21 Thread Jason Ekstrand
Originally, get_alu_src was supposed to handle resolving swizzles and things like that. However, now that every instruction we have only takes scalar sources, we don't really need it anymore. The only case where it's still marginally useful is for the MOV's that are generated from the out-of-ssa

[Mesa-dev] [PATCH 1/7] nir: Add a pass for scalarizing ALU operations

2015-01-21 Thread Jason Ekstrand
--- src/glsl/Makefile.sources | 1 + src/glsl/nir/nir.h | 2 + src/glsl/nir/nir_lower_alu_to_scalar.c | 155 + 3 files changed, 158 insertions(+) create mode 100644 src/glsl/nir/nir_lower_alu_to_scalar.c diff --git a/src/glsl/M

[Mesa-dev] [PATCH 4/7] nir/search: Add a swizzle to nir_search_variable and use it for replacements

2015-01-21 Thread Jason Ekstrand
--- src/glsl/nir/nir_algebraic.py | 14 ++ src/glsl/nir/nir_search.c | 6 +- src/glsl/nir/nir_search.h | 7 +++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/glsl/nir/nir_algebraic.py b/src/glsl/nir/nir_algebraic.py index f9b246d..37eb523 100644 -

[Mesa-dev] [PATCH 3/7] nir/search: Don't use a nir_alu_src for storing variables

2015-01-21 Thread Jason Ekstrand
Originally, I used a nir_alu_src because I was lazy. However, we only need part of that datastructure and carying the whole thing around implies things we don't want such as the possibility of using non-SSA sources. --- src/glsl/nir/nir_search.c | 21 + 1 file changed, 13 inse

[Mesa-dev] [PATCH 16/21] GL: Correct function arguments for FlushMappedNamedBufferRange.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index bca1b6e..cf0ea3f 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2744,7 +2744,7 @@ GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GL

[Mesa-dev] [PATCH 20/21] GL: Correct function arguments for GetNamedBufferSubData.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index cf0ea3f..ceb8b2f 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2748,7 +2748,7 @@ GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer

[Mesa-dev] [PATCH 19/21] main: Add entry point for GetNamedBufferPointerv.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 ++ src/mesa/main/bufferobj.c | 27 +++--- src/mesa/main/bufferobj.h | 4 src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 35 insertions(+), 3 dele

[Mesa-dev] [PATCH 21/21] main: Add entry point for glGetNamedBufferSubData.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++ src/mesa/main/bufferobj.c | 24 +++- src/mesa/main/bufferobj.h | 8 ++-- src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 37 insertions(+), 3 d

[Mesa-dev] [PATCH 14/21] main: Add entry points for MapNamedBuffer[Range].

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 14 ++ src/mesa/main/bufferobj.c | 327 - src/mesa/main/bufferobj.h | 20 +- src/mesa/main/tests/dispatch_sanity.cpp| 2 + 4 files changed, 189 insertions(+), 174 dele

[Mesa-dev] [PATCH 18/21] main: Add entry points for GetNamedBufferParameteri[64]v.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 12 ++ src/mesa/main/bufferobj.c | 170 + src/mesa/main/bufferobj.h | 7 + src/mesa/main/tests/dispatch_sanity.cpp| 2 + 4 files changed, 111 insertions(+), 80 deleti

[Mesa-dev] [PATCH 15/21] main: Add entry point for UnmapNamedBuffer.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 5 ++ src/mesa/main/bufferobj.c | 87 ++ src/mesa/main/bufferobj.h | 7 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 47 insertions(+), 53 deletion

[Mesa-dev] [PATCH 12/21] main: Added entry points for ClearNamedBuffer[Sub]Data.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 18 +++ src/mesa/main/bufferobj.c | 156 ++--- src/mesa/main/bufferobj.h | 34 -- src/mesa/main/tests/dispatch_sanity.cpp| 2 + src/mesa/state_tracker/st_cb_bufferobje

[Mesa-dev] [PATCH 17/21] main: Add entry point for FlushMappedNamedBufferRange.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 ++ src/mesa/main/bufferobj.c | 76 +- src/mesa/main/bufferobj.h | 10 src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 67 insertions(+), 26 deletio

[Mesa-dev] [PATCH 09/21] GL: Correct function arguments for glCopyNamedBufferSubData.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 3f141a2..925df18 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2738,7 +2738,7 @@ GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers)

[Mesa-dev] [PATCH 04/21] main: Add entry point for NamedBufferStorage.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++ src/mesa/main/bufferobj.c | 63 +++--- src/mesa/main/bufferobj.h | 9 src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 64 insertions(+), 16 deleti

[Mesa-dev] [PATCH 07/21] GL: Correct function arguments for glNamedBufferSubData.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 0bc9e98..3f141a2 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2737,7 +2737,7 @@ GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLe

[Mesa-dev] [PATCH 13/21] GL: Correct function arguments for MapNamedBufferRange.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 2543d1b..bca1b6e 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2742,7 +2742,7 @@ GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer,

[Mesa-dev] [PATCH 06/21] main: Add entry point for NamedBufferData.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 9 ++- src/mesa/main/bufferobj.c | 77 -- src/mesa/main/bufferobj.h | 13 - src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 69 insertions(+), 31 delet

[Mesa-dev] [PATCH 11/21] GL: Correct function arguments for ClearNamedBufferSubData.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 925df18..2543d1b 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2740,7 +2740,7 @@ GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr

[Mesa-dev] [PATCH 10/21] main: Add entry point for CopyNamedBufferSubData.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 8 ++ src/mesa/main/bufferobj.c | 102 - src/mesa/main/bufferobj.h | 12 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 89 insertions(+), 34 delet

[Mesa-dev] [PATCH 08/21] main: Add entry point for NamedBufferSubData.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 ++ src/mesa/main/bufferobj.c | 150 - src/mesa/main/bufferobj.h | 13 ++- src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 113 insertions(+), 58 dele

[Mesa-dev] [PATCH 05/21] GL: Correct function arguments for NamedBufferData.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 1ffe576..0bc9e98 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2736,7 +2736,7 @@ GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenu

[Mesa-dev] [PATCH 02/21] main: Add entry point for CreateBuffers.

2015-01-21 Thread Laura Ekstrand
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++ src/mesa/main/bufferobj.c | 65 -- src/mesa/main/bufferobj.h | 5 +- src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 64 insertions(+), 14 deletion

[Mesa-dev] [PATCH 03/21] GL: Correct function arguments for NamedBufferStorage.

2015-01-21 Thread Laura Ekstrand
--- include/GL/glext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 88505b0..1ffe576 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -2735,7 +2735,7 @@ GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum

[Mesa-dev] [PATCH 01/21] main: Add utility function _mesa_lookup_bufferobj_err().

2015-01-21 Thread Laura Ekstrand
--- src/mesa/main/bufferobj.c | 19 +++ src/mesa/main/bufferobj.h | 4 2 files changed, 23 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 0c1ce98..aea7f1d 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1001,

[Mesa-dev] [PATCH v1] Remove UINT_AS_FLT, INT_AS_FLT, FLOAT_AS_FLT macros.No functional changes, only bug fixed.

2015-01-21 Thread marius . predut
From: Marius Predut On 32-bit, for floating point operations is used x86 FPU registers instead SSE, reason for when reinterprets an integer as a float result is unexpected (modify floats when they are written to memory). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82668 Signed-off-b

Re: [Mesa-dev] [PATCH] mesa/autoconf: attempt to use gnu99 on older gcc compilers

2015-01-21 Thread Ian Romanick
On 01/21/2015 05:35 PM, Matt Turner wrote: > On Wed, Jan 21, 2015 at 5:28 PM, Dave Airlie wrote: >> From: Dave Airlie >> >> anonymous structs/union don't work with c99 but do work with gnu99 >> on gcc 4.4. >> >> This on top of Jason's designated initialisers changes, make >> Mesa build on RHEL6 a

Re: [Mesa-dev] [PATCH] mesa/autoconf: attempt to use gnu99 on older gcc compilers

2015-01-21 Thread Matt Turner
On Wed, Jan 21, 2015 at 5:28 PM, Dave Airlie wrote: > From: Dave Airlie > > anonymous structs/union don't work with c99 but do work with gnu99 > on gcc 4.4. > > This on top of Jason's designated initialisers changes, make > Mesa build on RHEL6 again. > > Signed-off-by: Dave Airlie > --- > confi

[Mesa-dev] [PATCH] mesa/autoconf: attempt to use gnu99 on older gcc compilers

2015-01-21 Thread Dave Airlie
From: Dave Airlie anonymous structs/union don't work with c99 but do work with gnu99 on gcc 4.4. This on top of Jason's designated initialisers changes, make Mesa build on RHEL6 again. Signed-off-by: Dave Airlie --- configure.ac | 12 +++- 1 files changed, 11 insertions(+), 1 deleti

[Mesa-dev] [PATCH 2/5] nir: Make an easier helper for setting up SSA defs.

2015-01-21 Thread Eric Anholt
Almost all instructions we nir_ssa_def_init() for are nir_dests, and you have to keep from forgetting to set is_ssa when you do. Just provide the simpler helper, instead. --- src/glsl/nir/glsl_to_nir.cpp| 14 -- src/glsl/nir/nir.c | 8 src/gl

[Mesa-dev] [PATCH 3/5] nir: Fix setup of constant bool initializers.

2015-01-21 Thread Eric Anholt
brw_fs_nir has only seen scalar bools so far, thanks to vector splitting, and the ralloc of in glsl_to_nir.cpp will *usually* get you a 0-filled chunk of memory, so reading too large of a value will usually get you the right bool value. But once we start doing vector bools in a few commits, we end

[Mesa-dev] [PATCH 5/5] nir: Add nir_lower_alu_scalar.

2015-01-21 Thread Eric Anholt
This is the equivalent of brw_fs_channel_expressions.cpp, which I wanted for vc4. --- This series, plus a commit to make i965 use it instead of channel_expressions, is on the nir-scalarize branch of my mesa tree. With the whole series, there are 6 regressions, 3 of which are due to lower-vec-to-m

[Mesa-dev] [PATCH 4/5] nir: Make some helpers for copying ALU src/dests.

2015-01-21 Thread Eric Anholt
There aren't many users yet, but I wanted to do this from my scalarizing pass. --- src/glsl/nir/nir.c | 18 ++ src/glsl/nir/nir.h | 5 - src/glsl/nir/nir_lower_vec_to_movs.c | 7 ++- src/glsl/nir/nir_opt_peephole_select.c | 5 +--

[Mesa-dev] [PATCH 1/5] nir: Expose nir_print_instr() for debug prints

2015-01-21 Thread Eric Anholt
It's nice to have this present in your default cases so you can see what instruction is triggering an abort. --- src/glsl/nir/nir.h | 1 + src/glsl/nir/nir_print.c | 14 -- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h in

[Mesa-dev] [PATCH 2.1/2] SQUASH nir: Get rid of more designated initializers

2015-01-21 Thread Jason Ekstrand
--- src/glsl/nir/nir_search.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/glsl/nir/nir_search.c b/src/glsl/nir/nir_search.c index a7bd051..e69fdfd 100644 --- a/src/glsl/nir/nir_search.c +++ b/src/glsl/nir/nir_search.c @@ -221,13 +221,11 @@ con

Re: [Mesa-dev] [PATCH 2/2] nir: Stop using designated initializers

2015-01-21 Thread Dave Airlie
On 22 January 2015 at 06:19, Jason Ekstrand wrote: > > > On Wed, Jan 21, 2015 at 12:19 PM, Connor Abbott wrote: >> >> Assuming this actually compiles with GCC 4.4... > > > I don't know for sure, but it certainly gets us closer > --Jason > Much closer, CC nir_search.lo ../../src/glsl/nir/nir

Re: [Mesa-dev] [PATCH 2/3] mesa: Add initializer macros to fix missing initializer warnings

2015-01-21 Thread Matt Turner
On Wed, Jan 21, 2015 at 3:49 PM, Jan Vesely wrote: > On Wed, 2015-01-21 at 12:34 -0800, Ian Romanick wrote: >> On 01/21/2015 10:33 AM, Jan Vesely wrote: >> > NFC. >> >> NFC? I'm assuming this doesn't mean Near Field Communications or "no >> 'fine' clue." > > No functional change. seen that in oth

Re: [Mesa-dev] [PATCH 06/16] i965: Add a brw_invert_cmod() function.

2015-01-21 Thread Matt Turner
On Wed, Jan 21, 2015 at 3:19 PM, Kenneth Graunke wrote: > Okay, I see what you're doing now. It's definitely not what my > brw_negate_cmod function did. This is why you absolutely need > doxygen comments, ideally with an example. The functions for > (a cmp1 b) -> !(a cmp1 b) and (a cmp1 b) -> (

Re: [Mesa-dev] [PATCH 2/3] mesa: Add initializer macros to fix missing initializer warnings

2015-01-21 Thread Jan Vesely
On Wed, 2015-01-21 at 12:34 -0800, Ian Romanick wrote: > On 01/21/2015 10:33 AM, Jan Vesely wrote: > > NFC. > > NFC? I'm assuming this doesn't mean Near Field Communications or "no > 'fine' clue." No functional change. seen that in other commits somwhere, thoght it was universal > > > Signed-o

Re: [Mesa-dev] [PATCH 06/16] i965: Add a brw_invert_cmod() function.

2015-01-21 Thread Kenneth Graunke
On Wednesday, January 21, 2015 03:05:03 PM Matt Turner wrote: > On Wed, Jan 21, 2015 at 2:52 PM, Kenneth Graunke > wrote: > > On Wednesday, January 21, 2015 01:02:46 PM Matt Turner wrote: > >> On Tue, Jan 20, 2015 at 12:11 AM, Kenneth Graunke > >> wrote: > >> > On Monday, January 19, 2015 03:31

Re: [Mesa-dev] [PATCH] i965: Do Sandybridge workaround flushes before each primitive.

2015-01-21 Thread Kenneth Graunke
On Wednesday, January 21, 2015 11:59:39 AM Chad Versace wrote: > On 01/09/2015 11:07 PM, Kenneth Graunke wrote: > > Sandybridge requires the post-sync non-zero workaround in a ton of > > places, and if you ever miss one, the GPU usually hangs. > > > > Currently, we try to track exactly when a work

Re: [Mesa-dev] [PATCH 06/16] i965: Add a brw_invert_cmod() function.

2015-01-21 Thread Matt Turner
On Wed, Jan 21, 2015 at 2:52 PM, Kenneth Graunke wrote: > On Wednesday, January 21, 2015 01:02:46 PM Matt Turner wrote: >> On Tue, Jan 20, 2015 at 12:11 AM, Kenneth Graunke >> wrote: >> > On Monday, January 19, 2015 03:31:05 PM Matt Turner wrote: >> >> --- >> >> src/mesa/drivers/dri/i965/brw_eu

Re: [Mesa-dev] [PATCH 06/16] i965: Add a brw_invert_cmod() function.

2015-01-21 Thread Kenneth Graunke
On Wednesday, January 21, 2015 01:02:46 PM Matt Turner wrote: > On Tue, Jan 20, 2015 at 12:11 AM, Kenneth Graunke > wrote: > > On Monday, January 19, 2015 03:31:05 PM Matt Turner wrote: > >> --- > >> src/mesa/drivers/dri/i965/brw_eu.c | 22 ++ > >> src/mesa/drivers/dri/i965/b

Re: [Mesa-dev] [PATCH v2] glsl: do not allow interface block to have name already taken

2015-01-21 Thread Ian Romanick
Reviewed-by: Ian Romanick On 01/20/2015 09:45 PM, Tapani Pälli wrote: > Fixes currently failing Piglit case >interface-blocks-name-reused-globally.vert > > v2: combine var declaration with assignment (Ian) > > Signed-off-by: Tapani Pälli > --- > src/glsl/ast_to_hir.cpp | 16 ++

Re: [Mesa-dev] [PATCH] glsl/parser: (trivial) fix indentation in one function

2015-01-21 Thread Tobias Klausmann
On 21.01.2015 22:22, Matt Turner wrote: On Wed, Jan 21, 2015 at 1:12 PM, Tobias Klausmann wrote: (snip) We're messing up the indentation here. But really we want to get rid of tabs, not add more. glcpp is unfortunately full of tabs. Alright ignore this one then. Thanks, Tobias __

Re: [Mesa-dev] [PATCH] glsl/parser: (trivial) fix indentation in one function

2015-01-21 Thread Matt Turner
On Wed, Jan 21, 2015 at 1:12 PM, Tobias Klausmann wrote: > Signed-off-by: Tobias Klausmann > --- > src/glsl/glcpp/glcpp-parse.y | 19 ++- > 1 file changed, 10 insertions(+), 9 deletions(-) > > diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y > index e5bebe

[Mesa-dev] [PATCH] glsl/parser: (trivial) fix indentation in one function

2015-01-21 Thread Tobias Klausmann
Signed-off-by: Tobias Klausmann --- src/glsl/glcpp/glcpp-parse.y | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index e5bebe5..8b545da 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glc

Re: [Mesa-dev] [PATCH 06/16] i965: Add a brw_invert_cmod() function.

2015-01-21 Thread Matt Turner
On Tue, Jan 20, 2015 at 12:11 AM, Kenneth Graunke wrote: > On Monday, January 19, 2015 03:31:05 PM Matt Turner wrote: >> --- >> src/mesa/drivers/dri/i965/brw_eu.c | 22 ++ >> src/mesa/drivers/dri/i965/brw_eu.h | 1 + >> 2 files changed, 23 insertions(+) >> >> diff --git a/src

Re: [Mesa-dev] [PATCH 3/3] i965: Fix URB size for gen8

2015-01-21 Thread Kenneth Graunke
On Wednesday, January 21, 2015 08:17:36 PM ville.syrj...@linux.intel.com wrote: > From: Ville Syrjälä > > Increase the device info .urb.size for BDW GT3 and CHV to match the > default URB size for each. > > Also add all missing platforms (BYT,BDW,CHV) to the comment describing > the default URB

Re: [Mesa-dev] [PATCH 2/3] i965: Fix min_vs_entries for CHV

2015-01-21 Thread Kenneth Graunke
On Wednesday, January 21, 2015 08:17:35 PM ville.syrj...@linux.intel.com wrote: > From: Ville Syrjälä > > According to BSpec the correct number for min_vs_entries is 34 for CHV. > > Signed-off-by: Ville Syrjälä > --- > src/mesa/drivers/dri/i965/brw_device_info.c | 2 +- > 1 file changed, 1 ins

Re: [Mesa-dev] [PATCH 1/3] i965: Fix max_wm_threads for gen8

2015-01-21 Thread Kenneth Graunke
On Wednesday, January 21, 2015 08:17:34 PM ville.syrj...@linux.intel.com wrote: > From: Ville Syrjälä > > max_wm_threads depends on the GT SKU on gen8. Update the values to > match the spec. > > The max number of threads in 3DSTATE_PS is always programmed to 64 > and the hardware internally scal

Re: [Mesa-dev] [PATCH 2/3] mesa: Add initializer macros to fix missing initializer warnings

2015-01-21 Thread Ian Romanick
On 01/21/2015 10:33 AM, Jan Vesely wrote: > NFC. NFC? I'm assuming this doesn't mean Near Field Communications or "no 'fine' clue." > Signed-off-by: Jan Vesely > --- > src/mesa/main/texcompress_bptc.c | 40 > ++-- > 1 file changed, 22 insertions(+), 18 dele

Re: [Mesa-dev] [PATCH 2/2] nir: Stop using designated initializers

2015-01-21 Thread Jason Ekstrand
On Wed, Jan 21, 2015 at 12:19 PM, Connor Abbott wrote: > Assuming this actually compiles with GCC 4.4... > I don't know for sure, but it certainly gets us closer --Jason > > Reviewed-by: Connor Abbott > > On Wed, Jan 21, 2015 at 2:14 PM, Jason Ekstrand > wrote: > > Designated initializers wi

Re: [Mesa-dev] [PATCH 2/2] nir: Stop using designated initializers

2015-01-21 Thread Connor Abbott
Assuming this actually compiles with GCC 4.4... Reviewed-by: Connor Abbott On Wed, Jan 21, 2015 at 2:14 PM, Jason Ekstrand wrote: > Designated initializers with anonymous unions don't work in MSVC or > GCC < 4.6. With a couple of constructor methods, we don't need them any > more and the code

Re: [Mesa-dev] [PATCH 1/2] nir: Add src and dest constructors

2015-01-21 Thread Connor Abbott
Reviewed-by: Connor Abbott On Wed, Jan 21, 2015 at 2:14 PM, Jason Ekstrand wrote: > --- > src/glsl/nir/nir.h | 37 + > 1 file changed, 37 insertions(+) > > diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h > index 5ebfc5a..7b5794d 100644 > --- a/src/glsl/n

Re: [Mesa-dev] [PATCH] i965: Do Sandybridge workaround flushes before each primitive.

2015-01-21 Thread Chad Versace
On 01/09/2015 11:07 PM, Kenneth Graunke wrote: > Sandybridge requires the post-sync non-zero workaround in a ton of > places, and if you ever miss one, the GPU usually hangs. > > Currently, we try to track exactly when a workaround flush is > necessary (via the brw->batch.need_workaround_flush fla

[Mesa-dev] [Bug 88467] nir.c:140: error: ‘nir_src’ has no member named ‘ssa’

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88467 --- Comment #11 from Jason Ekstrand --- (In reply to Jason Ekstrand from comment #10) > (In reply to Dave Airlie from comment #6) > > This is actually more annoying > > > > with gcc 4.4 > > > > gcc -std=gnu99 supports anonymous structs, but doe

[Mesa-dev] [PATCH 2/2] nir: Stop using designated initializers

2015-01-21 Thread Jason Ekstrand
Designated initializers with anonymous unions don't work in MSVC or GCC < 4.6. With a couple of constructor methods, we don't need them any more and the code is actually cleaner. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88467 --- src/glsl/nir/nir_from_ssa.c | 30 +++

[Mesa-dev] [PATCH 1/2] nir: Add src and dest constructors

2015-01-21 Thread Jason Ekstrand
--- src/glsl/nir/nir.h | 37 + 1 file changed, 37 insertions(+) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 5ebfc5a..7b5794d 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -482,6 +482,43 @@ typedef struct { bool is_ssa; } nir_de

[Mesa-dev] [PATCH 3/3] mesa: more missing initializers

2015-01-21 Thread Jan Vesely
NFC. Signed-off-by: Jan Vesely --- src/mesa/state_tracker/st_extensions.c | 47 ++ 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 48ed9d2..f2bcf64 100644 --- a/

[Mesa-dev] [PATCH 2/3] mesa: Add initializer macros to fix missing initializer warnings

2015-01-21 Thread Jan Vesely
NFC. Signed-off-by: Jan Vesely --- src/mesa/main/texcompress_bptc.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/mesa/main/texcompress_bptc.c b/src/mesa/main/texcompress_bptc.c index c944ac2..56ca320 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 1/3] mesa: get_hash: Add missing field initializers

2015-01-21 Thread Jan Vesely
NFC. Signed-off-by: Jan Vesely --- This series fixes 38 -Wmissing-field-initializers warnings reported by gcc src/mesa/main/get_hash_params.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index c

[Mesa-dev] [PATCH 3/3] i965: Fix URB size for gen8

2015-01-21 Thread ville . syrjala
From: Ville Syrjälä Increase the device info .urb.size for BDW GT3 and CHV to match the default URB size for each. Also add all missing platforms (BYT,BDW,CHV) to the comment describing the default URB size in gen7_urb.c. Signed-off-by: Ville Syrjälä --- src/mesa/drivers/dri/i965/brw_device_i

[Mesa-dev] [PATCH 1/3] i965: Fix max_wm_threads for gen8

2015-01-21 Thread ville . syrjala
From: Ville Syrjälä max_wm_threads depends on the GT SKU on gen8. Update the values to match the spec. The max number of threads in 3DSTATE_PS is always programmed to 64 and the hardware internally scales that depending on the GT SKU. So this doesn't change the max number of threads actually use

[Mesa-dev] [PATCH 2/3] i965: Fix min_vs_entries for CHV

2015-01-21 Thread ville . syrjala
From: Ville Syrjälä According to BSpec the correct number for min_vs_entries is 34 for CHV. Signed-off-by: Ville Syrjälä --- src/mesa/drivers/dri/i965/brw_device_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/src/mesa/d

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 Stéphane Travostino changed: What|Removed |Added Status|NEEDINFO|RESOLVED Resolution|---

[Mesa-dev] [Bug 88467] nir.c:140: error: ‘nir_src’ has no member named ‘ssa’

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88467 --- Comment #10 from Jason Ekstrand --- (In reply to Dave Airlie from comment #6) > This is actually more annoying > > with gcc 4.4 > > gcc -std=gnu99 supports anonymous structs, but doesn't support designated > initialisers for anonymous struc

Re: [Mesa-dev] [PATCH] nir: Implement CSE on intrinsics that can be eliminated and reordered.

2015-01-21 Thread Jason Ekstrand
On Jan 21, 2015 3:29 AM, "Kenneth Graunke" wrote: > > Matt and I noticed that one of the shaders hurt by INTEL_USE_NIR=1 had > load_input and load_uniform intrinsics repeated several times, with the > same parameters, but each one generating a distinct SSA value. This > made ALU operations on tho

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #29 from Eero Tamminen --- You need to do one more test. if you'll echo max freq value to /sys/kernel/debug/dri/0/i915_min_freq, kernel will not drop GPU frequency. If that gets rid of the issue, it's kernel PM issue. If the CAGF v

[Mesa-dev] [PATCH 01/11 v2] mesa: Returns a GL_INVALID_VALUE error on several APIs when buffer size is negative

2015-01-21 Thread Eduardo Lima Mitev
Section 2.3.1 (Errors) of the OpenGL 4.5 spec says: "If a negative number is provided where an argument of type sizei or sizeiptr is specified, an INVALID_VALUE error is generated. This patch adds checks for negative buffer size values passed to different APIs. It also moves up the check

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #27 from Stéphane Travostino --- (In reply to Eero Tamminen from comment #26) > as root, mount debugfs and monitor CAGF (actual GPU frequency) value from > "/sys/kernel/debug/dri/0/i915_frequency_info", or if you have older kernel > f

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #28 from Stéphane Travostino --- Forgot to specify that that the min/max frequency of my intel card are 650/1200 MHz -- You are receiving this mail because: You are the assignee for the bug. _

Re: [Mesa-dev] [mesa-dev][PATCH] Remove UINT_AS_FLT, INT_AS_FLT, FLOAT_AS_FLT macros.No functional changes, only bug fixed.

2015-01-21 Thread Neil Roberts
Marius, the ‘Reviewed-by’ tag should only be added if someone explicitly replies to your patch and says that you can add it with their name. It's supposed to mean that the person is happy for the patch to be pushed to master. I did not do this, I only looked at a previous version of the patch brief

[Mesa-dev] [Bug 88662] unaligned access to gl_dlist_node

2015-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=88662 Bug ID: 88662 Summary: unaligned access to gl_dlist_node Product: Mesa Version: 10.4 Hardware: SPARC OS: OpenBSD Status: NEW Severity: normal Pr

  1   2   >