[Mesa-dev] [PATCH] tgsi: handle indirect sampler arrays. (v2)

2015-06-21 Thread Dave Airlie
This is required for ARB_gpu_shader5 support in softpipe. v2: add support to txd/txf/txq paths. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 42 ++ 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary

[Mesa-dev] [PATCH] r600g: ignore sampler views for now.

2015-06-21 Thread Dave Airlie
From: Dave Airlie This fixes a regression in that r600 stopped working when sampler views were pushed. 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

[Mesa-dev] [PATCH 2/2] draw/gallivm: add invocation ID support for llvmpipe.

2015-06-21 Thread Dave Airlie
From: Dave Airlie This extends the draw code to add support for invocations. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/draw/draw_gs.c| 3 ++- src/gallium/auxiliary/draw/draw_llvm.c | 5 - src/gallium/auxiliary/draw/draw_llvm.h | 3 ++- src/gallium

[Mesa-dev] [PATCH 1/2] draw/tgsi: implement geom shader invocation support.

2015-06-21 Thread Dave Airlie
From: Dave Airlie This is just for softpipe, llvmpipe won't work without some changes. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/draw/draw_gs.c | 47 +- src/gallium/auxiliary/draw/draw_gs.h | 2 ++ src/gallium/auxiliary/tgsi/tgsi_scan.c

[Mesa-dev] softpipe and llvmpipe geom shader invocation support

2015-06-21 Thread Dave Airlie
Hey, repost of patch 1, the second patch adds the corresponding code to llvmpipe, passes the basic tests. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] r600g: ignore sampler views for now.

2015-06-21 Thread Dave Airlie
On 22 June 2015 at 13:37, Dave Airlie wrote: > From: Dave Airlie > > This fixes a regression in that r600 stopped working when > sampler views were pushed. I pushed this already, regressions are too annoying to wait. Dave. ___ mesa-dev

Re: [Mesa-dev] [RFC] Compatibility between old dri modules and new loaders, and vice verse

2015-06-22 Thread Dave Airlie
> > As kindly hinted by Marek, currently we do have a wide selection of > supported dri <> loader combinations. > > Although we like to think that things never break, we have to admit > that not many of us test every possible combinations of dri modules > and loaders. With the chances getting small

Re: [Mesa-dev] [RFC] Compatibility between old dri modules and new loaders, and vice verse

2015-06-22 Thread Dave Airlie
On 23 June 2015 at 08:16, Ian Romanick wrote: > On 06/22/2015 11:54 AM, Dave Airlie wrote: >>> >>> As kindly hinted by Marek, currently we do have a wide selection of >>> supported dri <> loader combinations. >>> >>> Although we like to think

Re: [Mesa-dev] [PATCH] tgsi: handle indirect sampler arrays. (v2)

2015-06-22 Thread Dave Airlie
On 22 June 2015 at 21:20, Roland Scheidegger wrote: > Should there be some clamping somewhere to prevent crashes due to > out-of-bound unit index? The spec says its undefined, I'm never sure if that means explode in any way whatsoever. Dave. ___ mesa-d

Re: [Mesa-dev] [PATCH] Fix strict-aliasing violations in GLSL shader list implementation

2015-06-23 Thread Dave Airlie
On 24 June 2015 at 11:44, Ian Romanick wrote: > On 06/24/2015 03:59 PM, Davin McCall wrote: >> Hi Ian, >> >> On 23/06/15 23:26, Ian Romanick wrote: >>> On 06/23/2015 02:36 PM, Thomas Helland wrote: 2015-06-24 23:05 GMT+02:00 Davin McCall : > Hi - I'm new here. > > I've recently st

Re: [Mesa-dev] [PATCH] Fix strict-aliasing violations in GLSL shader list implementation

