[Mesa-dev] [PATCH 1/2] intel: blorp: fix potential NULL pointer dereferences

2017-10-09 Thread Lionel Landwerlin
CID: 1418616, 1418607 Signed-off-by: Lionel Landwerlin --- src/intel/blorp/blorp_blit.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 11c2116a758..84e46d7d31b 100644 --- a/src/intel/blorp

[Mesa-dev] [PATCH 2/2] i965: silence coverity warning

2017-10-09 Thread Lionel Landwerlin
Also makes this statement a bit clearer. CID: 1418920 Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index c7ed7284501

Re: [Mesa-dev] [PATCH v2 1/4] nir: set default lod to texture opcodes that needed it but don't provide it

2017-10-10 Thread Lionel Landwerlin
On 10/10/17 14:35, Samuel Iglesias Gonsálvez wrote: Signed-off-by: Samuel Iglesias Gonsálvez --- src/compiler/nir/nir_lower_tex.c | 68 1 file changed, 68 insertions(+) diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c i

Re: [Mesa-dev] [PATCH v2 1/4] nir: set default lod to texture opcodes that needed it but don't provide it

2017-10-11 Thread Lionel Landwerlin
On 11/10/17 09:00, Samuel Iglesias Gonsálvez wrote: On Tuesday, October 10, 2017 4:40:47 PM CEST Lionel Landwerlin wrote: On 10/10/17 14:35, Samuel Iglesias Gonsálvez wrote: Signed-off-by: Samuel Iglesias Gonsálvez --- src/compiler/nir/nir_lower_tex.c | 68

[Mesa-dev] [PATCH 2/2] anv: intel: use anv_image's computed size for importing a BO

2017-10-11 Thread Lionel Landwerlin
Rather than relying on size = stride * height, we can rely on anv_image's total size. Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_intel.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/intel/vulkan/anv_intel.c b/src/

[Mesa-dev] [PATCH 1/2] anv: bo_cache: allow importing a BO larger than needed

2017-10-11 Thread Lionel Landwerlin
It's not a problem if a BO has been allocated larger than we need it to be. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102940 Fixes: 818b857914 ("anv: Use the BO cache for DeviceMemory allocations") Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_allocator.c

Re: [Mesa-dev] [PATCH v2 0/5] i965: add support for loadable OA configs

2017-10-12 Thread Lionel Landwerlin
On 10/10/17 05:28, Kenneth Graunke wrote: On Tuesday, August 29, 2017 6:05:00 AM PDT Lionel Landwerlin wrote: Hi again, Improvement on detection of loadable configs as suggested by Chris. Change is in patch 4. Patches 1-3 are: Reviewed-by: Kenneth Graunke I'm still not sure about this

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] anv: fix push descriptors with set > 0

2017-10-12 Thread Lionel Landwerlin
On 12/10/17 18:15, Emil Velikov wrote: On 6 October 2017 at 16:42, Lionel Landwerlin wrote: When writing to set > 0, we were just wrongly writing to set 0. This commit fixes this by lazily allocating each set as we write to them. We didn't go for having them directly into the comman

Re: [Mesa-dev] [PATCH v2 42/52] nir/opt_intrinsics: Rework progress

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: This commit fixes two issues: First, we were returning false regardless of whether or not the function made progress. Second, we were calling nir_metadata_preserve far more often than needed; we only need to call it once

Re: [Mesa-dev] [PATCH v2 36/52] anv/pipeline: Dump shader immedately after spirv_to_nir

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: --- src/intel/vulkan/anv_pipeline.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 7bfdb5c..e08bdd9 100644 --- a/src/intel

Re: [Mesa-dev] [PATCH v2 37/52] anv/pipeline: Drop nir_lower_clip_cull_distance_arrays

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: We already handle it in brw_preprocess_nir --- src/intel/vulkan/anv_pipeline.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index e08bdd9

Re: [Mesa-dev] [PATCH v2 38/52] anv/pipeline: Call nir_lower_system_valaues after brw_preprocess_nir

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: We currently have a bug where nir_lower_system_values gets called before nir_lower_var_copies so it will miss any system value uses which come from a copy_var intrinsic. Moving it to after brw_preprocess_nir fixes this

Re: [Mesa-dev] [PATCH v2 39/52] nir/lower_wpos_ytransform: Support system value intrinsics

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: --- src/compiler/nir/nir_lower_wpos_ytransform.c | 4 1 file changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 771c6ff

