[Mesa-dev] [PATCH 01/30] r600g: make framebuffer atom rely on dual src blend state.

2016-03-31 Thread Dave Airlie
From: Dave Airlie In order to make ARB_shader_image_load_store, we have to share the CB space with RATs, so we should only steal the dual src space if we have dual src enabled. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 2 +- src/gallium/drivers/r600/r600_pip

[Mesa-dev] [rfc] evergreen/cayman ARB_shader_image_load_store support

2016-03-31 Thread Dave Airlie
This is my first pass attempt at getting ARB_shader_image_load_store going on evergreen/cayman hw. I've tested it on a BARTS card, and it still fails some piglit tests, but it's mostly there and doesn't hang the GPU at all. The fails are mostly in the invalid tests, and some bugs in image size I ne

[Mesa-dev] [PATCH 03/30] r600: refactor texture resource words setup code.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This refactors out the code to setup a texture resource so we can reuse it later from the images code. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 274 + 1 file changed, 158 insertions(+), 116 deletions(-) diff --gi

[Mesa-dev] [PATCH 05/30] r600: refactor binding code for attach buffer to CB.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This refactors out the code and fixes it up to be used for images later. It uses the code in the current RAT binding for compute. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 111 - 1 file changed, 78 insertions(+), 3

[Mesa-dev] [PATCH 02/30] r600: factor out the code to initialise a buffer resource.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This takes the code required to initialise a buffer resource out of the texture buffer code, into it's own function. This is going to be used for the image support later. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 81 +++--

[Mesa-dev] [PATCH 04/30] r600: refactor out CB setup.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This moves the code to create CB info out into a separate function so it can be reused in images code to create RATs. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 257 + 1 file changed, 147 insertions(+), 110 deletion

[Mesa-dev] [PATCH 07/30] r600: route indirect address register correctly for vtx fetches.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This was found during writing the images code, we need to make sure we route the correct index register. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_asm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_asm.c

[Mesa-dev] [PATCH 24/30] r600/shader: add support for RESQ instruction

2016-03-31 Thread Dave Airlie
From: Dave Airlie This is incomplete support, buffer and cube array levels don't work, need to rework the constant buffer to store values for these. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 68 -- 1 file changed, 65 insertions(+),

[Mesa-dev] [PATCH 17/30] r600/shader: add a flag to denote the shader uses images.

2016-03-31 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 2 +- src/gallium/drivers/r600/r600_shader.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 7765

[Mesa-dev] [PATCH 22/30] r600/shader: add support for the store instruction

2016-03-31 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 61 -- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 9694053..d6d0cc3

[Mesa-dev] [PATCH 25/30] r600/shader: accept image declaration.

2016-03-31 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index ba0398f..69507d4 100644 --- a/src/gallium/drivers/r600/r600_shader.c

[Mesa-dev] [PATCH 06/30] radeon: add support for allocating immediate buffer.

2016-03-31 Thread Dave Airlie
From: Dave Airlie The evergreen RAT operations require a buffer to store the results of the operations to, this buffer should be allocated while images are in use. This adds a pointer/creation/cleanup functions to the common code to use this buffer later. Signed-off-by: Dave Airlie --- src/ga

[Mesa-dev] [PATCH 11/30] r600: add support for mark bit to the assembler.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This adds support to the assembler for the mark bit on the export word1. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/eg_asm.c | 2 ++ src/gallium/drivers/r600/r600_asm.c | 4 src/gallium/drivers/r600/r600_asm.h | 1 + 3 files changed, 7 insertions(+) diff

[Mesa-dev] [PATCH 18/30] r600/shader: add support for working out thread id index.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This value is required for loads and atomic operations. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/

[Mesa-dev] [PATCH 13/30] r600: add RAT instruction defines.

2016-03-31 Thread Dave Airlie
From: Dave Airlie These are taken from the evergreen programming manual. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_sq.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/src/gallium/drivers/r600/r600_sq.h b/src/gallium/drivers/r600/r60

[Mesa-dev] [PATCH 23/30] r600/shader: add support for atomic image operations.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This adds support for the atomic image operations using the RAT instructions. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 149 - 1 file changed, 129 insertions(+), 20 deletions(-) diff --git a/src/gallium/drivers/r6

[Mesa-dev] [PATCH 14/30] r600: for memory instructions dump index gpr for read indirects also.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This just makes sure we can see the index gpr in the asm dumps. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_asm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c