2015-06-23 Thread Dave Airlie
> > Actually, I'm almost 100% certain that there are lots of other strict > aliasing violations in the Mesa code. That's why we've always disabled it. > > More generally, IMO it's unrealistic to rely on strict aliasing for > optimization, because very few people really understand it (I'm not one >

Re: [Mesa-dev] [PATCH] Fix strict-aliasing violations in GLSL shader list implementation

2015-06-23 Thread Dave Airlie
>> And do things with p2 and hope that p will get them, because >> the compiler wants to store things its doing to p in registers, >> and when you go and do something in p2 it can't work out it's the >> same thing, so it has to spill/reload. > > Which I think is different from what Davin was saying

Re: [Mesa-dev] [PATCH] Fix strict-aliasing violations in GLSL shader list implementation

2015-06-23 Thread Dave Airlie
On 24 June 2015 at 12:57, Michel Dänzer wrote: > On 24.06.2015 11:39, Dave Airlie wrote: >>> >>> Actually, I'm almost 100% certain that there are lots of other strict >>> aliasing violations in the Mesa code. That's why we've always disabled it. &g

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-24 Thread Dave Airlie
> -fno-strict-aliasing:with strict aliasing: > libGL.so 699188 699188(no change) > *_dri.so 9575876 9563104(-2772) > Use the size command to get the actual text segment size, otherwise debugging symbols can drown change

[Mesa-dev] [PATCH] radeonsi: add support for viewport array

2015-06-24 Thread Dave Airlie
From: Dave Airlie This isn't pretty and I'd suggest it the pm4 interface builder could be tweaked to do this more efficently, but I'd need guidance on how that would look. This seems to pass the few piglit tests I threw at it. Signed-off-by: Dave Airlie --- src/gallium/d

[Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-24 Thread Dave Airlie
From: Dave Airlie This isn't pretty and I'd suggest it the pm4 interface builder could be tweaked to do this more efficently, but I'd need guidance on how that would look. This seems to pass the few piglit tests I threw at it. v2: handle passing layer/viewport index to fragm

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Dave Airlie
On 26 June 2015 at 00:26, Marek Olšák wrote: > Hi Dave, > > The change in si_shader_io_get_unique_index can be dropped. The > function is only used for shaders before GS. > Ok okay I was hitting the assert in there for the layer/viewport index cases, but if the patch you pushed to master helps I'l

[Mesa-dev] [PATCH] radeonsi: add support for geometry shader invocations.

2015-06-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c| 5 + src/gallium/drivers/radeonsi/si_shader.h| 1 + src/gallium/drivers/radeonsi/si_state.c | 1 - src/gallium/drivers/radeonsi/si_state_shaders.c | 7 +++ 4 files changed

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Dave Airlie
On 26 June 2015 at 07:11, Marek Olšák wrote: > Wait a moment, how did it fail with si_shader_io_get_unique_index? The > function shouldn't be called for ES with the viewport index, because > ES can't pass the output to GS. If it was called, ignoring the > viewport index in si_llvm_emit_es_epilogue

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-26 Thread Dave Airlie
On 26 June 2015 at 07:43, Dave Airlie wrote: > On 26 June 2015 at 07:11, Marek Olšák wrote: >> Wait a moment, how did it fail with si_shader_io_get_unique_index? The >> function shouldn't be called for ES with the viewport index, because >> ES can't pass the

[Mesa-dev] [PATCH] radeonsi: add support for viewport array (v3)

2015-06-26 Thread Dave Airlie
From: Dave Airlie This isn't pretty and I'd suggest it the pm4 interface builder could be tweaked to do this more efficently, but I'd need guidance on how that would look. This seems to pass the few piglit tests I threw at it. v2: handle passing layer/viewport index to fragm

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-26 Thread Dave Airlie
On 27 June 2015 at 09:03, Marek Olšák wrote: > If you write VIEWPORT_INDEX at location 0, it overwrites POSITION > which happens to be at location 0 too and that's why the test fails. > > The fix is not to call si_shader_io_get_unique_index (or its caller > get_param_index) for LAYER and VIEWPORT_

[Mesa-dev] llvmpipe double support

2015-06-29 Thread Dave Airlie
Before considering radeonsi, I felt llvmpipe support would be a good stepping stone. Things are messy with SoA, and I've no idea how test AoS, so I left it alone. but this set does work and does pass the tests and doesn't regress. Dave. ___ mesa-dev m

[Mesa-dev] [PATCH 1/3] tgsi: add infer support for double opcodes.

2015-06-29 Thread Dave Airlie
Signed-off-by: Dave Airlie --- src/gallium/auxiliary/tgsi/tgsi_info.c | 37 ++ 1 file changed, 37 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index 9295311..4b16ef3 100644 --- a/src/gallium/auxiliary

[Mesa-dev] [PATCH 2/3] gallivm: add fp64 support.

2015-06-29 Thread Dave Airlie
les. Open issues: are intrinsics okay for floor/ceil? should and of these functions have CPU versions? tested with piglit, no regressions, all the fp64 tests seem to pass. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/gallivm/lp_bld_arit.c| 12 ++ src/gallium/auxiliary/gallivm/lp_bl

[Mesa-dev] [PATCH 3/3] docs: update for llvmpipe fp64 support

2015-06-29 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- docs/GL3.txt | 4 ++-- docs/relnotes/10.7.0.html | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 54e4574..ce3b134 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -109,7 +109,7

Re: [Mesa-dev] [PATCH 2/3] gallivm: add fp64 support.

2015-06-29 Thread Dave Airlie
On 30 June 2015 at 00:58, Roland Scheidegger wrote: > Don't worry about the AoS stuff. Only meant to do simple things. > > Looks good overall, I guess it makes sense to not split execution too > (so you'd have native hw vector size there), llvm should handle that > pretty well these days (the sse

[Mesa-dev] [PATCH] gallivm: add fp64 support. (v2)

2015-06-29 Thread Dave Airlie
e fp64 tests seem to pass. v2: switch to using shuffles for fetch/store (Roland) assert on indirect double stores - mesa/st never emits these (it uses MOV) fix indirect temp/input/constant/immediates (Roland) typos/formatting fixes (Roland) Signed-off-by: Dave Airlie --- src/gallium/auxiliary/g

Re: [Mesa-dev] [PATCH 2/3] gallivm: add fp64 support.

2015-06-29 Thread Dave Airlie
On 30 June 2015 at 09:36, Roland Scheidegger wrote: > Am 29.06.2015 um 22:18 schrieb Dave Airlie: >> On 30 June 2015 at 00:58, Roland Scheidegger wrote: >>> Don't worry about the AoS stuff. Only meant to do simple things. >>> >>> Looks good overall, I gu

Re: [Mesa-dev] [PATCH] gallivm: add fp64 support. (v2)

2015-06-30 Thread Dave Airlie
>> LLVMValueRef base_ptr, >> LLVMValueRef indexes, >> - LLVMValueRef overflow_mask) >> + LLVMValueRef overflow_mask, LLVMValueRef indexes2) >> { >> struct gallivm_state *gallivm = bld_base->base.gallivm; >> LLVMBuilderRef builder = galliv

Re: [Mesa-dev] [PATCH 2/3] gallivm: add fp64 support.

2015-06-30 Thread Dave Airlie
On 1 July 2015 at 00:52, Roland Scheidegger wrote: > Am 30.06.2015 um 03:42 schrieb Dave Airlie: >> On 30 June 2015 at 09:36, Roland Scheidegger wrote: >>> Am 29.06.2015 um 22:18 schrieb Dave Airlie: >>>> On 30 June 2015 at 00:58, Roland Scheidegger wrote: >>

[Mesa-dev] [PATCH] r600g: fix sampler/ubo indexing on cayman

2015-07-08 Thread Dave Airlie
From: Dave Airlie Cayman needs a different method to upload the CF IDX0/1 This fixes 31 piglits when ARB_gpu_shader5 is forced on with cayman. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/eg_asm.c | 17 +++-- src/gallium/drivers/r600/eg_sq.h | 11 +++ 2 files

[Mesa-dev] [PATCH] r600g: move sampler/ubo index registers before temp reg

2015-07-08 Thread Dave Airlie
From: Dave Airlie temp_reg needs to be last, as we increment things away from it, otherwise on cayman some tests were overwriting the index regs. Fixes 2 piglit with ARB_gpu_shader5 forced on cayman. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 13 ++--- 1

[Mesa-dev] [PATCH 4/6] r600g/sb: add support for multiple streams to SB backend

2015-07-08 Thread Dave Airlie
From: Glenn Kennard This adds a peephole and removes an assert that isn't actually valid with some of the stream emit instructions. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/sb/sb_bc_finalize.cpp | 2 -- src/gallium/drivers/r600/sb/sb_bc_parser.cpp | 18 +++-

[Mesa-dev] [PATCH 6/6] r600g: enable ARB_gpu_shader5 on evergreen and up

2015-07-08 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 67caa69..0db1c1c 100644 --- a/src/gallium/drivers/r600

[Mesa-dev] [RFC] r600 geometry streams (and ARB_gpu_shader5 support)

2015-07-08 Thread Dave Airlie
This applies on top of the two patches I've sent already, and enables the geometry streams, which is the final piece missing for ARB_gpu_shader5 on evergreen and cayman. (I'll do doc update patches later) Glenn wrote most of this, I just spent some time making it work and cleaning up the code. Tho

