Re: [Mesa-dev] [PATCH] glsl: implement switch flow control using a loop

2014-08-10 Thread Tapani Pälli
Hi; Any comments on this approach? I have also a branch that implements a 'switch specific dead code elimination pass' but it is only enough to fix non-conditional breaks (fs-exec-after-break.shader_test). If I understand correctly fixing conditional breaks would need adding switch breaks as part

[Mesa-dev] [PATCH] i965/fs: Keep track of the register that hold delta_x/delta_y.

2014-08-10 Thread Matt Turner
They're needed in register allocation. Fixes a regression since afe3d155. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78875 Reviewed-by: Kenneth Graunke --- delta_x/delta_y are arrays. Look at each of their elements... src/mesa/drivers/dri/i965/brw_fs.cpp | 14 ++ 1 file

Re: [Mesa-dev] [PATCH 7/8] mesa: fix assertion in _mesa_drawbuffers()

2014-08-10 Thread Popov, Pavel E
I also suggest removing the assertion "ASSERT(_mesa_bitcount(destMask[buf]) == 1);". It's no longer needed with this patch. - Pavel -Original Message- From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On Behalf Of Brian Paul Sent: Monday, August 11, 2014 5:51 AM To: Roland S

Re: [Mesa-dev] [PATCH] i965/fs: Keep track of the register that hold delta_x/delta_y.

2014-08-10 Thread Kenneth Graunke
On Sunday, August 10, 2014 07:06:01 PM Matt Turner wrote: > They're needed in register allocation. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78875 > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/src/mesa/drive

Re: [Mesa-dev] [PATCH] i965: Mark branch unreachable in sampler state code.

2014-08-10 Thread Kenneth Graunke
On Sunday, August 10, 2014 09:38:04 PM Matt Turner wrote: > Silences some uninitialized variable warnings. > --- > src/mesa/drivers/dri/i965/brw_sampler_state.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c > b/src/mesa/dri

[Mesa-dev] [PATCH 3/3] nouveau: force luminance clear colors to have the same g/b values as r

2014-08-10 Thread Ilia Mirkin
Fixes the LUMINANCE_ALPHA formats of fbo-clear-formats piglit test. Signed-off-by: Ilia Mirkin --- Not sure about this one. Perhaps we should just nuke LUMINANCE_ALPHA support? Or we should fix the texturing so that only the R component is read back out? Not sure how to do that though. src/mes

[Mesa-dev] [PATCH 2/3] nouveau: only try to get new storage if there are any levels

2014-08-10 Thread Ilia Mirkin
This would try to allocate 0-sized bo's when the max level was below the base level. Signed-off-by: Ilia Mirkin --- src/mesa/drivers/dri/nouveau/nouveau_texture.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_te

[Mesa-dev] [PATCH 1/3] nouveau: add emacs dir-locals file for tabs/8-space indents

2014-08-10 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/mesa/drivers/dri/nouveau/.dir-locals.el | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 src/mesa/drivers/dri/nouveau/.dir-locals.el diff --git a/src/mesa/drivers/dri/nouveau/.dir-locals.el b/src/mesa/drivers/dri/nouveau/.dir-locals.el ne

[Mesa-dev] [PATCH] i965: Mark branch unreachable in sampler state code.

2014-08-10 Thread Matt Turner
Silences some uninitialized variable warnings. --- src/mesa/drivers/dri/i965/brw_sampler_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c b/src/mesa/drivers/dri/i965/brw_sampler_state.c index d03047b..544aa57 100644 --- a/sr

Re: [Mesa-dev] [PATCH 7/8] mesa: fix assertion in _mesa_drawbuffers()

2014-08-10 Thread Popov, Pavel E
Oh, now I realized that you sent the Brian's patch to me :) It's indeed simpler and it works. I also suggest removing the assertion "ASSERT(_mesa_bitcount(destMask[buf]) == 1);". It's no longer needed with this patch. diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index b13a7af.

Re: [Mesa-dev] [PATCH 7/8] mesa: fix assertion in _mesa_drawbuffers()

2014-08-10 Thread Popov, Pavel E
Hi Ian, Yes, it fixes this problem for Debug Mesa. But it doesn't matter now. Brain said that he found a simpler solution and working on patch now. Regards, Pavel -Original Message- From: Ian Romanick [mailto:i...@freedesktop.org] Sent: Saturday, August 09, 2014 4:54 AM To: Brian Paul;