Re: [Mesa-dev] [PATCH v2 41/52] intel/compiler: Call nir_lower_system_values in brw_preprocess_nir

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: --- src/intel/compiler/brw_nir.c| 2 ++ src/intel/vulkan/anv_pipeline.c | 2 -- src/mesa/drivers/dri/i965/brw_program.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src

Re: [Mesa-dev] [PATCH v2 40/52] i965/program: Move nir_lower_system_values higher up

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: We want this to get called before nir_lower_subgroups which is going in brw_preprocess_nir. Now that nir_lower_wpos_ytransform can handle system values, this should be safe to do. --- src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH v2 43/52] nir: Add a new subgroups lowering pass

2017-10-13 Thread Lionel Landwerlin
On 13/10/17 06:48, Jason Ekstrand wrote: This commit pulls nir_lower_read_invocations_to_scalar along with most of the guts of nir_opt_intrinsics (which mostly does subgroup lowering) into a new nir_lower_subgroups pass. There are various other bits of subgroup lowering that we're going to want

Re: [Mesa-dev] [PATCH v2 44/52] nir: Add a ssa_dest_init_for_type helper

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: This would be useful a number of places --- src/compiler/nir/nir.h | 9 + 1 file changed, 9 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 1154c42..17efc9b 100644 --- a/src

Re: [Mesa-dev] [PATCH v2 45/52] nir: Make ballot intrinsics variable-size

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: This way they can return either a uvec4 or a uint64_t. At the moment, this is a no-op since we still always return a uint64_t. --- src/compiler/glsl/glsl_to_nir.cpp | 1 + src/compiler/nir/nir_intrinsics.h

Re: [Mesa-dev] [PATCH v2 47/52] nir/lower_subgroups: Lower ballot intrinsics to the specified bit size

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: Ballot intrinsics return a bitfield of subgroups. In GLSL and some SPIR-V extensions, they return a uint64_t. In SPV_KHR_shader_ballot, they return a uvec4. Also, some back-ends would rather pass around 32-bit values

Re: [Mesa-dev] [PATCH v2 46/52] nir/lower_system_values: Lower SUBGROUP_*_MASK based on type

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: The SUBGROUP_*_MASK system values are uint64_t when coming in from GLSL but uvec4 when coming in from SPIR-V. Lowering based on type allows us to nicely handle both. --- src/compiler/nir/nir_lower_system_values.c | 5

Re: [Mesa-dev] [PATCH v2 48/52] nir, intel/compiler: Use a fixed subgroup size

2017-10-13 Thread Lionel Landwerlin
Acked-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: The GL_ARB_shader_ballot spec says that gl_SubGroupSizeARB is declared as a uniform. This means that it cannot change across an invocation such as a draw call or a compute dispatch. For compute shaders, we're ok becau

Re: [Mesa-dev] [PATCH v2 49/52] spirv: Add a vtn_constant_value helper

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: --- src/compiler/spirv/vtn_private.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index 8458462..e7a7c36 100644 --- a/src/compiler/spirv

Re: [Mesa-dev] [PATCH v2 50/52] spirv: Rework barriers

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: Our previous handling of barriers always used the big hammer and didn't correctly emit memory barriers when specified along with a control barrier. This commit completely reworks the way we emit barriers to make t

Re: [Mesa-dev] [PATCH v2 51/52] nir: Validate base types on array dereferences

2017-10-13 Thread Lionel Landwerlin
Acked-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: We were already validating that the parent type goes along with the child type but we weren't actually validating that the parent type is reasonable. This fixes that. --- src/compiler/nir/nir_validate.c

Re: [Mesa-dev] [PATCH v2 52/52] compiler/nir_types: Handle vectors in glsl_get_array_element

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:48, Jason Ekstrand wrote: Most of NIR doesn't allow doing array indexing on a vector (though it does on a matrix). However, nir_lower_io handles it just fine and this behavior is needed for shared variables in Vulkan. This commit

Re: [Mesa-dev] [PATCH] anv: Get rid of gen fall-through

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 13/10/17 06:57, Jason Ekstrand wrote: In the early days of the Vulkan driver, we thought it would be a good idea to just make genN just fall back to the genN-1 code if it didn't need to be any different for genN. While this seemed like a good ide

Re: [Mesa-dev] [PATCH] intel/common: Improve the comments for sample positions

2017-10-13 Thread Lionel Landwerlin
Nice! Reviewed-by: Lionel Landwerlin On 13/10/17 06:58, Jason Ekstrand wrote: These are pulled directly from brw_multisample_state.h --- src/intel/common/gen_sample_positions.h | 65 + 1 file changed, 65 insertions(+) diff --git a/src/intel/common

