Re: [Mesa-dev] [PATCH 2/4] gallium: add initial support for conservative rasterization

2018-03-23 Thread Marek Olšák
On Fri, Mar 23, 2018 at 8:54 PM, Ilia Mirkin wrote: > On Fri, Mar 23, 2018 at 8:51 PM, Marek Olšák wrote: > > diff --git a/src/gallium/include/pipe/p_state.h > > b/src/gallium/include/pipe/p_state.h > >> > >> index 4dce399f84..913a79faee 100644 > >> --- a/src/gallium/include/pipe/p_state.h > >>

Re: [Mesa-dev] [PATCH shader-db 4/4] run: handling binding of attribute variable name

2018-03-23 Thread Dongwon Kim
I realized this model won't work with parellel execution. I will fix it and post another version shortly. On Wed, Mar 14, 2018 at 03:15:20PM -0700, Kenneth Graunke wrote: > On Friday, March 9, 2018 2:28:36 PM PDT Dongwon Kim wrote: > > Optional binding of variables can be processed before linking

[Mesa-dev] [PATCH shaderdb] run: shader program file created via GetProgramBinary (v5)

2018-03-23 Thread Dongwon Kim
With optin '-b', shader-db now generates a shader program binary file using GetProgramBinary(). This shader program binary can be loaded via ProgramBinary() to be executed by an application later. v2: 1. define MAX_LOG_LEN and use it as the size of gl log 2. define MAX_PROG_SIZE and use it as

Re: [Mesa-dev] [PATCH 2/4] gallium: add initial support for conservative rasterization

2018-03-23 Thread Ilia Mirkin
On Fri, Mar 23, 2018 at 8:51 PM, Marek Olšák wrote: > diff --git a/src/gallium/include/pipe/p_state.h > b/src/gallium/include/pipe/p_state.h >> >> index 4dce399f84..913a79faee 100644 >> --- a/src/gallium/include/pipe/p_state.h >> +++ b/src/gallium/include/pipe/p_state.h >> @@ -113,6 +113,7 @@ stru

Re: [Mesa-dev] [PATCH 2/4] gallium: add initial support for conservative rasterization

2018-03-23 Thread Marek Olšák
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h > index 4dce399f84..913a79faee 100644 > --- a/src/gallium/include/pipe/p_state.h > +++ b/src/gallium/include/pipe/p_state.h > @@ -113,6 +113,7 @@ struct pipe_rasterizer_state > unsigned line_smooth:1; > un

Re: [Mesa-dev] [PATCH 2/4] gallium: add initial support for conservative rasterization

2018-03-23 Thread Marek Olšák
On Wed, Mar 21, 2018 at 8:04 PM, Roland Scheidegger wrote: > Am 22.03.2018 um 00:43 schrieb Ilia Mirkin: > > On Wed, Mar 21, 2018 at 7:37 PM, Roland Scheidegger > wrote: > >> Personally I'm not a big proponent on propagating single-vendor > >> extensions (which are useless for anything but one s

Re: [Mesa-dev] [PATCH] anv: Add gen11 to anv_genX_call

2018-03-23 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 22/03/18 20:58, Jordan Justen wrote: Signed-off-by: Jordan Justen --- src/intel/vulkan/anv_cmd_buffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 8f4bf3f0bb9..33687920

Re: [Mesa-dev] [PATCH] anv: Set genX_table for gen11

2018-03-23 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 23/03/18 22:03, Jordan Justen wrote: Signed-off-by: Jordan Justen --- src/intel/vulkan/anv_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 4cacba93430..d400a1328b4 100644 --

Re: [Mesa-dev] [PATCH 6/6] nir: Don't condition 'a-b < 0' -> 'a < b' on is_not_used_by_conditional

2018-03-23 Thread Matt Turner
On Fri, Mar 23, 2018 at 3:44 PM, Ian Romanick wrote: > On 03/23/2018 11:39 AM, Matt Turner wrote: >> On Wed, Mar 21, 2018 at 5:58 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> Now that i965 recognizes that a-b generates the same conditions as 'a < >>> b', there is no reason to condition

Re: [Mesa-dev] [PATCH v3 09/19] nir/vtn: initial OpenCL.std extension

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst wrote: > From: Rob Clark > > Not complete, mostly just adding things as I encounter them in CTS. But > not getting far enough yet to hit most of the OpenCL.std instructions. > > v2: update hadd definition (Karol Herbst ) > > Signed-off-by: Rob Clar