[Mesa-dev] [PATCH v2 3/4] mesa/st: add BPTC formats, expose ARB_texture_compression_bptc

2014-08-10 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_cb_texture.c | 8 +++- src/mesa/state_tracker/st_extensions.c | 6 ++ src/mesa/state_tracker/st_format.c | 36 ++ 3 files changed, 49 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH v2 1/4] gallium: add basic support for BPTC formats

2014-08-10 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- v1 -> v2: - add cases to util_format_srgb and util_format_linear - remove special SRGBA case from util_format_fits_8unorm Not sure if I should rename the SRGBA one to not have a _UNORM ending... src/gallium/auxiliary/Makefile.sources | 1 + src/gallium/

[Mesa-dev] [PATCH v2 4/4] nvc0: add BPTC format support

2014-08-10 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- docs/GL3.txt| 2 +- docs/relnotes/10.3.html | 2 +- src/gallium/drivers/nouveau/nv50/nv50_formats.c | 7 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt in

[Mesa-dev] [PATCH v2 2/4] softpipe, llvmpipe: mark BPTC formats as unsupported

2014-08-10 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/llvmpipe/lp_screen.c | 5 + src/gallium/drivers/softpipe/sp_screen.c | 5 + 2 files changed, 10 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index e10a763..347b1af 100644

[Mesa-dev] [PATCH] hud: don't overrun malloced arrays

2014-08-10 Thread Dave Airlie
From: Dave Airlie ==17630== Invalid read of size 4 ==17630==at 0x400AE10: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==17630==by 0x49024A2: u_upload_data (u_upload_mgr.c:253) ==17630==by 0x49050E1: u_vbuf_draw_vbo (u_vbuf.c:980) ==17630==by 0x487DE29: cso_draw_

Re: [Mesa-dev] [PATCH 03/11] i965/eu: Emulate F32TO16 and F16TO32 on Broadwell.