Re: [Mesa-dev] [PATCH] vulkan/wsi: Free the event in x11_manage_fifo_queues().

2017-10-13 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Henri Verbeet --- I should still have commit access. --- src/vulkan/wsi/wsi_common_x11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c

Re: [Mesa-dev] [PATCH] intel/blorp_blit: Fix max blit size for gen6

2016-12-24 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 24/12/16 18:49, Jordan Justen wrote: Fixes ES3-CTS.gtf.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_stencil_blit Signed-off-by: Jordan Justen --- src/intel/blorp/blorp_blit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

Re: [Mesa-dev] [PATCH 01/53] i965: pass gl_program to the brw_*_debug_recompile() functions

2017-01-03 Thread Lionel Landwerlin
Looks fine to me : Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: Rather then passing gl_shader_program. The only field use was Name which is the same as the Id field in gl_program. For wm and vs we also make the functions static and move them before the codegen

Re: [Mesa-dev] [PATCH 03/53] i965: get shared_size from shader_info rather than gl_shader_program

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: --- src/mesa/drivers/dri/i965/brw_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c index e4d82cf..522ddb9 100644 --- a

Re: [Mesa-dev] [PATCH 02/53] i965: stop depending on gl_shader_program for brw_compute_vue_map() params

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: This removes another dependency on gl_shader_program from the codegen functions, this will help allow us to use gl_program for the CurrentProgram array rather than gl_shader_program. --- src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 04/53] i965: get InfoLog and LinkStatus via the pointer in gl_program

2017-01-03 Thread Lionel Landwerlin
Did you left out accesses to prog-> and shader_prog-> on purpose in : brw_tcs.c brw_tes.c brw_vs.c brw_wm.c ? On 03/01/17 02:43, Timothy Arceri wrote: --- src/mesa/drivers/dri/i965/brw_cs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/

Re: [Mesa-dev] [PATCH 04/53] i965: get InfoLog and LinkStatus via the pointer in gl_program

2017-01-03 Thread Lionel Landwerlin
Thanks, I didn't pull -r :) Reviewed-by: Lionel Landwerlin On 03/01/17 11:44, Timothy Arceri wrote: On Tue, 2017-01-03 at 11:39 +0000, Lionel Landwerlin wrote: Did you left out accesses to prog-> and shader_prog-> on purpose in : brw_tcs.c brw_tes.c brw_vs.c brw_wm.c ? This p

Re: [Mesa-dev] [PATCH 05/53] st/mesa/glsl/i965: move ImageUnits and ImageAccess fields to gl_program

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: Having it here rather than in gl_linked_shader allows us to simplify the code. Also it is error prone to depend on the gl_linked_shader for programs in current use because a failed linking attempt will free infomation

Re: [Mesa-dev] [PATCH 06/53] st/mesa/glsl/i965: set num_ubos directly in shader_info

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: This also removes the duplicate field in gl_linked_shader, and gets num_ubos from shader_info instead. --- src/compiler/glsl/glsl_to_nir.cpp| 1 - src/compiler/glsl/link_uniforms.cpp | 4

Re: [Mesa-dev] [PATCH 07/53] st/mesa/glsl/i965: move per stage UniformBlocks to gl_program

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: This will help allow us to store pointers to gl_program structs in the CurrentProgram array resulting in a bunch of code simplifications. --- src/compiler/glsl/link_uniforms.cpp | 4 ++-- src/compiler/glsl

Re: [Mesa-dev] [PATCH 08/53] st/mesa/glsl/i965: set num_ssbos directly in shader_info

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: Here we also remove the duplicate field in gl_linked_shader and always get the value from shader_info instead. --- src/compiler/glsl/glsl_to_nir.cpp| 1 - src/compiler/glsl/link_uniforms.cpp

Re: [Mesa-dev] [PATCH 10/53] i965: stop passing gl_shader_program to brw_assign_common_binding_table_offsets()

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin A tiny suggestion further down. On 03/01/17 02:43, Timothy Arceri wrote: We now get eventhing we need directly from gl_program so there is Everything? :) no need for this. --- src/mesa/drivers/dri/i965/brw_cs.c | 5 ++--- src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 09/53] st/mesa/glsl/i965: move ShaderStorageBlocks to gl_program

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: Having it here rather than in gl_linked_shader allows us to simplify the code. Also it is error prone to depend on the gl_linked_shader for programs in current use because a failed linking attempt will free infomation