Re: [Mesa-dev] [PATCH 6/6] nir: Don't condition 'a-b < 0' -> 'a < b' on is_not_used_by_conditional

2018-03-23 Thread Ian Romanick
On 03/23/2018 11:39 AM, Matt Turner wrote: > On Wed, Mar 21, 2018 at 5:58 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> Now that i965 recognizes that a-b generates the same conditions as 'a < >> b', there is no reason to condition this transformation on 'is not used >> by conditional.' >> >

Re: [Mesa-dev] [PATCH] anv: Add gen11 to anv_genX_call

2018-03-23 Thread Jordan Justen
On 2018-03-22 14:19:47, Lionel Landwerlin wrote: > There is another macro anv_genX_call() in anv_cmd_buffer.c & anv_blorp.c This patch was changing anv_genX_call in anv_cmd_buffer.c. anv_blorp.c appeared to have gen11 handled. > Also a switch in anv_device.c in anv_device_init_dispatch. You're

[Mesa-dev] [PATCH] anv: Set genX_table for gen11

2018-03-23 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/intel/vulkan/anv_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 4cacba93430..d400a1328b4 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -136

Re: [Mesa-dev] [PATCH] i965/vec4: Fix null destination register in 3-source instructions

2018-03-23 Thread Matt Turner
Thanks! Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 51/61] spirv: Update vtn_pointer_to/from_ssa to handle deref pointers

2018-03-23 Thread Jason Ekstrand
Now that pointers can be derefs and derefs just produce SSA values, we can convert any pointer to/from SSA. --- src/compiler/spirv/vtn_variables.c | 73 ++ 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/

Re: [Mesa-dev] [PATCH 00/61] nir: Move to using instructions for derefs

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 2:42 PM, Jason Ekstrand wrote: > This is something that Connor and I have been talking about for some time > now. The basic idea is to replace the current singly linked nir_deref list > with deref instructions. This is similar to what LLVM does and it offers > quite a bi

[Mesa-dev] [PATCH 29/61] nir: Support deref instructions in lower_clip_cull

2018-03-23 Thread Jason Ekstrand
--- .../nir/nir_lower_clip_cull_distance_arrays.c | 69 -- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c b/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c index 95eda82..69b31d5 100644 --- a/sr

[Mesa-dev] [PATCH 56/61] anv/pipeline: Convert lower_input_attachments to deref instructions

2018-03-23 Thread Jason Ekstrand
--- src/intel/vulkan/anv_nir_lower_input_attachments.c | 31 +++--- src/intel/vulkan/anv_pipeline.c| 6 ++--- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/intel/vulkan/anv_nir_lower_input_attachments.c b/src/intel/vulkan/anv_nir_lower_i

[Mesa-dev] [PATCH 48/61] spirv: Make push constants an offset-based pointer

2018-03-23 Thread Jason Ekstrand
Push constants have been a weird edge-case for a while in that they have explitic offsets but we've been internally building access chains for them. This mostly works but it means that passing pointers to push constants through as function arguments is broken. The easy thing to do for now is to j

[Mesa-dev] [PATCH 49/61] spirv: Clean up vtn_pointer_to_offset

2018-03-23 Thread Jason Ekstrand
Now that push constants are using on-the-fly offsets, we no longer need to handle access chains in vtn_pointer_to_offset. --- src/compiler/spirv/spirv_to_nir.c | 2 +- src/compiler/spirv/vtn_private.h | 2 +- src/compiler/spirv/vtn_variables.c | 89 ++ 3 fi

[Mesa-dev] [PATCH 57/61] anv/pipeline: Convert YCbCr lowering to deref instructiosn

2018-03-23 Thread Jason Ekstrand
--- src/intel/vulkan/anv_nir_lower_ycbcr_textures.c | 34 ++--- src/intel/vulkan/anv_pipeline.c | 6 ++--- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/intel/vulkan/anv_nir_lower_ycbcr_textures.c b/src/intel/vulkan/anv_nir_lower_ycbcr_t

[Mesa-dev] [PATCH 60/61] intel/fs: Use image_deref intrinsics instead of image_var

2018-03-23 Thread Jason Ekstrand
Since we had to rewrite the deref walking loop anyway, I took the opportunity to make it a bit clearer and more efficient. In particular, in the AoA case, we will now emit one minmax instead of one per array level. --- src/intel/compiler/brw_fs.h | 2 +- src/intel/compiler/brw_fs_nir.cpp