2014-08-10 Thread Kenneth Graunke
On Sunday, August 10, 2014 04:34:36 PM Chris Forbes wrote: > > + if (align16) { > > + /* Emulate the Gen7 zeroing bug (see comments in vec4_visitor's > > + * emit_pack_half_2x16 method.) > > + */ > > + brw_MOV(p, retype(dst, BRW_REGISTER_TYPE_UD), brw_imm_ud(0

Re: [Mesa-dev] [PATCH 09/11] i965/eu: Refactor jump distance scaling to use a helper function.

2014-08-10 Thread Kenneth Graunke
On Sunday, August 10, 2014 01:47:31 AM Matt Turner wrote: > On Sat, Aug 9, 2014 at 2:28 PM, Kenneth Graunke wrote: [snip] > > diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c > > b/src/mesa/drivers/dri/i965/brw_eu_emit.c > > index 665fc07..3d9c96a 100644 > > --- a/src/mesa/drivers/dri/i965/br

[Mesa-dev] [PATCH] i965/fs: Keep track of the register that hold delta_x/delta_y.

2014-08-10 Thread Matt Turner
They're needed in register allocation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78875 --- src/mesa/drivers/dri/i965/brw_fs.cpp | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index cfe20

Re: [Mesa-dev] [PATCH] i965/fs: Don't set flag_subreg_nr = 1 on predicated FB write setup.

2014-08-10 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] i965/fs: Don't set flag_subreg_nr = 1 on predicated FB write setup.

2014-08-10 Thread Kenneth Graunke
On Haswell, we implement "discard" via predicated SEND messages, using f0.1 instead of f0.0. To accomplish this, we set inst->flag_subreg to 1 on the FS_OPCODE_FB_WRITE. Most instructions using fs_inst::flag_subreg expand to a single assembly instruction. However, FS_OPCODE_FB_WRITE can generate

[Mesa-dev] [PATCH 8/8] i965/fs: Optimize gl_FrontFacing calculation on Gen4/5.

2014-08-10 Thread Matt Turner
Doesn't use fewer instructions, but it does avoid writing the flag register and if we want to switch the representation of true for Gen4/5 in the future, we can just delete the AND instruction. --- Untested. src/mesa/drivers/dri/i965/brw_fs.cpp | 21 - 1 file changed, 16 inser

[Mesa-dev] [PATCH 4/8] i965: Use UniformBooleanTrue value for boolean literal true.

2014-08-10 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 +++- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index c16401b..7f463c2 1

[Mesa-dev] [PATCH 6/8] i965: Use ~0 to represent true on Gen >= 6.

2014-08-10 Thread Matt Turner
total instructions in shared programs: 4292303 -> 4288650 (-0.09%) instructions in affected programs: 299670 -> 296017 (-1.22%) --- TODO: test SNB and confirm that the BSpec is right and the PRM is wrong. src/mesa/drivers/dri/i965/brw_context.c| 27 +++- src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 2/8] mesa: Upload boolean uniforms using UniformBooleanTrue.

2014-08-10 Thread Matt Turner
--- src/mesa/main/uniform_query.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 7e630e6..4cd2bca 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -799,9 +799,9 @

[Mesa-dev] [PATCH 5/8] i965/fs: Optimize emit_bool_to_cond_code for logical exprs.

2014-08-10 Thread Matt Turner
AND, OR, and XOR can generate the conditional code directly. total instructions in shared programs: 4293335 -> 4292303 (-0.02%) instructions in affected programs: 121408 -> 120376 (-0.85%) --- Viewing this patch with git show -w should make review a lot easier. src/mesa/drivers/dri/i965/brw_

[Mesa-dev] [PATCH 7/8] i965/fs: Optimize gl_FrontFacing calculation on Gen6+.

2014-08-10 Thread Matt Turner
total instructions in shared programs: 4288650 -> 4282838 (-0.14%) instructions in affected programs: 595018 -> 589206 (-0.98%) --- src/mesa/drivers/dri/i965/brw_fs.cpp | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.c

[Mesa-dev] [PATCH 3/8] glsl: Use UniformBooleanTrue value for uniform initializers.

2014-08-10 Thread Matt Turner
--- src/glsl/link_uniform_initializers.cpp| 24 +++ src/glsl/link_uniforms.cpp| 5 ++-- src/glsl/linker.cpp | 2 +- src/glsl/linker.h | 6 +++-- src/glsl/tests/copy_constant_to_stor

[Mesa-dev] [PATCH 1/8] i965: Remove dead call to _mesa_associate_uniform_storage().

2014-08-10 Thread Matt Turner
Dead since the call to _mesa_generate_parameters_list_for_uniforms was removed in commit 12751ef2. So this was why all of that code that was supposed to fix up the value of a uniform bool to wasn't happening. --- src/mesa/drivers/dri/i965/brw_shader.cpp | 6 -- 1 file changed, 6 deletions(-)

[Mesa-dev] [PATCH] [rfc] docs/GL3.txt: add GLES 3.1 section

2014-08-10 Thread Dave Airlie
From: Dave Airlie This just cherry-pick the extensions into a list for GLES 3.1 I'm not actually sure if this list if complete or correct, maybe someone else can tell me what I missed, and I'm not 100% sure on multi_draw_indirect. Signed-off-by: Dave Airlie --- docs/GL3.txt | 17 +

Re: [Mesa-dev] [PATCH 7/8] mesa: fix assertion in _mesa_drawbuffers()

2014-08-10 Thread Brian Paul
On 08/08/2014 07:43 PM, Roland Scheidegger wrote: Am 08.08.2014 23:20, schrieb Brian Paul: Fixes failed assertion when _mesa_update_draw_buffers() was called with GL_DRAW_BUFFER == GL_FRONT_AND_BACK. The piglit gl30basic hit this. Cc: "10.2" --- src/mesa/main/buffers.c |5 +++-- 1 file

Re: [Mesa-dev] [PATCH] r600g/compute: Fix Warnings

2014-08-10 Thread Bruno Jimenez
On Sat, 2014-08-09 at 23:51 +0200, Marek Olšák wrote: > Hi Bruno, > > Sorry, I fixed the warnings by myself before I saw your patch. > > Marek Hi Marek, Don't worry, the important thing is that whe warnings are fixed. Thanks! Bruno > > On Thu, Aug 7, 2014 at 12:07 PM, Bruno Jiménez wrote: >

[Mesa-dev] _eglLog(_EGL_FATAL, ...) exits program

2014-08-10 Thread Ilia Mirkin
Hello, I just ran into this issue. I'm running piglits on a NV17 card, which uses the nouveau_vieux (dri) driver. It does not support the DRI_IMAGE stuff. Taking a sample piglit test -- tests/spec/arb_clear_texture/cube.c -- it requests either GL 2.0 or GLES 2.0. The latter would attempt to use E

[Mesa-dev] [PATCH] clover: fix piglit cl-api-build-program test

2014-08-10 Thread EdB
program build should failed if there is created kernel attached to program piglit error: "Trigger CL_INVALID_OPERATION if there are kernel objects attached to program" --- src/gallium/state_trackers/clover/api/kernel.cpp | 10 -- src/gallium/state_trackers/clover/core/kernel.cpp | 1 +

Re: [Mesa-dev] [PATCH] gallium/radeon: Set gpu_address to 0 if r600_virtual_address is false

2014-08-10 Thread Marek Olšák
Pushed, thanks. Marek On Sun, Aug 10, 2014 at 12:52 PM, Niels Ole Salscheider wrote: > Without this patch I get the following during DMA transfers: > [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream ! > radeon :01:00.0: CP DMA dst buffer too small (21475829792 4096) > > This is a fixu

[Mesa-dev] [PATCH] gallium/radeon: Set gpu_address to 0 if r600_virtual_address is false

2014-08-10 Thread Niels Ole Salscheider
Without this patch I get the following during DMA transfers: [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream ! radeon :01:00.0: CP DMA dst buffer too small (21475829792 4096) This is a fixup for e878e154cdfd4dbb5474f776e0a6d86fcb983098. Signed-off-by: Niels Ole Salscheider --- src/g

Re: [Mesa-dev] [PATCH] radeonsi: simplify constant buffer upload for big endian

2014-08-10 Thread Marek Olšák
No, there isn't. That's a very good point. Marek On Sun, Aug 10, 2014 at 5:10 AM, Michel Dänzer wrote: > On 10.08.2014 06:54, Marek Olšák wrote: >> From: Marek Olšák >> >> Point util_memcpy_cpu_to_le32 to a buffer storage directly. >> --- >> src/gallium/drivers/radeonsi/si_descriptors.c | 15 +

Re: [Mesa-dev] [PATCH 0/4] Enable ARB_gpu_shader5 for i965/Gen7

2014-08-10 Thread Matt Turner
These are Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 00/11] ARB_gpu_shader5 d/u sampler array indexing

2014-08-10 Thread Matt Turner
On Sat, Aug 9, 2014 at 7:14 PM, Chris Forbes wrote: > The last big piece of ARB_gpu_shader5! The first two are Reviewed-by: Matt Turner Will look at the rest soon. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/

Re: [Mesa-dev] [PATCH 01/11] glsl: Allow dynamically uniform sampler array indexing with 4.0/gs5

2014-08-10 Thread Matt Turner
On Sat, Aug 9, 2014 at 7:14 PM, Chris Forbes wrote: > Signed-off-by: Chris Forbes > --- > src/glsl/ast_array_index.cpp | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp > index 50f9987..f8dca80 100644 > --- a/

Re: [Mesa-dev] [PATCH 1/4] mesa: Make ARB_gpu_shader5 core-profile-only

2014-08-10 Thread Matt Turner
On Sat, Aug 9, 2014 at 9:27 PM, Chris Forbes wrote: > Requires GLSL 1.50 or higher, which we only support in the core profile. > > Signed-off-by: Chris Forbes > --- > src/mesa/main/extensions.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/main/extensions.c b/

Re: [Mesa-dev] i965: Broadwell using brw_eu_emit.c, part 1

2014-08-10 Thread Matt Turner
The series is Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 09/11] i965/eu: Refactor jump distance scaling to use a helper function.

2014-08-10 Thread Matt Turner
On Sat, Aug 9, 2014 at 2:28 PM, Kenneth Graunke wrote: > Different generations of hardware measure jump distances in different > units. Previously, every function that needed to set a jump target open > coded this scaling, or made a hardcoded assumption (i.e. just used 2). > > Most functions star