Re: [Mesa-dev] [PATCH 11/53] i965: pass gl_program to brw_upload_ubo_surfaces()

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: There is no need to pass gl_linked_shader anymore. --- src/mesa/drivers/dri/i965/brw_context.h | 3 +-- src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 4 ++-- src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 12/53] i965: stop passing gl_shader_program to brw_nir_setup_glsl_uniforms()

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: We can now just get the data needed from the gl_shader_program_data pointer in gl_program. --- src/mesa/drivers/dri/i965/brw_cs.c | 4 ++-- src/mesa/drivers/dri/i965/brw_gs.c | 2 +- src/mesa

Re: [Mesa-dev] [PATCH 13/53] i965: pass gl_program directly to brw_compile_tes()

2017-01-03 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 03/01/17 02:43, Timothy Arceri wrote: This is the only thing we use from gl_shader_program so pass it directly. --- src/mesa/drivers/dri/i965/brw_compiler.h | 2 +- src/mesa/drivers/dri/i965/brw_shader.cpp | 6 ++ src/mesa/drivers/dri/i965/brw_tes.c

Re: [Mesa-dev] [PATCH 0/2] Spirv: Set push constant base/range

2017-01-03 Thread Lionel Landwerlin
Ping? On 17/12/16 23:43, Lionel Landwerlin wrote: Hi, Up to now, load_push_constant intrinsics generated by the spirv compiler were hardcoded to have an offset of 0 and a range of 128. This series adds a function compute those offset & range. Cheers, Lionel Lionel Landwerlin (2): s

[Mesa-dev] [PATCH v2] spirv: compute push constant access offset & range

2017-01-04 Thread Lionel Landwerlin
v2: Move relative push constant relative offset computation down to _vtn_load_store_tail() (Jason) Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/vtn_variables.c | 78 - src/intel/vulkan/anv_nir_lower_push_constants.c | 1 - 2 files changed, 65

Re: [Mesa-dev] [PATCH v2] spirv: compute push constant access offset & range

2017-01-04 Thread Lionel Landwerlin
On 04/01/17 18:16, Jason Ekstrand wrote: On Jan 4, 2017 12:02, "Lionel Landwerlin" mailto:lionel.g.landwer...@intel.com>> wrote: v2: Move relative push constant relative offset computation down to _vtn_load_store_tail() (Jason) Hm... I may not have been parti

[Mesa-dev] [PATCH] anv: set input_slots_valid on brw_wm_prog_key