[Mesa-dev] [PATCH 34/61] nir: Support deref instructions in lower_wpos_ytransform

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_wpos_ytransform.c | 51 +++- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 62166e7..6212702 100644 --- a/src/compiler/nir/nir_l

[Mesa-dev] [PATCH 21/61] nir: Support deref instructions in lower_io_to_temporaries

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_io_to_temporaries.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_lower_io_to_temporaries.c b/src/compiler/nir/nir_lower_io_to_temporaries.c index 301ba65..7ba66ba 100644 --- a/src/compiler/nir/nir_lower_io_to_temporaries.c +++ b/src/com

[Mesa-dev] [PATCH 54/61] nir,spirv: Rework function calls

2018-03-23 Thread Jason Ekstrand
This commit completely reworks function calls in NIR. Instead of having a set of variables for the parameters and return value, nir_call_instr now has simply has a number of sources which get mapped to load_param intrinsics inside the functions. It's up to the client API to build an ABI on top of

[Mesa-dev] [PATCH 24/61] nir: Support deref instructions in split_var_copies

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_split_var_copies.c | 42 + 1 file changed, 42 insertions(+) diff --git a/src/compiler/nir/nir_split_var_copies.c b/src/compiler/nir/nir_split_var_copies.c index bc3ceed..bcd1f10 100644 --- a/src/compiler/nir/nir_split_var_copies.c +++ b/sr

[Mesa-dev] [PATCH 58/61] anv/apply_pipeline_layout: Simplify extract_tex_src_plane

2018-03-23 Thread Jason Ekstrand
--- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 46 +++- 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index d5a08f7..87d9a91 100644 --- a/src/intel/vul

[Mesa-dev] [PATCH 61/61] intel/nir: Only lower load/store derefs

2018-03-23 Thread Jason Ekstrand
Everything else should already be handled. --- src/intel/compiler/brw_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 8bd9b96..b8c18ea 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_

[Mesa-dev] [PATCH 40/61] st/nir: Move lower_deref_instrs later

2018-03-23 Thread Jason Ekstrand
--- src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 7d111d6..f62135a 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/st

[Mesa-dev] [PATCH 41/61] spirv: Use deref instructions for most variables

2018-03-23 Thread Jason Ekstrand
The only thing still using old-school drefs are function calls. --- src/compiler/spirv/spirv_to_nir.c | 119 +++-- src/compiler/spirv/vtn_cfg.c | 8 +- src/compiler/spirv/vtn_glsl450.c | 19 ++-- src/compiler/spirv/vtn_private.h | 13 ++- src/compiler/spirv/vtn_varia

[Mesa-dev] [PATCH 46/61] anv/pipeline: Lower more constant initializers earlier

2018-03-23 Thread Jason Ekstrand
Once we've gotten rid of everything but the main entrypoint, there's no reason why we should go ahead and lower them all. This is what radv does and it will make future work easier. --- src/intel/vulkan/anv_pipeline.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

[Mesa-dev] [PATCH 36/61] nir: Support deref instructions in remove_unused_varyings

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_linking_helpers.c | 50 ++ 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c index 2b0a266..1a0cb91 100644 --- a/src/compiler/nir/nir_linking_help

[Mesa-dev] [PATCH 39/61] i965: Move nir_lower_deref_instrs to right before locals_to_regs

2018-03-23 Thread Jason Ekstrand
--- src/intel/compiler/brw_nir.c| 2 ++ src/mesa/drivers/dri/i965/brw_program.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index cf994ac..4fc6cae 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src

[Mesa-dev] [PATCH 53/61] spirv/cfg: Make the builder fully capable for both walks

2018-03-23 Thread Jason Ekstrand
We were only initializing vtn_builder::func for the pre-walk where we build the CFG. We were only initializing the nir_builder for the later walk through the instructions even though were were setting b->cursor for the pre-walk. Let's set both both places so that everything is consistent. This u

[Mesa-dev] [PATCH 55/61] anv/pipeline: Do less deref instruction lowering

2018-03-23 Thread Jason Ekstrand
This commit removes most of the deref instruction lowering. Instead of lowering early, we only lower textures and images and we only do so right before any of the anv image lowering passes. --- src/intel/vulkan/anv_pipeline.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 30/61] nir: Support deref instructions in propagate_invariant

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_propagate_invariant.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir_propagate_invariant.c b/src/compiler/nir/nir_propagate_invariant.c index 7b5bd6c..b48b91c 100644 --- a/src/compiler/nir/nir_propagate_in