[Mesa-dev] [PATCH 09/30] r600: add support for some ALU sources.

2016-03-31 Thread Dave Airlie
From: Dave Airlie These special ALU sources provide the shader engine, simd and hw wave ids. These are required for images support. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_asm.c | 9 + src/gallium/drivers/r600/r600_sq.h | 4 2 files changed, 13 insertions(+)

[Mesa-dev] [PATCH 08/30] r600: add support for vertex fetches via texture cache

2016-03-31 Thread Dave Airlie
From: Dave Airlie On evergreen we can route vertex fetches via the texture cache, and this is required for some images support. So add support to the asm builder for it. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_asm.c | 20 ++-- src/gallium/drivers/r600/r600_

[Mesa-dev] [PATCH 16/30] r600: add support for early depth/stencil.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This add support for the early depth/stencil property found on image shaders. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 3 +++ src/gallium/drivers/r600/evergreend.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/gallium/driver

[Mesa-dev] [PATCH 19/30] r600: add shader rat_base information

2016-03-31 Thread Dave Airlie
From: Dave Airlie The RAT share space with the color outputs, so add a field to denote what the rat_base for the current shader is. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 1 + src/gallium/drivers/r600/r600_shader.h | 1 + 2 files changed, 2 insertions(+) diff

[Mesa-dev] [PATCH 10/30] r600: add support for valid pixel mode on CF clauses

2016-03-31 Thread Dave Airlie
From: Dave Airlie This just adds support to the assembler for setting the valid pixel mode on the CF clause. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/eg_asm.c | 1 + src/gallium/drivers/r600/r600_asm.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/drivers/r

[Mesa-dev] [PATCH 20/30] r600: introduce defines for image resources

2016-03-31 Thread Dave Airlie
From: Dave Airlie We need to store two resources per image for the pixel shader. The first resource is for the immediate RAT result buffer, the second resource is for the actual image resource for getting RESQ correct. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_pipe.h | 8 ++

[Mesa-dev] [PATCH 15/30] r600: add missing CB immediate registers

2016-03-31 Thread Dave Airlie
From: Dave Airlie These registers are required to bind CB RAT readback buffers. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreend.h | 12 1 file changed, 12 insertions(+) diff --git a/src/gallium/drivers/r600/evergreend.h b/src/gallium/drivers/r600/evergreend.h

[Mesa-dev] [PATCH 21/30] r600/shader: add support for the load instruction.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This adds support for the TGSI load instruction. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 133 - 1 file changed, 131 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/galliu

[Mesa-dev] [PATCH 12/30] r600: add support for emitting RAT instructions to the assembler.

2016-03-31 Thread Dave Airlie
From: Dave Airlie This adds support for emitting RAT instructions to the assembler. RAT instructions are used to implement image accessors. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/eg_asm.c | 19 +++ src/gallium/drivers/r600/eg_sq.h| 13 + src/g

[Mesa-dev] [PATCH 28/30] r600: add shader state suport

2016-03-31 Thread Dave Airlie
From: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 271 - src/gallium/drivers/r600/r600_hw_context.c | 3 + src/gallium/drivers/r600/r600_pipe.h | 30 +++- 3 files changed, 300 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/r6

[Mesa-dev] [PATCH 26/30] r600/shader: disable SB for images.

2016-03-31 Thread Dave Airlie
From: Dave Airlie Disable SB if we see images until we can validate it. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 69507d4..f1

[Mesa-dev] [PATCH 27/30] r600/shader: had support for memory barrier.

2016-03-31 Thread Dave Airlie
From: Dave Airlie I'm not 100% sure this is correct. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index f15408b..172

[Mesa-dev] [PATCH 30/30] docs: update ARB_shader_image_load_store for r600.

2016-03-31 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index c76b1e2..a1c573f 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -154,7 +154,7 @@ GL 4.2, GLSL 4.20: GL_ARB_texture_storage

[Mesa-dev] [PATCH 29/30] r600: enable ARB_shader_image_load_store on evergreen/cayman

2016-03-31 Thread Dave Airlie
From: Dave Airlie This isn't tested on cayman properly yet. Also the hw only support images on compute/fragment shaders, no other shader stages. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_pipe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/r600/

Re: [Mesa-dev] [PATCH] tgsi: skip texture query opcodes when examining texture targets