2017-01-10 Thread Lionel Landwerlin
from spirv before we can get the number of inputs/outputs so we set this in a post function and leave the field at 0 for hashing. Signed-off-by: Lionel Landwerlin Cc: Jason Ekstrand Cc: Kenneth Graunke --- src/intel/vulkan/anv_pipeline.c | 14 -- 1 file changed, 12 insertions(

[Mesa-dev] [PATCH v2] anv: set input_slots_valid on brw_wm_prog_key

2017-01-10 Thread Lionel Landwerlin
from spirv before we can get the number of inputs/outputs so we set this in a post function and leave the field at 0 for hashing. v2: Use valid slots of the geometry or vertex stage (Jason) Signed-off-by: Lionel Landwerlin Cc: Jason Ekstrand Cc: Kenneth Graunke --- src/intel/vulkan/anv_pipel

Re: [Mesa-dev] [PATCH v2] anv: set input_slots_valid on brw_wm_prog_key

2017-01-10 Thread Lionel Landwerlin
On 10/01/17 16:59, Ilia Mirkin wrote: On Tue, Jan 10, 2017 at 11:50 AM, Lionel Landwerlin wrote: With shaders using a lot of inputs/outputs, like this (from Gtk+) : layout(location = 0) in vec2 inPos; layout(location = 1) in float inGradientPos; layout(location = 2) in flat int inRepeating

[Mesa-dev] [PATCH 1/4] anv: make get_.*_prog_data take a const pipeline

2017-01-10 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 9e3b72e77b..954eaf49fd 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan

[Mesa-dev] [PATCH 2/4] anv: add get_.*_prog_data for tesselation stages

2017-01-10 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_private.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 954eaf49fd..8a69aa22f6 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h

[Mesa-dev] [PATCH v3 4/4] anv: set input_slots_valid on brw_wm_prog_key

2017-01-10 Thread Lionel Landwerlin
from spirv before we can get the number of inputs/outputs so we set this in a post function and leave the field at 0 for hashing. v2: Use valid slots of the geometry or vertex stage (Jason) v3: Use helper to find correct vue map (Jason) Signed-off-by: Lionel Landwerlin --- src/intel/v

[Mesa-dev] [PATCH 3/4] anv: add helper to get vue map for fragment shader

2017-01-10 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_private.h | 11 +++ src/intel/vulkan/genX_pipeline.c | 7 +-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 8a69aa22f6..dbc8c3cf68

[Mesa-dev] [PATCH v4] anv: set input_slots_valid on brw_wm_prog_key

2017-01-10 Thread Lionel Landwerlin
stage (Jason) v3: Use helper to find correct vue map (Jason) v4: Set the valid slots off the previous stages (Jason) Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_pipeline.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/anv_pipeline.c

Re: [Mesa-dev] [PATCH 24/25] mesa/glsl: set and get cs layouts to and from shader_info

2017-01-11 Thread Lionel Landwerlin
On 09/01/17 05:13, Timothy Arceri wrote: --- src/compiler/glsl/linker.cpp | 35 +++ src/mesa/main/mtypes.h | 10 -- src/mesa/main/shaderapi.c| 6 ++ src/mesa/main/shaderobj.c| 2 -- 4 files changed, 17 insertions(+), 36 deletions(-

Re: [Mesa-dev] [PATCH 01/25] mesa/glsl: move ProgramResourceList to gl_shader_program_data

2017-01-11 Thread Lionel Landwerlin
Looks fine : Reviewed-by: Lionel Landwerlin On 09/01/17 05:13, Timothy Arceri wrote: We also move NumProgramResourceList at the same time. GLES does interface validation on SSO at runtime so we need to move this to be able to switch to storing gl_program pointers in CurrentProgram. --- src

Re: [Mesa-dev] [PATCH 03/25] mesa: change init subroutine defaults helper to work per gl_program

2017-01-11 Thread Lionel Landwerlin
Thanks, Reviewed-by: Lionel Landwerlin On 09/01/17 05:13, Timothy Arceri wrote: A later patch will result in SSO programs calling this helper per gl_program rather than per gl_shader_program. --- src/mesa/main/pipelineobj.c | 10 -- src/mesa/main/shaderapi.c | 30

Re: [Mesa-dev] [PATCH 05/25] mesa/meta: rewrite _mesa_shader_program_use() and _mesa_program_use()

2017-01-11 Thread Lionel Landwerlin
Looks fine, with a small suggestion for meta.c : Reviewed-by: Lionel Landwerlin On 09/01/17 05:13, Timothy Arceri wrote: These are rewritten to do what the function name suggests, that is _mesa_shader_program_use() sets the use of all stage and _mesa_program_use() sets the use of a single

Re: [Mesa-dev] Clean ups (hopefully last time)

2017-01-11 Thread Lionel Landwerlin
Patches 10->21 are : Reviewed-by: Lionel Landwerlin On 09/01/17 05:13, Timothy Arceri wrote: Sorry to keep spamming the list with these but a bunch have now landed and theire was a bug fix and a bunch of rebasing required in the remaining patches. Thanks to all that have help review

Re: [Mesa-dev] [PATCH 11/11] anv: Enable tessellation shaders.

2017-01-11 Thread Lionel Landwerlin
On 11/01/17 17:02, Eero Tamminen wrote: Hi, On 09.01.2017 07:26, Kenneth Graunke wrote: Signed-off-by: Kenneth Graunke --- src/intel/vulkan/anv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) I'm not clear whether we want to do this yet. On Skylake, the status is: 99.3% of th

[Mesa-dev] [PATCH 0/4] Vulkan: generate entry points from vk.xml

2017-01-12 Thread Lionel Landwerlin
https://github.com/djdeath/mesa/tree/vk-xml Lionel Landwerlin (4): include: update Vulkan headers vulkan: add API registry anv: generate entry points from vk.xml radv: generate entrypoints from vk.xml include/vulkan/vk_platform.h|2 +- include/vulkan/vulkan.h |

[Mesa-dev] [PATCH 1/4] include: update Vulkan headers

2017-01-12 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- include/vulkan/vk_platform.h | 2 +- include/vulkan/vulkan.h | 247 ++- 2 files changed, 244 insertions(+), 5 deletions(-) diff --git a/include/vulkan/vk_platform.h b/include/vulkan/vk_platform.h index

[Mesa-dev] [PATCH 3/4] anv: generate entry points from vk.xml

2017-01-12 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/Makefile.am| 15 ++-- src/intel/vulkan/anv_entrypoints_gen.py | 125 +--- 2 files changed, 71 insertions(+), 69 deletions(-) diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am

[Mesa-dev] [PATCH 4/4] radv: generate entrypoints from vk.xml

2017-01-12 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/amd/vulkan/Makefile.am | 14 ++--- src/amd/vulkan/radv_entrypoints_gen.py | 105 - 2 files changed, 56 insertions(+), 63 deletions(-) diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am index

Re: [Mesa-dev] [PATCH] anv/pipeline: Replace get_fs_input_map with get_last_vue_prog_data

2017-01-12 Thread Lionel Landwerlin
On 13/01/17 01:08, Jason Ekstrand wrote: This lets us delete a helper from genX_pipeline.c --- src/intel/vulkan/anv_pipeline.c | 2 +- src/intel/vulkan/anv_private.h | 10 +- src/intel/vulkan/genX_pipeline.c | 20 3 files changed, 10 insertions(+), 22 deletio

Re: [Mesa-dev] [PATCH] anv/pipeline: Replace get_fs_input_map with get_last_vue_prog_data

2017-01-12 Thread Lionel Landwerlin
On 13/01/17 06:45, Lionel Landwerlin wrote: On 13/01/17 01:08, Jason Ekstrand wrote: This lets us delete a helper from genX_pipeline.c --- src/intel/vulkan/anv_pipeline.c | 2 +- src/intel/vulkan/anv_private.h | 10 +- src/intel/vulkan/genX_pipeline.c | 20

[Mesa-dev] [PATCH v2 3/4] anv: generate entry points from vk.xml

2017-01-13 Thread Lionel Landwerlin
v2: rework entry point iteration (Jason) cleanup unused imports Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/Makefile.am| 15 ++-- src/intel/vulkan/anv_entrypoints_gen.py | 126 2 files changed, 71 insertions(+), 70 deletions(-) diff

[Mesa-dev] [PATCH v2 4/4] radv: generate entrypoints from vk.xml

2017-01-13 Thread Lionel Landwerlin
v2: rework entry point iteration (Jason) cleanup unused imports Signed-off-by: Lionel Landwerlin Cc: Bas Nieuwenhuizen Cc: Dave Airlie --- src/amd/vulkan/Makefile.am | 14 ++--- src/amd/vulkan/radv_entrypoints_gen.py | 106 - 2 files changed

Re: [Mesa-dev] [PATCH v2 3/4] anv: generate entry points from vk.xml

2017-01-13 Thread Lionel Landwerlin
On 13/01/17 14:31, Emil Velikov wrote: On 13 January 2017 at 12:00, Lionel Landwerlin wrote: v2: rework entry point iteration (Jason) cleanup unused imports Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/Makefile.am| 15 ++-- src/intel/vulkan

Re: [Mesa-dev] [PATCH] anv: move nir_lower_wpos_center to later

2017-01-13 Thread Lionel Landwerlin
Hi Samuel, Maybe you missed Ken's patch? : https://patchwork.freedesktop.org/series/17864/ Thanks, - Lionel On 13/01/17 13:48, Samuel Iglesias Gonsálvez wrote: We can have a crash produced because the tests is using the same shader module for all stages (setting a different entry point per s

Re: [Mesa-dev] [PATCH v2 3/4] anv: generate entry points from vk.xml

2017-01-13 Thread Lionel Landwerlin
On 13/01/17 15:22, Emil Velikov wrote: On 13 January 2017 at 15:02, Lionel Landwerlin wrote: On 13/01/17 14:31, Emil Velikov wrote: On 13 January 2017 at 12:00, Lionel Landwerlin wrote: v2: rework entry point iteration (Jason) cleanup unused imports Signed-off-by: Lionel Landwerlin

[Mesa-dev] [PATCH 3/3] anv: fix comment typo

2017-01-20 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_descriptor_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 2926e7a259..4367c0ebe0 100644 --- a/src/intel/vulkan

[Mesa-dev] [PATCH 2/3] spirv: fix warn string typo

2017-01-20 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/vtn_variables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 61a3701e43..a543a52dd0 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b

[Mesa-dev] [PATCH 1/3] blorp: remove unnecessary struct declaration

2017-01-20 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/blorp/blorp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h index ff60567fc4..e0687e9261 100644 --- a/src/intel/blorp/blorp.h +++ b/src/intel/blorp/blorp.h @@ -29,7 +29,6 @@ #include &quo

[Mesa-dev] [PATCH 1/2] spirv: don't assert with location decorations on non i/o variables

2017-01-20 Thread Lionel Landwerlin
Some applications might add location decoration to samplers. Rather than raising an error it seems it would make more sense to just discard these decorations. Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/vtn_variables.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 2/2] anv: don't require render target isl bit for depth/stencil surfaces