[Mesa-dev] [PATCH 43/61] nir/lower_system_values: Support SYSTEM_VALUE_LOCAL_GROUP_SIZE

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_system_values.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c index 104df51..5191fb3 100644 --- a/src/compiler/nir/nir_lower_system_values.c +++ b/src/compiler/

[Mesa-dev] [PATCH 44/61] spirv: Use the LOCAL_GROUP_SIZE system value

2018-03-23 Thread Jason Ekstrand
--- src/compiler/spirv/vtn_variables.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index aeb09dd..26b2adf 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn

[Mesa-dev] [PATCH 31/61] nir: Support deref instructions in gather_info

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_gather_info.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index 743f968..50d67b6 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/

[Mesa-dev] [PATCH 47/61] spirv: Use NIR per-member splitting

2018-03-23 Thread Jason Ekstrand
Before, we were doing structure splitting in spirv_to_nir. Unfortunately, this doesn't really work when you think about passing struct pointers into functions. Doing it later in NIR is a much better plan. --- src/amd/vulkan/radv_shader.c | 7 ++ src/compiler/spirv/vtn_private.h | 1 -

[Mesa-dev] [PATCH 33/61] nir: Support deref instructions in lower_atomics

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_atomics.c | 119 +-- 1 file changed, 113 insertions(+), 6 deletions(-) diff --git a/src/compiler/nir/nir_lower_atomics.c b/src/compiler/nir/nir_lower_atomics.c index ee66aa3..770ebe2 100644 --- a/src/compiler/nir/nir_lower_atomics.c

[Mesa-dev] [PATCH 52/61] spirv: Record the type of functions

2018-03-23 Thread Jason Ekstrand
--- src/compiler/spirv/vtn_cfg.c | 4 ++-- src/compiler/spirv/vtn_private.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c index 12d68d6..692e3b6 100644 --- a/src/compiler/spirv/vtn_cfg.c +++ b/src/compiler/spi

[Mesa-dev] [PATCH 59/61] anv/pipeline: Convert apply_pipeline_layout to deref instructions

2018-03-23 Thread Jason Ekstrand
--- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 149 --- src/intel/vulkan/anv_pipeline.c | 3 - 2 files changed, 78 insertions(+), 74 deletions(-) diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline

[Mesa-dev] [PATCH 38/61] intel/nir: Fixup deref modes after lowering patch vertices

2018-03-23 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp b/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp index 69da83a..0fd1492 100644 --- a/src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp +++ b/src/mes

[Mesa-dev] [PATCH 45/61] nir/spirv: Pass nir_variable_data into apply_var_decoration

2018-03-23 Thread Jason Ekstrand
--- src/compiler/spirv/vtn_variables.c | 52 +++--- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 26b2adf..03c898e 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/

[Mesa-dev] [PATCH 50/61] spirv: Allow pointers to have a deref at the base

2018-03-23 Thread Jason Ekstrand
Previously, pointers fell into two categories: index/offset for UBOs, SSBOs, etc. and var + access chain for logical pointers. This commit adds another logical pointer mode that's deref + access chain. It's tempting to think that we can just replace variable-based pointers with deref-based or at

[Mesa-dev] [PATCH 37/61] intel, ir3: Disable nir_opt_copy_prop_vars

2018-03-23 Thread Jason Ekstrand
This pass doesn't handle deref instructions yet. Making it handle both legacy derefs and deref instructions would be painful. Since it's not important for correctness, just disable it for now. --- src/gallium/drivers/freedreno/ir3/ir3_nir.c | 2 +- src/intel/compiler/brw_nir.c| 2

[Mesa-dev] [PATCH 28/61] nir: Support deref instructions in lower_system_values

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_system_values.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c index fb560ee..104df51 100644 --- a/src/compiler/nir/nir_lower_system_values.c

[Mesa-dev] [PATCH 32/61] nir: Support deref instructions in lower_io

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_io.c | 70 + 1 file changed, 50 insertions(+), 20 deletions(-) diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index df91feb..549583d 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compil

[Mesa-dev] [PATCH 27/61] nir/deref: Add a deref cleanup function

2018-03-23 Thread Jason Ekstrand
Sometimes it's useful for a pass to be able to clean up its own derefs instead of waiting for DCE. This little helper makes it very easy. --- src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_deref.c | 13 + 2 files changed, 15 insertions(+) diff --git a/src/compiler/nir/nir

[Mesa-dev] [PATCH 17/61] nir/lower_atomics: Rework the main walker loop a bit