[Mesa-dev] [PATCH 1/6] r600g: add support for streams to the assembler.

2015-07-08 Thread Dave Airlie
From: Glenn Kennard This just adds support to the assembler dumper and allows stream instructions to be generated. Also fix up the stream debugging to add stream info. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/eg_asm.c | 1 + src/gallium/drivers/r600/r600_asm.c

[Mesa-dev] [PATCH 2/6] radeon: add streamout status 1-3 queries.

2015-07-08 Thread Dave Airlie
From: Glenn Kennard This adds support for queries against the non-0 vertex streams. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeon/r600_query.c | 18 -- src/gallium/drivers/radeon/r600d_common.h | 3 +++ 2 files changed, 19 insertions(+), 2 deletions(-) diff

[Mesa-dev] [PATCH 5/6] r600g: add streamout support

2015-07-08 Thread Dave Airlie
From: Glenn Kennard This adds the main chunk of the geometry shader multiple stream support to the r600 driver. Glenn wrote the original pass, and I took his code and hacked it into a working state. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/evergreen_state.c | 29 ++-- src

[Mesa-dev] [PATCH 3/6] radeon: add support for streams to the common streamout code.

2015-07-08 Thread Dave Airlie
From: Glenn Kennard This just adds to the common radeon streamout code, support for multiple streams. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeon/r600_pipe_common.h | 1 + src/gallium/drivers/radeon/r600_streamout.c | 23 +-- 2 files changed, 18 insertions