2017-01-20 Thread Lionel Landwerlin
which requires a depth texture with src/dst transfer & 4x multisampling. Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_image.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 9e5cebe188..8

[Mesa-dev] [PATCH 0/2] anv/spirv: Fixes for Unity3D

2017-01-20 Thread Lionel Landwerlin
Hi, While testing Unity3D demos, I've noticed a couple of issues with our driver. Cheers, Lionel Landwerlin (2): spirv: don't assert with location decorations on non i/o variables anv: don't require render target isl bit for depth/stencil surfaces src/compiler/spirv/vtn_

[Mesa-dev] [PATCH v2 2/2] anv: don't require render target isl bit for depth/stencil surfaces

2017-01-20 Thread Lionel Landwerlin
which requires a depth texture with src/dst transfer & 4x multisampling. v2: Simply aspect checking condition (Jason) Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_image.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/

Re: [Mesa-dev] [PATCH 1/2] spirv: don't assert with location decorations on non i/o variables

2017-01-20 Thread Lionel Landwerlin
On 20/01/17 20:40, Dave Airlie wrote: On 21 January 2017 at 03:08, Jason Ekstrand wrote: On Fri, Jan 20, 2017 at 8:45 AM, Lionel Landwerlin wrote: Some applications might add location decoration to samplers. Rather than raising an error it seems it would make more sense to just discard these