2018-03-23 Thread Jason Ekstrand
This replaces some "if (...} { }" with "if (...) continue;" to reduce nesting depth and makes nir_metadata_preserve conditional on progress for the given impl. --- src/compiler/nir/nir_lower_atomics.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 35/61] nir: Support deref instructions in lower_pos_center

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_wpos_center.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_wpos_center.c b/src/compiler/nir/nir_lower_wpos_center.c index dca810d..5b68cac 100644 --- a/src/compiler/nir/nir_lower_wpos_center.c +++ b/src

[Mesa-dev] [PATCH 23/61] nir: Support deref instructions in lower_var_copies

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir.h | 3 ++ src/compiler/nir/nir_builder.h | 48 ++ src/compiler/nir/nir_lower_var_copies.c | 90 +++-- 3 files changed, 138 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compil

[Mesa-dev] [PATCH 42/61] nir: Add a concept of per-member structs and a lowering pass

2018-03-23 Thread Jason Ekstrand
This adds a concept of "members" to a variable with an interface type. It allows you to specify the full variable data for each member of the interface instead of once for the variable. We also add a lowering pass to lower those variables to a sequence of variables and rewrite all the derefs accor

[Mesa-dev] [PATCH 25/61] nir: Support deref instructions in lower_vars_to_ssa

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_vars_to_ssa.c | 75 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c index 0cc6514..403ce26 100644 --- a/src/compiler/nir/nir_lower_va

[Mesa-dev] [PATCH 19/61] nir: Add a pass for fixing deref modes

2018-03-23 Thread Jason Ekstrand
This will be needed by anything which changes variable modes without rewriting derefs. --- src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_deref.c | 30 ++ 2 files changed, 32 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 9

[Mesa-dev] [PATCH 26/61] nir: Support deref instructions in lower_indirect_derefs

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_indirect_derefs.c | 156 +++ 1 file changed, 156 insertions(+) diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c b/src/compiler/nir/nir_lower_indirect_derefs.c index 02f202d..ebeb79b 100644 --- a/src/compiler/nir/nir_lower_indirect_d

[Mesa-dev] [PATCH 15/61] prog/nir: Simplify some load/store operations

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_builder.h | 6 ++ src/mesa/program/prog_to_nir.c | 29 ++--- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index f475d13..634a55d 100644 --- a/src/compiler/nir/n

[Mesa-dev] [PATCH 20/61] nir: Support deref instructions in lower_global_vars_to_local

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_lower_global_vars_to_local.c | 62 +++ 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/src/compiler/nir/nir_lower_global_vars_to_local.c b/src/compiler/nir/nir_lower_global_vars_to_local.c index c8fdfde..14aa366 100644 --- a/src/compile

[Mesa-dev] [PATCH 10/61] nir: Add deref sources to texture instructions

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir.h | 2 ++ src/compiler/nir/nir_print.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 591d53e..ce9e458 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1249,6 +1249,8 @@ typedef enu

[Mesa-dev] [PATCH 16/61] prog/nir: Use deref instructions for params

2018-03-23 Thread Jason Ekstrand
--- src/mesa/program/prog_to_nir.c | 36 ++-- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index 8ad1dc0..436d1c0 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/pro

[Mesa-dev] [PATCH 12/61] anv, i965, radv, st, ir3: Call nir_lower_deref_instrs

2018-03-23 Thread Jason Ekstrand
This inserts a call to nir_lower_deref_instrs at every call site of glsl_to_nir, spirv_to_nir, and prog_to_nir. --- src/amd/vulkan/radv_shader.c| 2 ++ src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 3 +++ src/intel/vulkan/anv_pipeline.c | 2 ++ src/mesa/driv

[Mesa-dev] [PATCH 13/61] glsl/nir: Only claim to handle intrinsic functions

2018-03-23 Thread Jason Ekstrand
Non-intrinsic function handling has never actually been tested and probably doesn't work. Just get rid of it for now. We can always add it back in later if it's useful. --- src/compiler/glsl/glsl_to_nir.cpp | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --

[Mesa-dev] [PATCH 11/61] nir: Add helpers for working with deref instructions

2018-03-23 Thread Jason Ekstrand
This commit adds a pass for lowering deref instructions to deref chains as well as some smaller helpers to ease the transition. --- src/compiler/Makefile.sources | 1 + src/compiler/nir/meson.build | 1 + src/compiler/nir/nir.h | 33 + src/compiler/nir/nir_builder.h | 23

[Mesa-dev] [PATCH 14/61] glsl/nir: Use deref instructions instead of dref chains