2016-03-31 Thread Michel Dänzer
On 31.03.2016 00:58, Brian Paul wrote: > Should fix the assertion in piglit > spec@arb_gpu_shader5@texturegather@fs-r-none-shadow-2d when the > TXQ instruction specifies a 2D target but the sampler view was > declared as SHADOW2D. > --- > src/gallium/auxiliary/tgsi/tgsi_scan.c | 16 +++

Re: [Mesa-dev] [PATCH v2 2/2] glsl: raise warning when using uninitialized variables

2016-03-31 Thread Jordan Justen
On 2016-03-30 02:03:29, Alejandro Piñeiro wrote: > On 30/03/16 09:44, Alejandro Piñeiro wrote: > > On 30/03/16 06:16, Kenneth Graunke wrote: > > >> I was just looking at that today...adding an ordinary global variable > >> in builtin_variables.cpp seems really wrong. > > I think that I don't follo

Re: [Mesa-dev] [RFC PATCH] GBM: Add map/unmap functions

2016-03-31 Thread Axel Davy
On 31/03/2016 05:21, Rob Herring wrote : int (*getCapabilities)(__DRIscreen *screen); + + /** +* Lock a part of a __DRIimage for specified usage +* +* flush_flag: +*0: no flush +*__BLIT_FLAG_FLUSH: flush after the blit operation +*__BLI

[Mesa-dev] [PATCH 1/2] tgsi: fix out of bounds access in exec_atomop()

2016-03-31 Thread Samuel Pitoiset
The number of channels must be 4 for all RGBA components. Fixes: 22d129601 ("tgsi: add support for image operations to tgsi_exec. (v2.1)") Signed-off-by: Samuel Pitoiset Cc: Dave Airlie --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 2/2] tgsi: silence compiler warning in fetch_sampler_unit()

2016-03-31 Thread Samuel Pitoiset
The unit variable can be used uninitialized. Fixes: 24e77cb09 ("tgsi: handle indirect sampler arrays. (v2)") Signed-off-by: Samuel Pitoiset Cc: Dave Airlie --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/t

Re: [Mesa-dev] [PATCH v2 2/2] glsl: raise warning when using uninitialized variables

2016-03-31 Thread Alejandro Piñeiro
On 31/03/16 09:37, Jordan Justen wrote: > On 2016-03-30 02:03:29, Alejandro Piñeiro wrote: >> On 30/03/16 09:44, Alejandro Piñeiro wrote: >>> On 30/03/16 06:16, Kenneth Graunke wrote: I was just looking at that today...adding an ordinary global variable in builtin_variables.cpp seems real

[Mesa-dev] [PATCH] i965: Use brw->urb.min_vs_urb_entries instead of 32 for BLORP.

2016-03-31 Thread Kenneth Graunke
Haswell GT2 and GT3 have a minimum of 64 entries. Hardcoding 32 is not legal. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen7_blorp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen7_blor

Re: [Mesa-dev] [PATCH] i965: Use brw->urb.min_vs_urb_entries instead of 32 for BLORP.

2016-03-31 Thread Pohjolainen, Topi
On Thu, Mar 31, 2016 at 02:18:18AM -0700, Kenneth Graunke wrote: > Haswell GT2 and GT3 have a minimum of 64 entries. Hardcoding 32 > is not legal. Makes also error state decoder happy :) Reviewed-by: Topi Pohjolainen > > Cc: mesa-sta...@lists.freedesktop.org > Signed-off-by: Kenneth Graunke

Re: [Mesa-dev] [PATCH] i965: Use brw->urb.min_vs_urb_entries instead of 32 for BLORP.

2016-03-31 Thread Alejandro Piñeiro
On 31/03/16 11:18, Kenneth Graunke wrote: > Haswell GT2 and GT3 have a minimum of 64 entries. Hardcoding 32 > is not legal. > > Cc: mesa-sta...@lists.freedesktop.org > Signed-off-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/gen7_blorp.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 de

[Mesa-dev] [PATCH] glsl: do not raise uninitialized variable warning with gl_GlobalInvocationID/gl_LocalInvocationIndex

2016-03-31 Thread Alejandro Piñeiro
Most GLSL built-ins variables are filtered out because they have the mode ir_var_system_value, but those two not. Those two are specially handled as they can be infered from other system values, and were represented as a variable initialized with a value based of those system values, instead of a l

[Mesa-dev] [PATCH v2 07/23] nir/lower_load_const_to_scalar: suppport doubles and multiple bit sizes

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Iago Toral Quiroga --- src/compiler/nir/nir_lower_load_const_to_scalar.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_lower_load_const_to_scalar.c b/src/compiler/nir/nir_lower_load_const_to_scalar.c index d290c30..aae2f7c 100644 --- a/src

[Mesa-dev] [PATCH v2 01/23] nir/from_ssa: adapt to different bit sizes

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/nir_from_ssa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_from_ssa.c b/src/compiler/nir/nir_from_ssa.c index 82317c2..7bbc2c0 100644 --- a/src/compiler/nir/nir_from_ssa.c +++ b/src/compiler/nir/nir_from_ssa.c @@ -474,6 +474

[Mesa-dev] [PATCH v2 00/23] NIR: more bit-size related patches

2016-03-31 Thread Samuel Iglesias Gonsálvez
Hello, This is the second version of this patch series [0]. In case you prefer a repository, it is available here [1]: $ git clone -b nir-bit-size-fixes-2.0 https://github.com/Igalia/mesa.git Thanks, Sam [0] https://lists.freedesktop.org/archives/mesa-dev/2016-March/110465.html [1] https://gi

[Mesa-dev] [PATCH v2 10/23] nir: handle doubles in nir_deref_get_const_initializer_load()

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/nir.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 56a5009..35ad2b3 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -698,6 +698,8 @@ nir_deref_get_const_initializer_load

[Mesa-dev] [PATCH v2 05/23] nir: add bit_size info to nir_load_const_instr_create()

2016-03-31 Thread Samuel Iglesias Gonsálvez
--- src/compiler/nir/nir.c| 8 +--- src/compiler/nir/nir.h| 3 ++- src/compiler/nir/nir_builder.h| 2 +- src/compiler/nir/nir_clone.c | 3 ++- src/compiler/nir/nir_lower_atomics.c | 5

[Mesa-dev] [PATCH v2 03/23] nir: add bit_size info to nir_ssa_undef_instr_create()

2016-03-31 Thread Samuel Iglesias Gonsálvez
Signed-off-by: Samuel Iglesias Gonsálvez --- src/compiler/nir/glsl_to_nir.cpp | 2 +- src/compiler/nir/nir.c | 6 -- src/compiler/nir/nir.h | 3 ++- src/compiler/nir/nir_builder.h | 2 +- src/compiler/nir/nir_clone.c | 3 ++- s

[Mesa-dev] [PATCH v2 09/23] nir/print: add support for printing doubles and bitsize

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott v2: - Squash the printing doubles related patches into one patch (Sam). --- src/compiler/nir/nir_print.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index c295c19..df7ef91 1

[Mesa-dev] [PATCH v2 06/23] nir/lower_to_source_mods: Handle different bit sizes

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Iago Toral Quiroga v2 (Sam): - Use helper to get base type from nir_alu_type. --- src/compiler/nir/nir_lower_to_source_mods.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_lower_to_source_mods.c b/src/compiler/nir/nir_lower_to_source_mods.c

[Mesa-dev] [PATCH v2 08/23] nir/glsl_to_nir: support doubles

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott v2: - Don't set sized types to the destination of texture related opcodes. (Jason) --- src/compiler/nir/glsl_to_nir.cpp | 64 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/comp

[Mesa-dev] [PATCH v2 12/23] nir/split_var_copies: handle doubles

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/nir_split_var_copies.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_split_var_copies.c b/src/compiler/nir/nir_split_var_copies.c index 6fdaefa..2b01107 100644 --- a/src/compiler/nir/nir_split_var_copies.c +++ b/src/compiler/

[Mesa-dev] [PATCH v2 14/23] nir/glsl_to_nir: set bit_size on ssbo_load result

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Iago Toral Quiroga --- src/compiler/nir/glsl_to_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index 8c75843..186937d 100644 --- a/src/compiler/nir/glsl_to_nir.cpp +++ b/src/compiler/nir/glsl

[Mesa-dev] [PATCH v2 04/23] nir/lower_vec: adapt to different bit sizes

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/nir_lower_vec_to_movs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_lower_vec_to_movs.c b/src/compiler/nir/nir_lower_vec_to_movs.c index f51cede..9e40b84 100644 --- a/src/compiler/nir/nir_lower_vec_to_movs.c +++ b/src/compile

[Mesa-dev] [PATCH v2 02/23] nir/locals_to_regs: adapt to different bit sizes

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/nir_lower_locals_to_regs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_lower_locals_to_regs.c b/src/compiler/nir/nir_lower_locals_to_regs.c index 0438802..cda652d 100644 --- a/src/compiler/nir/nir_lower_locals_to_regs.c +++ b

[Mesa-dev] [PATCH v2 11/23] nir/instr_set: handle 64-bit bit-sizes

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott v2: Revert spurious change in nir_opt_cse.c (Iago) Signed-off-by: Iago Toral Quiroga --- src/compiler/nir/nir_instr_set.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/compiler/nir/nir_instr_set.c b/src/compiler/nir/nir_inst

[Mesa-dev] [PATCH v2 13/23] nir/glsl_to_nir: set the bit-size in the result of evaluate_rvalue

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Iago Toral Quiroga Found while testing UBO loads in scenarios like this: (assign (x) (var_ref vec_ctor) (expression float d2f (expression double ubo_load (constant uint (0)) (constant uint (0) Without this patch, the src expression of d2f would be evaluated to a bitsize of 32,

[Mesa-dev] [PATCH v2 20/23] nir: add split versions of (un)pack_double_2x32

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/nir_opcodes.py | 36 1 file changed, 36 insertions(+) diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index 12b668f..11da111 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compil

[Mesa-dev] [PATCH v2 18/23] nir: add support for (un)pack_double_2x32

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/glsl_to_nir.cpp | 6 ++ src/compiler/nir/nir_opcodes.py | 28 2 files changed, 34 insertions(+) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index 6f513ed..1629099 100644 --- a/src/co

[Mesa-dev] [PATCH v2 21/23] nir/lower_to_source_mod: Skip unsafe operations

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Iago Toral Quiroga Some special alu operations cannot absorve src modifiers safely. For example, double unpack operations split a double into separate 32-bit chunks that are to be manipulated at bit level. If we allow these operations to absorve the srcmod we run into two issues: 1. We wou

[Mesa-dev] [PATCH v2 16/23] nir: add d2i, d2u, d2b opcodes

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Iago Toral Quiroga --- src/compiler/nir/glsl_to_nir.cpp | 3 +++ src/compiler/nir/nir_opcodes.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index 29133d8..2748766 100644 --- a/src/compiler/nir/glsl_to_nir.cpp

[Mesa-dev] [PATCH v2 19/23] nir: don't try to scalarize unpack_double_2x32

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/nir_lower_alu_to_scalar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_lower_alu_to_scalar.c b/src/compiler/nir/nir_lower_alu_to_scalar.c index e8ba640..1548abb 100644 --- a/src/compiler/nir/nir_lower_alu_to_scalar.c +++ b/

[Mesa-dev] [PATCH v2 15/23] nir: add support for d2f and f2d

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott --- src/compiler/nir/glsl_to_nir.cpp | 2 ++ src/compiler/nir/nir_opcodes.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index 186937d..29133d8 100644 --- a/src/compiler/nir/glsl_to_nir.cpp +++ b

[Mesa-dev] [PATCH v2 23/23] nir: verify destination bit size when checking algebraic optimizations

2016-03-31 Thread Samuel Iglesias Gonsálvez
Some instructions (like flrp in i965) cannot be lowered depending on the bit size because it doesn't support all bit sizes. If the bit size field is defined in nir_opt_algebraic.py, take it into account. Signed-off-by: Samuel Iglesias Gonsálvez --- src/compiler/nir/nir_algebraic.py | 11 +++

[Mesa-dev] [PATCH v2 22/23] nir: add a pass for lowering (un)pack_double_2x32

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Connor Abbott v2: Undo unintended change to the signature of nir_normalize_cubemap_coords (Iago). v3: Move to compiler/nir (Iago) v4: Remove Authors from copyright header (Michael Schellenberger) Signed-off-by: Iago Toral Quiroga --- src/compiler/Makefile.sources |

[Mesa-dev] [PATCH v2 17/23] nir: add i2d and u2d opcodes

2016-03-31 Thread Samuel Iglesias Gonsálvez
From: Iago Toral Quiroga v2: - Assert supports_int and don't fallback to nir_fmov (Jason) --- src/compiler/nir/glsl_to_nir.cpp | 8 src/compiler/nir/nir_opcodes.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cp

Re: [Mesa-dev] [PATCH 07/29] nir/lower_tex: fix get_zero_or_one() to use sized types

2016-03-31 Thread Samuel Iglesias Gonsálvez
On 23/03/16 15:56, Jason Ekstrand wrote: > On Mar 23, 2016 12:32 AM, "Samuel Iglesias Gonsálvez" > wrote: >> >> On 21/03/16 23:40, Jason Ekstrand wrote: >>> On Mon, Mar 21, 2016 at 3:39 PM, Jason Ekstrand >>> wrote: >>> On Mon, Mar 21, 2016 at 5:05 AM, Samuel Iglesias Gonsálv

[Mesa-dev] [Bug 71397] [llvmpipe] configure: error: Package requirements (dri3proto >= 1.0) were not met

2016-03-31 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71397 --- Comment #4 from Hi-Angel --- On Ubuntu «sudo apt-get build-dep libegl1-mesa» fixed the problem. Here's the list of installed packages, so that people from other distros could figure out what are they probably need: libmirprotobuf0 libelf-

[Mesa-dev] [Bug 71397] [llvmpipe] configure: error: Package requirements (dri3proto >= 1.0) were not met

2016-03-31 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71397 Hi-Angel changed: What|Removed |Added CC||hi-an...@yandex.ru -- You are receiving this

[Mesa-dev] [PATCH 02/27] glsl: allow component qualifier on varying inputs

2016-03-31 Thread Timothy Arceri
--- src/compiler/glsl/ast_type.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp index 30c9eff..de3fdcc 100644 --- a/src/compiler/glsl/ast_type.cpp +++ b/src/compiler/glsl/ast_type.cpp @@ -146,6 +146,7 @@ ast_type_qualifier::mer

[Mesa-dev] [PATCH 01/27] glsl: parse component layout qualifier

2016-03-31 Thread Timothy Arceri
Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan Reviewed-by: Kenneth Graunke --- src/compiler/glsl/ast.h | 14 ++ src/compiler/glsl/ast_type.cpp | 3 +++ src/compiler/glsl/glsl_parser.yy | 11 +++ 3 files changed, 28 insertions(+) diff --git a/src/compi

[Mesa-dev] [PATCH 03/27] glsl: validate and store component layout qualifier in GLSL IR

2016-03-31 Thread Timothy Arceri
We make use of the existing IR field location_frac used for tracking component locations. Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan Reviewed-by: Kenneth Graunke --- src/compiler/glsl/ast_to_hir.cpp | 38 ++ src/compiler/glsl/ir.h |

[Mesa-dev] [PATCH 05/27] glsl: cross validate varyings with a component qualifier

2016-03-31 Thread Timothy Arceri
This change checks for component overlap, including handling overlap of locations and components by doubles. Previously there was no validation for assigning explicit locations to a location used by the second half of a double. V3: simplify handling of doubles and fix double component aliasing det

[Mesa-dev] V4 ARB_enhanced_layouts component qualifier support

2016-03-31 Thread Timothy Arceri
This is mostly just a rebase on top of some fixes and the xfb series which have been pushed upstream. The only other change is patch 26 which enables ARB_enhanced_layouts for core profile. Note I have not tested this on any gallium drivers so someone might want to give it a run against the piglit

[Mesa-dev] [PATCH 04/27] glsl: fix cross validation for explicit locations on structs and arrays

2016-03-31 Thread Timothy Arceri
Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan Reviewed-by: Kenneth Graunke --- src/compiler/glsl/link_varyings.cpp | 43 ++--- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link

[Mesa-dev] [PATCH 12/27] glsl: add support for explicit components to frag outputs

2016-03-31 Thread Timothy Arceri
V2: fix error checking for arrays and components. V1 was only taking into account all the array elements and all the components of one of the varyings during the comparision and treating the other as a single slot/component. Reviewed-by: Anuj Phogat --- src/compiler/glsl/linker.cpp | 72

[Mesa-dev] [PATCH 08/27] glsl: add support for packing varyings with explicit locations

2016-03-31 Thread Timothy Arceri
Reviewed-by: Anuj Phogat Reviewed-by: Kenneth Graunke --- src/compiler/glsl/lower_packed_varyings.cpp | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/src/compiler/glsl/lower_packed_varyings.cpp b/src/compiler/glsl/lower_packed_varyings.cpp ind

[Mesa-dev] [PATCH 10/27] glsl: enable lowering of varyings with explicit component

2016-03-31 Thread Timothy Arceri
Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- src/compiler/glsl/ir_optimization.h | 3 ++- src/compiler/glsl/link_varyings.cpp | 5 +++-- src/compiler/glsl/lower_packed_varyings.cpp | 27 ++- 3 files changed, 23 insertions(+), 12 deletions

[Mesa-dev] [PATCH 11/27] glsl: validate linking of intrastage component qualifiers

2016-03-31 Thread Timothy Arceri
Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- src/compiler/glsl/linker.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 3fb72c5..d702482 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/gls

[Mesa-dev] [PATCH 06/27] glsl: update explicit location matching to support component qualifier

2016-03-31 Thread Timothy Arceri
This is needed so we don't optimise away the varying when more than one shares the same location. Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan Reviewed-by: Kenneth Graunke --- src/compiler/glsl/linker.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/

[Mesa-dev] [PATCH 09/27] glsl: add packing rules for tessellation stages to the packing code

2016-03-31 Thread Timothy Arceri
Following patches will allow packing of varyings with explicit locations via the component layout qualifier. Adding the rules here will enable us to call an alternate path for packing tessellation stages with explicit locations. V3: Don't remove rules from the varying linking code as we need to di

[Mesa-dev] [PATCH 07/27] glsl: include varyings with explicit locations in slot count

2016-03-31 Thread Timothy Arceri
This count is used by the packing pass and we need to include varying with explicit locations to be able to pack varyings with explicit components. Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan Reviewed-by: Kenneth Graunke --- src/compiler/glsl/link_varyings.cpp | 9 +++-- 1 fil

[Mesa-dev] [PATCH 13/27] glsl: pack vertex attributes with component layout qualifiers

2016-03-31 Thread Timothy Arceri
This actually tries to pack any input with an explicit location we just let the optimisiation passes clean up the extra assignments if there was no actual packing done. V2: drop unncessary formatting changes (Anuj) Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- src/compiler/glsl/

[Mesa-dev] [PATCH 19/27] glsl: skip location and component packing validation on patch out

2016-03-31 Thread Timothy Arceri
These outputs have a separate location domain from per-vertex outputs and need to be handled separately. For now just skip validation so we don't invalidate valid shaders. --- src/compiler/glsl/link_varyings.cpp | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/

[Mesa-dev] [PATCH 14/27] glsl: pack fragment shader outputs with component layout qualifiers

2016-03-31 Thread Timothy Arceri
This actually tries to pack any output with an explicit location we just let the optimisiation passes clean up the extra assignments if there was no actual packing done. V2: fix comment (Anuj) Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- src/compiler/glsl/link_varyings.cpp | 17

[Mesa-dev] [PATCH 16/27] glsl: add pack varying to resource list for vertex input / fragment output

2016-03-31 Thread Timothy Arceri
This is needed now that we pack these type of varyings when they have a component layout qualifier. Reviewed-by: Anuj Phogat --- src/compiler/glsl/linker.cpp | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/link

[Mesa-dev] [PATCH 15/27] glsl: get geometry shader vertex count from type when packing

2016-03-31 Thread Timothy Arceri
Rather than passing in the vertex count to the packing pass just use the outermost array size to get the count. Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- src/compiler/glsl/ir_optimization.h | 3 +- src/compiler/glsl/link_varyings.cpp | 27 --- src/com

[Mesa-dev] [PATCH 18/27] glsl: move packed varying creation code to a helper

2016-03-31 Thread Timothy Arceri
This will also be used by tessellation packing code in a following patch. Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- src/compiler/glsl/lower_packed_varyings.cpp | 45 +++-- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/compiler/gls

[Mesa-dev] [PATCH 17/27] glsl: make needs_lowering() a shared packing helper function

2016-03-31 Thread Timothy Arceri
Reviewed-by: Anuj Phogat Reviewed-by: Edward O'Callaghan --- src/compiler/glsl/lower_packed_varyings.cpp | 61 + 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/src/compiler/glsl/lower_packed_varyings.cpp b/src/compiler/glsl/lower_packed_varyings.cpp

[Mesa-dev] [PATCH 20/27] glsl: don't try to eliminate unused patches with explicit locations

2016-03-31 Thread Timothy Arceri
These outputs have a separate location domain from per-vertex outputs and need to be handled separately. For now just skip them. --- src/compiler/glsl/linker.cpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp inde

[Mesa-dev] [PATCH 23/27] glsl: lower tessellation varyings packed with component layout qualifier

2016-03-31 Thread Timothy Arceri
For tessellation shaders we cannot just copy everything to the packed varyings like we do in other stages as tessellation uses shared memory for varyings, therefore it is only safe to copy array elements that the shader actually uses. This class searches the IR for uses of varyings and then create

[Mesa-dev] [PATCH 24/27] glsl: add component to has_layout() helper

2016-03-31 Thread Timothy Arceri
I don't think this will do much as it's a compiler error to use component without location which is already in the table but its good to be consistent. Reviewed-by: Ian Romanick Reviewed-by: Samuel Iglesias Gonsálvez --- src/compiler/glsl/ast_type.cpp | 1 + 1 file changed, 1 insertion(+) diff

[Mesa-dev] [PATCH 21/27] glsl: include per-patch varyings when generating reserved slot bitfield

2016-03-31 Thread Timothy Arceri
--- src/compiler/glsl/link_varyings.cpp | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index 4f57fb2..4b2b81c 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_va

[Mesa-dev] [PATCH 22/27] glsl: add helper for comparing arrays in varying packing pass

2016-03-31 Thread Timothy Arceri
--- src/compiler/glsl/lower_packed_varyings.cpp | 25 + 1 file changed, 25 insertions(+) diff --git a/src/compiler/glsl/lower_packed_varyings.cpp b/src/compiler/glsl/lower_packed_varyings.cpp index ad766bb..6e7a289 100644 --- a/src/compiler/glsl/lower_packed_varyings.cpp

[Mesa-dev] [PATCH 25/27] mesa: add LOCATION_COMPONENT support to GetProgramResourceiv

2016-03-31 Thread Timothy Arceri
From Section 7.3.1.1 (Naming Active Resources) of the OpenGL 4.5 spec: "For the property LOCATION_COMPONENT, a single integer indicating the first component of the location assigned to an active input or output variable is written to params. For input and output variables with a component

[Mesa-dev] [PATCH 26/27] glsl: always enable ARB_enhanced_layouts in Core Profile

2016-03-31 Thread Timothy Arceri
--- src/compiler/glsl/glsl_parser_extras.cpp | 2 +- src/mesa/main/extensions_table.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 0ce89ce..576ce73 100644 --- a/src/compiler

[Mesa-dev] [PATCH 27/27] docs: mark ARB_enhanced_layouts as DONE

2016-03-31 Thread Timothy Arceri
--- docs/GL3.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index f6248da..ede8cf5 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -193,11 +193,11 @@ GL 4.4, GLSL 4.40: GL_MAX_VERTEX_ATTRIB_STRIDE DONE (all drive

Re: [Mesa-dev] [android-x86-devel] Re: gralloc_drm_pipe

2016-03-31 Thread Chih-Wei Huang
2016-03-31 0:09 GMT+08:00 Rob Herring : > On Tue, Mar 29, 2016 at 2:49 PM, Jaap Jan Meijer wrote: >> >> First of all, thanks for the hard work! >> >> Only one problem I noticed so far: when enabling virgl in drm_gralloc but >> without support in MESA, MESA / drm_gralloc (?) will just crash during

Re: [Mesa-dev] [RFC PATCH] GBM: Add map/unmap functions

2016-03-31 Thread Daniel Stone
Hi, On 31 March 2016 at 04:21, Rob Herring wrote: > diff --git a/include/GL/internal/dri_interface.h > b/include/GL/internal/dri_interface.h > index 6bbd3fa..b059112 100644 > --- a/include/GL/internal/dri_interface.h > +++ b/include/GL/internal/dri_interface.h > @@ -1101,6 +1101,9 @@ struct __DR

Re: [Mesa-dev] [RFC PATCH] GBM: Add map/unmap functions

2016-03-31 Thread Rob Clark
On Thu, Mar 31, 2016 at 7:13 AM, Daniel Stone wrote: >> +static void * >> +_gbm_dri_bo_map(struct gbm_bo *_bo, >> + uint32_t x, uint32_t y, >> + uint32_t width, uint32_t height, >> + uint32_t usage) >> +{ >> + struct gbm_dri_device *dri = gbm_dri_device(_bo

Re: [Mesa-dev] [PATCH] tgsi: split tgsi_util_get_texture_coord_dim() function into two

2016-03-31 Thread Marek Olšák
On Thu, Mar 31, 2016 at 3:15 AM, Dave Airlie wrote: > On 31 March 2016 at 11:06, Brian Paul wrote: >> It was kind of overloaded, returning two different things. Now get >> the index of the shadow reference src register with a new >> tgsi_util_get_shadow_ref_src_index() function. >> >> To verify

  1   2   3   >