[Mesa-dev] [PATCH] anv: descriptors: don't update immutables samplers with anything but their immutable value

2017-01-21 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_descriptor_set.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 4367c0ebe0..a5e65afc48 100644

[Mesa-dev] [PATCH] anv: add KHR_get_physical_device_properties2 support

2017-01-23 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_device.c | 593 + src/intel/vulkan/anv_formats.c | 42 +++ 2 files changed, 398 insertions(+), 237 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index

Re: [Mesa-dev] [PATCH] anv: Implement VK_KHR_get_physical_device_properties2

2017-01-24 Thread Lionel Landwerlin
On 24/01/17 00:50, Jason Ekstrand wrote: On Mon, Jan 23, 2017 at 4:25 PM, Chad Versace mailto:chadvers...@chromium.org>> wrote: On Mon 23 Jan 2017, Jason Ekstrand wrote: > On Mon, Jan 23, 2017 at 3:31 PM, Chad Versace mailto:chadvers...@chromium.org>> wrote: > > On Mon 2

Re: [Mesa-dev] [PATCH] radv: add back ability to gen some entrypoints from optional headers (v2)

2017-01-24 Thread Lionel Landwerlin
h is not easily parsed by a regexp. That being said : Acked-by: Lionel Landwerlin On 24/01/17 01:17, Dave Airlie wrote: From: Dave Airlie bf8e1f9e7 radv: generate entrypoints from vk.xml ripped out the ability to add extra header files (and writing extra xml files is a bit messier). For some

Re: [Mesa-dev] [PATCH] spirv: acknowledge multisampled input attachments

2017-01-24 Thread Lionel Landwerlin
Looks good : Reviewed-by: Lionel Landwerlin On 24/01/17 10:00, Iago Toral Quiroga wrote: This avoids tons of crashes in dEQP-VK.pipeline.multisample_shader_builtin.sample_id.* dEQP-VK.pipeline.multisample_shader_builtin.sample_mask.* dEQP-VK.pipeline.multisample_shader_builtin.sample_position

Re: [Mesa-dev] [PATCH] spirv: handle gl_SampleMask

2017-01-24 Thread Lionel Landwerlin
Thanks, Reviewed-by: Lionel Landwerlin On 24/01/17 12:48, Iago Toral Quiroga wrote: SPIR-V maps both gl_SampleMask and gl_SampleMaskIn to the same builtin (SampleMask). The only way to tell which one we are dealing with is to check if it is an input or an output. Fixes: dEQP

Re: [Mesa-dev] [PATCH 0/6] anv: Implement VK_KHR_maintenance1

2017-01-24 Thread Lionel Landwerlin
ulkan/gen8_cmd_buffer.c| 4 ++-- 6 files changed, 30 insertions(+), 7 deletions(-) With Iago's comment on patch 1/6 addressed, this is : Reviewed-by: Lionel Landwerlin ___ mesa-dev mailing list mesa-dev@lists.freedesktop

Re: [Mesa-dev] [PATCH 1/6] anv: Set viewport extents correctly when height is negative

2017-01-24 Thread Lionel Landwerlin
;t we use YMinVP = -99 and YMaxVP = 0 instead of (-100, -1)? No, I think we still want -100, -1. In the case mentioned, the Y region, in floating-point, is [-100, 0]. However, it appears that, even though it's float, we're expected to provide max-1 in the max fields. T