2018-03-23 Thread Jason Ekstrand
--- src/compiler/glsl/glsl_to_nir.cpp | 239 +++--- 1 file changed, 94 insertions(+), 145 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 1c842b7..db0c911 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/sr

[Mesa-dev] [PATCH 22/61] nir: Add a deref path helper struct

2018-03-23 Thread Jason Ekstrand
This commit introduces a new nir_deref.h header for helpers that are less common and really only needed by a few heavy-duty passes. In this header is a new struct for representing a full deref path which can be walked in either direction. --- src/compiler/Makefile.sources | 1 + src/compiler/nir

[Mesa-dev] [PATCH 09/61] nir: Add _deref versions of all of the _var intrinsics

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir.h| 2 +- src/compiler/nir/nir_builder.h| 37 + src/compiler/nir/nir_intrinsics.h | 84 +++ 3 files changed, 122 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h i

[Mesa-dev] [PATCH 18/61] nir: Support deref instructions in remove_dead_variables

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_remove_dead_variables.c | 99 1 file changed, 99 insertions(+) diff --git a/src/compiler/nir/nir_remove_dead_variables.c b/src/compiler/nir/nir_remove_dead_variables.c index eff66f9..6b1927f 100644 --- a/src/compiler/nir/nir_remove_dead_varia

[Mesa-dev] [PATCH 08/61] nir/builder: Add deref building helpers

2018-03-23 Thread Jason Ekstrand
--- src/compiler/nir/nir_builder.h | 106 + 1 file changed, 106 insertions(+) diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index 36e0ae3..66f705b 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.

[Mesa-dev] [PATCH 06/61] nir/validator: Validate that all used variables exist

2018-03-23 Thread Jason Ekstrand
We were validating this for locals but nothing else. --- src/compiler/nir/nir_validate.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index a49948f..e9d6bd5 100644 --- a/src/compiler/nir/nir_v

[Mesa-dev] [PATCH 01/61] nir: Add src/dest num_components helpers

2018-03-23 Thread Jason Ekstrand
We already have these for bit_size --- src/compiler/nir/nir.h | 12 1 file changed, 12 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 0d207d0..dcd7045 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -626,11 +626,23 @@ nir_src_bit_

[Mesa-dev] [PATCH 00/61] nir: Move to using instructions for derefs

2018-03-23 Thread Jason Ekstrand
This is something that Connor and I have been talking about for some time now. The basic idea is to replace the current singly linked nir_deref list with deref instructions. This is similar to what LLVM does and it offers quite a bit more freedom when we start getting more realistic pointers from

[Mesa-dev] [PATCH 02/61] nir: Return a cursor from nir_instr_remove

2018-03-23 Thread Jason Ekstrand
Because nir_instr_remove is an inline wrapper around nir_instr_remove_v, the compiler should be able to tell that the return value is unused and not emit the extra code in most cases. --- src/compiler/nir/nir.c| 2 +- src/compiler/nir/nir.h| 16

[Mesa-dev] [PATCH 05/61] intel/vec4: Set channel_sizes for MOV_INDIRECT sources

2018-03-23 Thread Jason Ekstrand
Otherwise, any indirect push constant access results in an assertion failure when we start digging through the channel_sizes array. This fixes dEQP-VK.pipeline.push_constant.graphics_pipeline.dynamic_index_vert on Haswell. It should be a harmless no-op for GL since indirect push constants aren't

[Mesa-dev] [PATCH 03/61] nir/vars_to_ssa: Remove copies from the correct set

2018-03-23 Thread Jason Ekstrand
Cc: mesa-sta...@lists.freedesktop.org --- src/compiler/nir/nir_lower_vars_to_ssa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c index e8cfe30..0cc6514 100644 --- a/src/compiler/nir/nir_lower

[Mesa-dev] [PATCH 04/61] nir/lower_indirect_derefs: Support interp_var_at intrinsics

2018-03-23 Thread Jason Ekstrand
This fixes the fs-interpolateAtCentroid-block-array piglit test on i965. Cc: mesa-sta...@lists.freedesktop.org --- src/compiler/nir/nir_lower_indirect_derefs.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c b/src/co

[Mesa-dev] [PATCH 07/61] nir: Add a deref instruction type

2018-03-23 Thread Jason Ekstrand
This commit adds a new instruction type to NIR for handling derefs. Nothing uses it yet but this adds the data structure as well as all of the code to validate, print, clone, and [de]serialize them. --- src/compiler/nir/nir.c| 50 +++ src/compiler/nir/nir.h