[Mesa-dev] [PATCH 07/19] glsl/types: add new subroutine type (v3)

2015-07-09 Thread Dave Airlie
From: Dave Airlie This type will be used to store the name of subroutine types as in subroutine void myfunc(void); will store myfunc into a subroutine type. This is required to the parser can identify a subroutine type in a uniform decleration as a valid type, and also for looking up the type

[Mesa-dev] ARB_shader_subroutine (again)

2015-07-09 Thread Dave Airlie
I've rebased this series, it's in my arb_shader_subroutine branch. I've also implemented Ken's idea for a subroutine->int conversion and put the changes into each patch that it affects. Otherwise not much different from when I last posted. Dave. ___ me

[Mesa-dev] [PATCH 08/19] mesa: add inline conversion functions for ARB_shader_subroutine

2015-07-09 Thread Dave Airlie
From: Dave Airlie This handles converting the shader stages to the internal prefix along with the program resource interfaces. Signed-off-by: Dave Airlie --- src/mesa/main/shaderobj.h | 84 +++ 1 file changed, 84 insertions(+) diff --git a/src/mesa

[Mesa-dev] [PATCH 04/19] mesa: Add glGet support for ARB_shader_subroutine implementation limits

2015-07-09 Thread Dave Airlie
From: Chris Forbes Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mesa/main/config.h | 6 ++ src/mesa/main/get.c | 1 + src/mesa/main/get_hash_params.py | 4 src/mesa/main

[Mesa-dev] [PATCH 02/19] glapi: Add ARB_shader_subroutine functions and enums (v2)

2015-07-09 Thread Dave Airlie
From: Chris Forbes v2: fix output="true" and LENGTH typo Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mapi/glapi/gen/ARB_shader_subroutine.xml | 84 src/mapi/glapi/gen/M