Re: [Mesa-dev] [PATCH] vulkan/wsi: Lower the maximum image sizes

2017-01-25 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 25/01/17 01:16, Jason Ekstrand wrote: --- src/vulkan/wsi/wsi_common_wayland.c | 3 ++- src/vulkan/wsi/wsi_common_x11.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi

Re: [Mesa-dev] [PATCH 1/2] vulkan/wsi/wayland: Handle VK_INCOMPLETE for GetFormats

2017-01-25 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 25/01/17 00:44, Jason Ekstrand wrote: --- src/vulkan/wsi/wsi_common_wayland.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 687ac9c

Re: [Mesa-dev] [PATCH 2/2] vulkan/wsi/wayland: Handle VK_INCOMPLETE for GetPresentModes

2017-01-25 Thread Lionel Landwerlin
Reviewed-by: Lionel Landwerlin On 25/01/17 00:44, Jason Ekstrand wrote: --- src/vulkan/wsi/wsi_common_wayland.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index d745413..04cea97

[Mesa-dev] [PATCH 2/2] spirv: bump headers to SPIRV 1.1

2017-01-25 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/GLSL.std.450.h | 12 -- src/compiler/spirv/spirv.h | 77 +++--- src/compiler/spirv/spirv_info.c| 6 +++ src/compiler/spirv/spirv_to_nir.c | 12 ++ src/compiler/spirv/vtn_variables.c

[Mesa-dev] [PATCH 0/2] Spirv: update headers to 1.1

2017-01-25 Thread Lionel Landwerlin
well as a few switch statements to avoid warnings at compile time. Cheers, Lionel Landwerlin (2): spirv: fix typos spirv: bump headers to SPIRV 1.1 src/compiler/spirv/GLSL.std.450.h | 12 -- src/compiler/spirv/spirv.h | 77 +++--- src/compiler

[Mesa-dev] [PATCH 1/2] spirv: fix typos

2017-01-25 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/spirv_to_nir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index aecda17271..968502c5fd 100644 --- a/src/compiler/spirv/spirv_to_nir.c

Re: [Mesa-dev] [PATCH 2/2] spirv: bump headers to SPIRV 1.1

2017-01-25 Thread Lionel Landwerlin
, 2017, at 04:39, Lionel Landwerlin wrote: Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/GLSL.std.450.h | 12 -- src/compiler/spirv/spirv.h | 77 +++--- src/compiler/spirv/spirv_info.c| 6 +++ src/compiler/spirv/spirv_to_nir.c | 12

Re: [Mesa-dev] [PATCH 2/2] spirv: bump headers to SPIRV 1.1

2017-01-25 Thread Lionel Landwerlin
On 25/01/17 13:13, Bas Nieuwenhuizen wrote: On Wed, Jan 25, 2017, at 05:06, Lionel Landwerlin wrote: Just to confirm, are you fine with the header update triggering warnings fixed by the following commit? Can't you update the switches before updating the header? That would avoid any war

[Mesa-dev] [PATCH 2/3] spirv: add default handler for new enums

2017-01-25 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/spirv_to_nir.c | 12 src/compiler/spirv/vtn_variables.c | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 968502c5fd..6f18af2018 100644 --- a

[Mesa-dev] [PATCH 1/3] spirv: fix typos

2017-01-25 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/spirv_to_nir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index aecda17271..968502c5fd 100644 --- a/src/compiler/spirv/spirv_to_nir.c

[Mesa-dev] [PATCH v2 3/3] spirv: bump headers to SPIRV 1.1

2017-01-25 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/GLSL.std.450.h | 12 -- src/compiler/spirv/spirv.h| 77 --- src/compiler/spirv/spirv_info.c | 6 +++ 3 files changed, 86 insertions(+), 9 deletions(-) diff --git a/src/compiler/spirv

[Mesa-dev] [PATCH] anv: set command buffer to NULL when allocations fail

2017-01-25 Thread Lionel Landwerlin
f the pCommandBuffers array to VK_NULL_HANDLE and return the error." Fixes: dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_primary dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_secondary Signed-off-by: Lionel Landwerlin --- src/in

[Mesa-dev] [PATCH 1/2] spirv: add SPV_KHR_shader_draw_parameters support

2017-01-25 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/compiler/spirv/nir_spirv.h | 1 + src/compiler/spirv/spirv_to_nir.c | 4 src/compiler/spirv/vtn_variables.c | 12 3 files changed, 17 insertions(+) diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h

<    4   5   6   7   8   9   10   11   12   13   >