Re: [Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 2:15 PM, Karol Herbst wrote: > On Fri, Mar 23, 2018 at 10:07 PM, Jason Ekstrand > wrote: > > +list > > > > On Fri, Mar 23, 2018 at 1:45 PM, Karol Herbst > wrote: > >> > >> On Fri, Mar 23, 2018 at 9:30 PM, Jason Ekstrand > >> wrote: > >> > As I've been rewriting core NIR

Re: [Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-23 Thread Karol Herbst
On Fri, Mar 23, 2018 at 10:07 PM, Jason Ekstrand wrote: > +list > > On Fri, Mar 23, 2018 at 1:45 PM, Karol Herbst wrote: >> >> On Fri, Mar 23, 2018 at 9:30 PM, Jason Ekstrand >> wrote: >> > As I've been rewriting core NIR deref handling, I've been thinking about >> > this problem quite a bit. O

Re: [Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-23 Thread Jason Ekstrand
+list On Fri, Mar 23, 2018 at 1:45 PM, Karol Herbst wrote: > On Fri, Mar 23, 2018 at 9:30 PM, Jason Ekstrand > wrote: > > As I've been rewriting core NIR deref handling, I've been thinking about > > this problem quite a bit. One objective I have is to actually make UBO > and > > SSBO access go

Re: [Mesa-dev] [PATCH 1/6] i965: Add negative_equals methods

2018-03-23 Thread Ian Romanick
On 03/23/2018 12:17 PM, Chema Casanova wrote: > > > On 23/03/18 19:27, Matt Turner wrote: >> On Wed, Mar 21, 2018 at 5:58 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> This method is similar to the existing ::equals methods. Instead of >>> testing that two src_regs are equal to each o

Re: [Mesa-dev] [PATCH v3 15/19] nir: use load_local_group_size

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 1:35 PM, Karol Herbst wrote: > On Fri, Mar 23, 2018 at 9:18 PM, Jason Ekstrand > wrote: > > On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst > wrote: > >> > >> From: Rob Clark > >> > >> If local_size is not known at compile time, which is the case with > >> clover, use th

[Mesa-dev] [PATCH] i965/vec4: Fix null destination register in 3-source instructions

2018-03-23 Thread Ian Romanick
From: Ian Romanick A recent commit (see below) triggered some cases where conditional modifier propagation and dead code elimination would cause a MAD instruction like the following to be generated: mad.l.f0 null, ... Matt pointed out that fs_visitor::fixup_3src_null_dest() fixes cases lik

Re: [Mesa-dev] [PATCH v3 15/19] nir: use load_local_group_size

2018-03-23 Thread Karol Herbst
On Fri, Mar 23, 2018 at 9:18 PM, Jason Ekstrand wrote: > On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst wrote: >> >> From: Rob Clark >> >> If local_size is not known at compile time, which is the case with >> clover, use the load_local_group_size intrinsic instead. >> >> Signed-off-by: Karol Her

Re: [Mesa-dev] [PATCH v3 12/19] nir: specify bit_size when loading system values

2018-03-23 Thread Karol Herbst
On Fri, Mar 23, 2018 at 9:15 PM, Jason Ekstrand wrote: > On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst wrote: >> >> With OpenCL the size of some system value depends on the Physical model >> choosen, so we need a way to load any system value as 32 or 64 bit. >> >> Signed-off-by: Karol Herbst >>

Re: [Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-23 Thread Jason Ekstrand
As I've been rewriting core NIR deref handling, I've been thinking about this problem quite a bit. One objective I have is to actually make UBO and SSBO access go through derefs instead of just being an offset and index so that the compiler can better reason about them. In particular, I want to b

Re: [Mesa-dev] [PATCH v3 15/19] nir: use load_local_group_size

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst wrote: > From: Rob Clark > > If local_size is not known at compile time, which is the case with > clover, use the load_local_group_size intrinsic instead. > > Signed-off-by: Karol Herbst > --- > src/compiler/nir/nir_lower_system_values.c | 25

Re: [Mesa-dev] [PATCH v3 12/19] nir: specify bit_size when loading system values

2018-03-23 Thread Jason Ekstrand
On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst wrote: > With OpenCL the size of some system value depends on the Physical model > choosen, so we need a way to load any system value as 32 or 64 bit. > > Signed-off-by: Karol Herbst > --- > src/compiler/nir/nir_builder.h | 10 +++

[Mesa-dev] [PATCH 3/5] radeonsi: move FMASK shader logic to shared code

2018-03-23 Thread Marek Olšák
From: Marek Olšák We'll need it for FBFETCH in both TGSI and NIR paths. --- src/amd/common/ac_llvm_build.c| 56 + src/amd/common/ac_llvm_build.h| 3 + src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c | 74 +-- 3 files

[Mesa-dev] [PATCH 5/5] radeonsi: implement GL_KHR_blend_equation_advanced

2018-03-23 Thread Marek Olšák
From: Marek Olšák MSAA is supported using sample shading. Layered rendering and all texture targets are also supported. --- docs/features.txt | 2 +- docs/relnotes/18.1.0.html | 1 + src/gallium/drivers/radeonsi/si_blit.c| 8

[Mesa-dev] [PATCH 2/5] radeonsi: add R600_DEBUG=nofmask to disable MSAA compression

2018-03-23 Thread Marek Olšák
From: Marek Olšák For testing. --- src/gallium/drivers/radeon/r600_pipe_common.h | 1 + src/gallium/drivers/radeon/r600_texture.c | 13 +++-- src/gallium/drivers/radeonsi/si_pipe.c| 1 + src/gallium/drivers/radeonsi/si_pipe.h| 1 + src/gallium/drivers/radeonsi/si_s

[Mesa-dev] [PATCH 4/5] radeonsi: rename unpack_param -> si_unpack_param

2018-03-23 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 54 +++ src/gallium/drivers/radeonsi/si_shader_internal.h | 4 ++ 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeon

[Mesa-dev] [PATCH 0/5] KHR_blend_equation_advanced for RadeonSI

2018-03-23 Thread Marek Olšák
Hi, This is the second and fianl version, and it adds MSAA support and FBFETCH tests into Gallium. Please review. Thanks, Marek ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/5] gallium/u_tests: test FBFETCH and shader-based blending with MSAA

2018-03-23 Thread Marek Olšák
From: Marek Olšák --- src/gallium/auxiliary/util/u_tests.c | 168 ++- 1 file changed, 128 insertions(+), 40 deletions(-) diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index 86eee6e68b1..293a4580a9f 100644 --- a/src/gall

[Mesa-dev] [PATCH v3 16/19] nir: add load_kernel_param

2018-03-23 Thread Karol Herbst
OpenCL kernels have parameters (see pipe_grid_info::input), and so we need a way to access them. The offset source is the offset of the parameter to load in the kernel input buffer. v2: improve commit message remove BASE split lower_io changes into separate commit Signed-off-by: Karol He

[Mesa-dev] [PATCH v3 15/19] nir: use load_local_group_size

2018-03-23 Thread Karol Herbst
From: Rob Clark If local_size is not known at compile time, which is the case with clover, use the load_local_group_size intrinsic instead. Signed-off-by: Karol Herbst --- src/compiler/nir/nir_lower_system_values.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-

[Mesa-dev] [PATCH v3 17/19] RFC nir/lower_io: lower kernel entry param load_vars to load_kernel_param

2018-03-23 Thread Karol Herbst
For OpenCL kernels we have an input buffer where most of the parameters are stored. For this we have to keep track of alignment and padding rules to correctly identify the offset of each parameter inside that buffer. For this we can just rely on the new cl_size and cl_alignment glsl_type functions

[Mesa-dev] [PATCH v3 19/19] RFC: nir/vtn: member in struct deref

2018-03-23 Thread Karol Herbst
Signed-off-by: Karol Herbst --- src/compiler/spirv/vtn_private.h | 5 +++-- src/compiler/spirv/vtn_variables.c | 14 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index 510c12faa87..45b581bf80e

[Mesa-dev] [PATCH v3 14/19] nir/vtn/opencl: support fma

2018-03-23 Thread Karol Herbst
Signed-off-by: Karol Herbst --- src/compiler/spirv/vtn_opencl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c index 3c5ecd22452..723a7edf9c2 100644 --- a/src/compiler/spirv/vtn_opencl.c +++ b/src/compiler/spirv/vtn_opencl.c

[Mesa-dev] [PATCH v3 09/19] nir/vtn: initial OpenCL.std extension

2018-03-23 Thread Karol Herbst
From: Rob Clark Not complete, mostly just adding things as I encounter them in CTS. But not getting far enough yet to hit most of the OpenCL.std instructions. v2: update hadd definition (Karol Herbst ) Signed-off-by: Rob Clark Signed-off-by: Karol Herbst --- src/compiler/nir/meson.build

  1   2   >