[Mesa-dev] [PATCH 11/19] glsl: add ast/parser support for subroutine parsing storage (v3.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie This is the guts of the GLSL parser and AST support for shader subroutines. The code creates a subroutine type in the parser, and uses that there to validate the identifiers. The parser also distinguishes between subroutine types/function prototypes /uniforms and subroutine

[Mesa-dev] [PATCH 06/19] glsl: Make `subroutine` a reserved keyword

2015-07-09 Thread Dave Airlie
From: Chris Forbes Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/glsl/glsl_lexer.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index 10db5b8

[Mesa-dev] [PATCH 03/19] mesa: Add extension tracking for arb_shader_subroutine (v2)

2015-07-09 Thread Dave Airlie
From: Chris Forbes v2: [airlied]: merge version check update. Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + src/mesa/main/version.c| 2 +- 3 files

[Mesa-dev] [PATCH 09/19] glsl/ir: add subroutine information storage to ir_function (v1.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie We need to store two sets of info into the ir_function, if this is a function definition with a subroutine list (subroutine_def) or if it a subroutine prototype. v1.1: add some more documentation. Signed-off-by: Dave Airlie --- src/glsl/ir.cpp | 4 src

[Mesa-dev] [PATCH 01/19] mesa: Add stubs for ARB_shader_subroutine entrypoints

2015-07-09 Thread Dave Airlie
From: Chris Forbes Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mesa/main/shaderapi.c | 63 +++ src/mesa/main/shaderapi.h | 35 ++ 2 files changed, 98

[Mesa-dev] [PATCH 05/19] glsl: Add extension plumbing and define for ARB_shader_subroutine

2015-07-09 Thread Dave Airlie
From: Chris Forbes Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/glsl/glcpp/glcpp-parse.y| 3 +++ src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/glsl_parser_extras.h | 2 ++ src/glsl

[Mesa-dev] [PATCH 10/19] glsl/ir: allow ir_call to handle subroutine calling

2015-07-09 Thread Dave Airlie
From: Dave Airlie This adds a ir_variable which contains the subroutine uniform and an array rvalue for the deref of that uniform, these are stored in the ir_call and lowered later. Signed-off-by: Dave Airlie --- src/glsl/ir.h | 21 - 1 file changed, 20 insertions(+), 1

[Mesa-dev] [PATCH 16/19] program: add subroutine uniform support (v1.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie Add support for the subroutine uniform type ir->mesa.cpp v1.1: add subroutine to int to switch Signed-off-by: Dave Airlie --- src/mesa/program/ir_to_mesa.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/prog

[Mesa-dev] [PATCH 12/19] glsl/ir: add subroutine lowering pass (v2.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie This lowers the enhanced ir_call using the lookaside table of subroutines into an if ladder. This initially was done at the AST level but it caused some ordering issues so a separate pass was required. v2: clone return value derefs. v2.1: update for subroutine->int conv

[Mesa-dev] [PATCH 18/19] st/mesa: add subroutine bits (v1.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie Just add support for the subroutine type to the glsl->tgsi convertor. v1.1: add subroutine to int support. Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/m

[Mesa-dev] [PATCH 15/19] program_resource: add subroutine support

2015-07-09 Thread Dave Airlie
From: Dave Airlie This fleshes out the ARB_program_query support for the APIs that ARB_shader_subroutine introduces, leaving some TODOs for later addition. Signed-off-by: Dave Airlie --- src/mesa/main/shader_query.cpp | 46 ++ 1 file changed, 46

[Mesa-dev] [PATCH 19/19] st/mesa: enable shader subroutine

2015-07-09 Thread Dave Airlie
From: Dave Airlie I'm not sure if we shouldn't enable this everywhere and rip out the API checks, discuss, Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_extensions.c

[Mesa-dev] [PATCH 17/19] mesa: fill out the ARB_shader_subroutine APIs

2015-07-09 Thread Dave Airlie
From: Dave Airlie This fleshes out the APIs, using the program resource APIs where they should match. It also sets the default values to valid subroutines. Signed-off-by: Dave Airlie --- src/mesa/main/shaderapi.c | 457 +- src/mesa/main/shaderapi.h

[Mesa-dev] [PATCH 13/19] mesa/mtypes: add gl_subroutine_function and uniform storage to shader

2015-07-09 Thread Dave Airlie
From: Dave Airlie This adds the necessary storage for subroutine info to gl_shader. Signed-off-by: Dave Airlie --- src/mesa/main/mtypes.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index a93fe94..c53bf2d 100644 --- a

[Mesa-dev] [PATCH 14/19] glsl: add uniform and program resource support

2015-07-09 Thread Dave Airlie
From: Dave Airlie This adds linker support for subroutine uniforms, they have some subtle differences from real uniforms, we also hide them and they are given internal uniform names. This also adds the subroutine locations and subroutine uniforms to the program resource tracking for later use

[Mesa-dev] [PATCH] radeonsi: ARB_gpu_shader_fp64 + ARB_vertex_attrib_64bit support.

2015-07-11 Thread Dave Airlie
From: Dave Airlie This adds the translation from TGSI to AMDGPU llvm backend, for the 64-bit opcodes. The backend pretty much handles everything for us fine. There is one patch required for SI DFRAC support, that I know off. Signed-off-by: Dave Airlie --- docs/GL3.txt

Re: [Mesa-dev] [PATCH 09/19] glsl/ir: add subroutine information storage to ir_function (v1.1)

2015-07-11 Thread Dave Airlie
On 10 July 2015 at 07:15, Chris Forbes wrote: > Do you really need is_subroutine_def ? It seems redundant with > num_subroutine_types>0. I'm not sure, the spec isn't very clear on whether a subroutine definition with no subroutine types is legal GLSL or not. Dave. ___

Re: [Mesa-dev] [PATCH 09/19] glsl/ir: add subroutine information storage to ir_function (v1.1)

2015-07-11 Thread Dave Airlie
On 12 July 2015 at 13:02, Dave Airlie wrote: > On 10 July 2015 at 07:15, Chris Forbes wrote: >> Do you really need is_subroutine_def ? It seems redundant with >> num_subroutine_types>0. > > I'm not sure, the spec isn't very clear on whether a subroutine > d

[Mesa-dev] radeonsi indirect sampler, llvm backend issue

2015-07-12 Thread Dave Airlie
telement <4 x float> %32, i32 2 %36 = extractelement <4 x float> %32, i32 3 %37 = call i32 @llvm.SI.packf16(float %33, float %34) %38 = bitcast i32 %37 to float %39 = call i32 @llvm.SI.packf16(float %35, float %36) %40 = bitcast i32 %39 to float call void @llvm.SI.export(i3

Re: [Mesa-dev] [PATCH 19/19] st/mesa: enable shader subroutine

2015-07-20 Thread Dave Airlie
On 21 July 2015 at 08:50, Marek Olšák wrote: > If the extension is core only, we can rip out the checks, but the > checks that test ctx->API == API_OPEGL_CORE should stay (if they are > missing, they should be added). > I've reconsidered this, and I'm sticking with my original plan, NIR and the i

[Mesa-dev] [PATCH 10/20] glsl/ir: add subroutine information storage to ir_function (v1.1)

2015-07-20 Thread Dave Airlie
From: Dave Airlie We need to store two sets of info into the ir_function, if this is a function definition with a subroutine list (subroutine_def) or if it a subroutine prototype. v1.1: add some more documentation. Reviewed-by: Chris Forbes Signed-off-by: Dave Airlie --- src/glsl/ir.cpp

[Mesa-dev] ARB_shader_subroutine - now explicit!

2015-07-20 Thread Dave Airlie
So I revisited ARB_shader_subroutine again today, and noticed it was lacking wrt ARB_explicit_uniform_location thanks to some piglits from Igalia/Intel. So I've added support for that, cleaned up some things, like calculating the compatible shaders for a uniform at link time, stopped the dead code

[Mesa-dev] [PATCH 07/20] glsl/types: add new subroutine type (v3.1)

2015-07-20 Thread Dave Airlie
From: Dave Airlie This type will be used to store the name of subroutine types as in subroutine void myfunc(void); will store myfunc into a subroutine type. This is required to the parser can identify a subroutine type in a uniform decleration as a valid type, and also for looking up the type

[Mesa-dev] [PATCH 02/20] glapi: Add ARB_shader_subroutine functions and enums (v2)

2015-07-20 Thread Dave Airlie
From: Chris Forbes v2: fix output="true" and LENGTH typo Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mapi/glapi/gen/ARB_shader_subroutine.xml | 84 src/mapi/glapi/gen/M

[Mesa-dev] [PATCH 06/20] glsl: Make `subroutine` a reserved keyword

2015-07-20 Thread Dave Airlie
From: Chris Forbes Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/glsl/glsl_lexer.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index 845deeb

[Mesa-dev] [PATCH 09/20] mesa: add inline conversion functions for ARB_shader_subroutine

2015-07-20 Thread Dave Airlie
From: Dave Airlie This handles converting the shader stages to the internal prefix along with the program resource interfaces. Reviewed-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mesa/main/shaderobj.h | 84 +++ 1 file changed, 84

[Mesa-dev] [PATCH 08/20] glsl: don't eliminate subroutine types.

2015-07-20 Thread Dave Airlie
From: Dave Airlie This stops dead code from removing subroutines types, we need these for the queries to work properly. Signed-off-by: Dave Airlie --- src/glsl/opt_dead_code.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp

[Mesa-dev] [PATCH 03/20] mesa: Add extension tracking for arb_shader_subroutine (v2)

2015-07-20 Thread Dave Airlie
From: Chris Forbes v2: [airlied]: merge version check update. Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + src/mesa/main/version.c| 2 +- 3 files

[Mesa-dev] [PATCH 15/20] glsl: add uniform and program resource support (v2)

2015-07-20 Thread Dave Airlie
From: Dave Airlie This adds linker support for subroutine uniforms, they have some subtle differences from real uniforms, we also hide them and they are given internal uniform names. This also adds the subroutine locations and subroutine uniforms to the program resource tracking for later use

[Mesa-dev] [PATCH 13/20] glsl/ir: add subroutine lowering pass (v2.3)

2015-07-20 Thread Dave Airlie
From: Dave Airlie This lowers the enhanced ir_call using the lookaside table of subroutines into an if ladder. This initially was done at the AST level but it caused some ordering issues so a separate pass was required. v2: clone return value derefs. v2.1: update for subroutine->int conv

[Mesa-dev] [PATCH 11/20] glsl/ir: allow ir_call to handle subroutine calling

2015-07-20 Thread Dave Airlie
From: Dave Airlie This adds a ir_variable which contains the subroutine uniform and an array rvalue for the deref of that uniform, these are stored in the ir_call and lowered later. Reviewed-by: Chris Forbes Signed-off-by: Dave Airlie --- src/glsl/ir.h | 21 - 1 file

[Mesa-dev] [PATCH 12/20] glsl: add ast/parser support for subroutine parsing storage (v3.2)

2015-07-20 Thread Dave Airlie
From: Dave Airlie This is the guts of the GLSL parser and AST support for shader subroutines. The code creates a subroutine type in the parser, and uses that there to validate the identifiers. The parser also distinguishes between subroutine types/function prototypes /uniforms and subroutine

[Mesa-dev] [PATCH 05/20] glsl: Add extension plumbing and define for ARB_shader_subroutine

2015-07-20 Thread Dave Airlie
From: Chris Forbes Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/glsl/glcpp/glcpp-parse.y| 3 +++ src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/glsl_parser_extras.h | 2 ++ src/glsl

[Mesa-dev] [PATCH 04/20] mesa: Add glGet support for ARB_shader_subroutine implementation limits

2015-07-20 Thread Dave Airlie
From: Chris Forbes Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mesa/main/config.h | 6 ++ src/mesa/main/get.c | 1 + src/mesa/main/get_hash_params.py | 4 src/mesa/main

[Mesa-dev] [PATCH 01/20] mesa: Add stubs for ARB_shader_subroutine entrypoints

2015-07-20 Thread Dave Airlie
From: Chris Forbes Reviewed-by: Tapani Pälli Reviewed-by: Kenneth Graunke Signed-off-by: Chris Forbes Signed-off-by: Dave Airlie --- src/mesa/main/shaderapi.c | 63 +++ src/mesa/main/shaderapi.h | 35 ++ 2 files changed, 98

[Mesa-dev] [PATCH 18/20] mesa: fill out the ARB_shader_subroutine APIs

2015-07-20 Thread Dave Airlie
From: Dave Airlie This fleshes out the APIs, using the program resource APIs where they should match. It also sets the default values to valid subroutines. Signed-off-by: Dave Airlie --- src/mesa/main/shaderapi.c | 450 +- src/mesa/main/shaderapi.h

[Mesa-dev] [PATCH 16/20] program_resource: add subroutine support (v2)

2015-07-20 Thread Dave Airlie
From: Dave Airlie This fleshes out the ARB_program_query support for the APIs that ARB_shader_subroutine introduces, leaving some TODOs for later addition. v2: reworked for lots of the ARB_program_interface_query entry points and tests Signed-off-by: Dave Airlie --- src/mesa/main

[Mesa-dev] [PATCH 17/20] program: add subroutine uniform support (v1.1)

2015-07-20 Thread Dave Airlie
From: Dave Airlie Add support for the subroutine uniform type ir->mesa.cpp v1.1: add subroutine to int to switch Signed-off-by: Dave Airlie --- src/mesa/program/ir_to_mesa.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/prog

[Mesa-dev] [PATCH 14/20] mesa/mtypes: add gl_subroutine_function and uniform storage to shader (v2)

2015-07-20 Thread Dave Airlie
From: Dave Airlie This adds the necessary storage for subroutine info to gl_shader. v2: add comments, rename one member Signed-off-by: Dave Airlie --- src/mesa/main/mtypes.h | 28 1 file changed, 28 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa

[Mesa-dev] [PATCH 19/20] st/mesa: add subroutine bits (v1.1)

2015-07-20 Thread Dave Airlie
From: Dave Airlie Just add support for the subroutine type to the glsl->tgsi convertor. v1.1: add subroutine to int support. Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_trac

[Mesa-dev] [PATCH 20/20] st/mesa: enable shader subroutine

2015-07-20 Thread Dave Airlie
From: Dave Airlie since this touches drivers, only enable it on gallium for now for drivers reporting GLSL 1.30 or above. Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src

[Mesa-dev] [PATCH 2/4] radeonsi: split out interpolation input selection

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is prep work for using it in the interpolation code later. Also add storage for the input interpolation mode so we can pick it up later. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c | 62 +++- src/gallium/drivers

[Mesa-dev] [PATCH 4/4] radeonsi: add support for interpolateAt functions

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is part of ARB_gpu_shader5, and this passes all the piglit tests currently available. Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- src/gallium/drivers/radeonsi/si_shader.c | 232 ++- 2 files changed, 232

[Mesa-dev] [PATCH 3/4] radeonsi: add fine derivate control

2015-07-21 Thread Dave Airlie
From: Dave Airlie This adds support for fine derivatives and enables ARB_derivative_control on radeonsi. (just fell out of my working out interpolation) Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- docs/relnotes/10.7.0.html| 1 + src

[Mesa-dev] [PATCH 1/4] radeonsi: separate out load sample position

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is prep work for reusing this in the interpolation code later. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c | 44 +++- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/src/gallium/drivers/radeonsi

[Mesa-dev] radeonsi: interpolateAt and ARB_derivative_control support

2015-07-21 Thread Dave Airlie
These are pretty standalone so I've pulled them out from my radeonsi-dev tree and cleaned them up. They pass all the tests, and get one step closer to gpu_shader5. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.

[Mesa-dev] [PATCH 1/2] radeonsi: rename ddxy_lds to lds

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is picked from Marek's tess work, and I think it makes sense to just do it first. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gallium/dr

[Mesa-dev] [PATCH 2/2] radeonsi: renamed gs_used_inputs to inputs_read

2015-07-21 Thread Dave Airlie
From: Dave Airlie This is also picked from Marek's tess work, it reduces the conflicts with my GS5 work. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c| 2 +- src/gallium/drivers/radeonsi/si_shader.h| 4 +++- src/gallium/drivers/rad

[Mesa-dev] radeonsi trivial renames from tess branch

2015-07-21 Thread Dave Airlie
While pulling tess into my gs5 branch these things got annoying so lets just rename them upfront. Dave. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 23/46] glsl: allow linking of tessellation shaders.

2015-07-21 Thread Dave Airlie
On 17 June 2015 at 09:01, Marek Olšák wrote: > From: Chris Forbes > > Marek: require a tess eval shader if a tess control shader is present As part of my learn about tess, Reviewed-by: Dave Airlie ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH 24/46] glsl: make lower_clip_distance work with tessellation shaders.

2015-07-21 Thread Dave Airlie
On 17 June 2015 at 09:01, Marek Olšák wrote: > From: Fabian Bieler Reviewed-by: Dave Airlie > > --- > src/glsl/lower_clip_distance.cpp | 185 > ++- > 1 file changed, 105 insertions(+), 80 deletions(-) > > diff --git a/src/glsl/lowe

Re: [Mesa-dev] [PATCH 26/46] glsl: add "in" or "out" prefix to name when flattening interface blocks

2015-07-21 Thread Dave Airlie
On 17 June 2015 at 09:01, Marek Olšák wrote: > From: Fabian Bieler > Reviewed-by: Dave Airlie > This is to prevent a name conflict in tessellation shaders built-in interface > blocks. > --- > src/glsl/lower_named_interface_blocks.cpp | 7 +-- > 1 file changed, 5 inser

Re: [Mesa-dev] [PATCH 28/46] glsl: don't lower variable indexing on non-patch tessellation inputs/outputs

2015-07-21 Thread Dave Airlie
l size is stored in the "gl_PatchVerticeIn" built-in gl_PatchVerticeIn? Other than that, Reviewed-by: Dave Airlie ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 30/46] glsl: relax unsized input/output block arrays for TCS/TES

2015-07-21 Thread Dave Airlie
This should use _mesa_shader_stage_to_string in the _mesa_glsl_error strings, Change that and it can have Reviewed-by: Dave Airlie > > --- > src/glsl/ast_to_hir.cpp | 33 ++--- > 1 file changed, 26 insertions(+), 7 deletions(-) > > dif

Re: [Mesa-dev] [PATCH 01/46] drirc: drop support for Heaven 3.0, fixes tessellation in 4.0

2015-07-21 Thread Dave Airlie
>> The patches that are missing Rbs are: >> >> 23-24, 26-43, 45-46. With where I've replied, you can add my Reviewed-by to these. it might be nice to sed/^I// across the patches that add tabs into GLSL, but it's already scary in there. Dave. __

  1   2   3   4   5   6   7   8   9   10   >