Re: [Mesa-dev] [PATCH 6/6] i965: update gl_PrimitiveIDIn to be a system variable

2016-11-10 Thread Jason Ekstrand
On Thu, Nov 10, 2016 at 10:43 PM, Jason Ekstrand wrote: > I just sent out a back-portable patch that adds support for primitive id > as a system value without breaking anything (I think). One option if you > wanted to avoid squashing would be to do that, then switch to

Re: [Mesa-dev] [PATCH 6/6] i965: update gl_PrimitiveIDIn to be a system variable

2016-11-10 Thread Jason Ekstrand
I just sent out a back-portable patch that adds support for primitive id as a system value without breaking anything (I think). One option if you wanted to avoid squashing would be to do that, then switch to gather_info and then this. I don't care much either way. I just need something that we

[Mesa-dev] [PATCH] [for stable only] i965/gs: Allow primitive id to be a system value

2016-11-10 Thread Jason Ekstrand
This allows for gl_PrimitiveId to come in as a system value rather than as an input. This is the way it comes in from SPIR-V. We keeps the input path working for now so we don't break GL Cc: "13.0" --- src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 3 ++-

Re: [Mesa-dev] [PATCH 6/6] i965: update gl_PrimitiveIDIn to be a system variable

2016-11-10 Thread Kenneth Graunke
On Thursday, October 27, 2016 1:00:48 PM PST Timothy Arceri wrote: > To be squashed with previous patch > --- > src/mesa/drivers/dri/i965/brw_shader.cpp | 3 +-- > src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 8 ++-- > src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp| 5

[Mesa-dev] [PATCH 2/4] anv: Handle null in all destructors

2016-11-10 Thread Jason Ekstrand
This fixes a bunch of new CTS tests which look for exactly this. Even in the cases where we just call vk_free to free a CPU data structure, we still handle NULL explicitly. This way we're less likely to forget to handle NULL later should we actually do something less trivial. Cc: "13.0"

[Mesa-dev] [PATCH 4/4] nir/spirv: Make gl_PrimitiveId a system value

2016-11-10 Thread Jason Ekstrand
Before, we were treating it as an output which is just completely bogus. We could go for an input but a system value makes more sense. Cc: "13.0" --- src/compiler/spirv/vtn_variables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 1/4] util/vk_alloc: Ensure NULL is handled correctly in vk_free

2016-11-10 Thread Jason Ekstrand
--- src/util/vk_alloc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/vk_alloc.h b/src/util/vk_alloc.h index a8e21ca..7ae5c9d 100644 --- a/src/util/vk_alloc.h +++ b/src/util/vk_alloc.h @@ -46,6 +46,9 @@ vk_realloc(const VkAllocationCallbacks *alloc, static inline void

[Mesa-dev] [PATCH 3/4] anv/fence: Handle ANV_FENCE_CREATE_SIGNALED_BIT

2016-11-10 Thread Jason Ekstrand
Cc: "13.0" --- src/intel/vulkan/anv_device.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 6bd87ef..3f67919 100644 --- a/src/intel/vulkan/anv_device.c +++

Re: [Mesa-dev] [PATCH 5/6] i965: use nir_shader_gather_info() over do_set_program_inouts()

2016-11-10 Thread Kenneth Graunke
On Thursday, October 27, 2016 1:00:47 PM PST Timothy Arceri wrote: > This takes us one step closer to being able to drop the GLSL IR > optimisation passes during linking in favour of the NIR passes. > --- > src/mesa/drivers/dri/i965/brw_link.cpp | 2 -- > src/mesa/drivers/dri/i965/brw_program.c

Re: [Mesa-dev] [PATCH 1/3] i965: rename brw_state_cache.c -> brw_program_cache.c

2016-11-10 Thread Kenneth Graunke
On Friday, November 11, 2016 3:12:57 PM PST Timothy Arceri wrote: > --- > src/mesa/drivers/dri/i965/Makefile.sources| 2 +- > src/mesa/drivers/dri/i965/brw_context.h | 2 +- > src/mesa/drivers/dri/i965/brw_program_cache.c | 446 > ++ >

[Mesa-dev] [Bug 97230] MATLAB hangs if DRI3 enabled with intel driver

2016-11-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97230 --- Comment #10 from f.ma...@gmail.com --- I should add that, as mentioned elsewhere, setting LIBGL_DRI3_DISABLE=1 in the environment before starting MATLAB avoids all problems. -- You are receiving this mail because: You are the assignee for

[Mesa-dev] [Bug 97230] MATLAB hangs if DRI3 enabled with intel driver

2016-11-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97230 --- Comment #9 from f.ma...@gmail.com --- I've also had this problem. I'm running Arch Linux with xf86-video-intel 1:2.99.917+725+gbf7316a-1, and MATLAB R2016a. Output of glxinfo -B: name of display: :0 display: :0 screen: 0 direct rendering:

[Mesa-dev] [Bug 97230] MATLAB hangs if DRI3 enabled with intel driver

2016-11-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97230 --- Comment #8 from f.ma...@gmail.com --- Created attachment 127912 --> https://bugs.freedesktop.org/attachment.cgi?id=127912=edit GDB full trace when MATLAB has hanged -- You are receiving this mail because: You are the QA Contact for the

Re: [Mesa-dev] [PATCH] vulkan: import latest public vulkan headers + and fix drivers.

2016-11-10 Thread Jordan Justen
On 2016-11-10 20:34:47, Dave Airlie wrote: > On 11 November 2016 at 13:26, Jordan Justen wrote: > > On 2016-11-10 17:45:10, Dave Airlie wrote: > >> From: Dave Airlie > >> > >> I just noticed the new vulkan headers changed a prototype, > >> so I've

Re: [Mesa-dev] [PATCH] anv: fix enumeration of properties

2016-11-10 Thread Jason Ekstrand
On Thu, Oct 6, 2016 at 6:12 AM, Emil Velikov wrote: > From: Emil Velikov > > Driver should enumerate only up-to min2(num_available, num_requested) > properties and return VK_INCOMPLETE if the # of requested props is > smaller than the ones

Re: [Mesa-dev] [PATCH] vulkan: import latest public vulkan headers + and fix drivers.

2016-11-10 Thread Dave Airlie
On 11 November 2016 at 13:26, Jordan Justen wrote: > On 2016-11-10 17:45:10, Dave Airlie wrote: >> From: Dave Airlie >> >> I just noticed the new vulkan headers changed a prototype, >> so I've decided to import them and fix the drivers to use the >>

[Mesa-dev] [PATCH 3/3] i965: remove remaining tabs in brw_program_cache.c

2016-11-10 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_program_cache.c | 58 +-- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c index 15dce72..3947904a 100644 ---

[Mesa-dev] [PATCH 2/3] i965: rename brw_state_cache_check_size() to brw_program_cache_check_size()

2016-11-10 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_compute.c | 2 +- src/mesa/drivers/dri/i965/brw_draw.c | 2 +- src/mesa/drivers/dri/i965/brw_program_cache.c | 2 +- src/mesa/drivers/dri/i965/brw_state.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 1/3] i965: rename brw_state_cache.c -> brw_program_cache.c

2016-11-10 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/Makefile.sources| 2 +- src/mesa/drivers/dri/i965/brw_context.h | 2 +- src/mesa/drivers/dri/i965/brw_program_cache.c | 446 ++ src/mesa/drivers/dri/i965/brw_state.h | 2 +- src/mesa/drivers/dri/i965/brw_state_cache.c

Re: [Mesa-dev] EGL/android: pbuffer implementation.

2016-11-10 Thread Emil Velikov
Hi Randy, On 11 November 2016 at 01:22, Xu, Randy wrote: > Hi, Emil > > I may misunderstand your meaning, you want to Zhiquan to refine the code and > avoid duplicating those identical codes, right? > In this case, I agree with you fully > There two distinct things - try to

Re: [Mesa-dev] Rework use of gl program structures

2016-11-10 Thread Timothy Arceri
Series is available in the free_gl_linked_shader6 branch of: https://github.com/tarceri/Mesa.git On Fri, 2016-11-11 at 11:45 +1100, Timothy Arceri wrote: > I started out with a goal of freeing _LinkedShaders after linking as > this > would have allowed a bunch of code simplification and also

Re: [Mesa-dev] [PATCH] vulkan: import latest public vulkan headers + and fix drivers.

2016-11-10 Thread Jordan Justen
On 2016-11-10 17:45:10, Dave Airlie wrote: > From: Dave Airlie > > I just noticed the new vulkan headers changed a prototype, > so I've decided to import them and fix the drivers to use the > new API. > The new header is Apache licensed. I know that the FSF says Apache is

Re: [Mesa-dev] [PATCH] vulkan: import latest public vulkan headers + and fix drivers.

2016-11-10 Thread Jason Ekstrand
Ack ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] vulkan: import latest public vulkan headers + and fix drivers.

2016-11-10 Thread Dave Airlie
From: Dave Airlie I just noticed the new vulkan headers changed a prototype, so I've decided to import them and fix the drivers to use the new API. Signed-off-by: Dave Airlie --- include/vulkan/vk_platform.h | 39 ++-- include/vulkan/vulkan.h

Re: [Mesa-dev] Mesa 12.0.4 release candidate

2016-11-10 Thread Marek Olšák
On Wed, Nov 9, 2016 at 1:29 PM, Marek Olšák wrote: >> Marek Olšák (3) >> e24dc43 radeonsi: set VGT_GS_ONCHIP_CNTL on CIK and later >> >> * Reason: Depends on commit 9a71bf8 ("radeonsi: enable CU0 in each SE for >> LS-HS >> execution") >> Marek: Please let me know if the

Re: [Mesa-dev] EGL/android: pbuffer implementation.

2016-11-10 Thread Xu, Randy
Hi, Emil The commit 63c5d5c6c46c8472ee7a8241a0f80f13d79cb8cd implements the pbuffer for surfaceless platform, while Zhiquan's patch is for Android platform. They are similar indeed, but we need both. This patch can solve 300+ dEQP failure on Android platform due to pbuffer crash. Thanks,

Re: [Mesa-dev] EGL/android: pbuffer implementation.

2016-11-10 Thread Xu, Randy
Hi, Emil I may misunderstand your meaning, you want to Zhiquan to refine the code and avoid duplicating those identical codes, right? In this case, I agree with you fully Thanks, Randy -Original Message- From: Xu, Randy Sent: Friday, November 11, 2016 9:01 AM To: Emil Velikov

[Mesa-dev] [PATCH 1/2] st/va: force to submit two consecutive single jobs

2016-11-10 Thread boyuan.zhang
From: Boyuan Zhang When using dual instance and rate control, driver needs to submit jobs either in dual submissions or 2 consecutive single submissions to keep the pattern constant for rate control Signed-off-by: Boyuan Zhang ---

[Mesa-dev] [ANNOUNCE] mesa 12.0.4

2016-11-10 Thread Emil Velikov
Mesa 12.0.4 is now available. The release contains multiple fixes amongst which: The nouveau vdpau driver performance has been restored. The wayland-egl module no longer crashes if the user calls eglDestroySurface and wl_egl_window_destroy in the "wrong" order. libEGL correctly advertises the

[Mesa-dev] [PATCH 2/2] anv/descriptor_set: Put the whole state in the state free list

2016-11-10 Thread Jason Ekstrand
We're not really saving much by just putting the offset in there. --- src/intel/vulkan/anv_descriptor_set.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 52f2df6..97108fa 100644 ---

[Mesa-dev] [PATCH 1/2] anv/descriptor_set: Write the state offset in the surface state free list.

2016-11-10 Thread Jason Ekstrand
When Kristian reworked descriptor set allocation, somehow he forgot to actually store the offset in the free list. Somehow, this completely missed CTS testing until now... This fixes all 2744 of the new 'dEQP-VK.texture.filtering.* tests in the latest CTS. Cc: "12.0 13.0"

[Mesa-dev] [PATCH 67/70] mesa: don't always set _NEW_PROGRAM when linking

2016-11-10 Thread Timothy Arceri
We only need to set it when linking was successful and the program being linked is currently active. The programs_in_use mask is just used as a flag for now but in a following patch we will use it to update the CurrentProgram array. --- src/mesa/main/shaderapi.c | 22 +- 1

[Mesa-dev] [PATCH 69/70] mesa/meta: rewrite _mesa_shader_program_use() and _mesa_program_use()

2016-11-10 Thread Timothy Arceri
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 stage. This patch is split out to make review easier but will be squashed into mesa: use gl_program for CurrentProgram rather

[Mesa-dev] [PATCH 70/70] mesa: update active relinked program

2016-11-10 Thread Timothy Arceri
This likely fixes a subroutine bug were _mesa_shader_program_init_subroutine_defaults() would never have been called for the relinked program as we previously just set _NEW_PROGRAM as dirty and never called the _mesa_use* functions. We also switch to using gl_program for the CurrentProgram array

[Mesa-dev] [PATCH 68/70] mesa: use gl_program for CurrentProgram rather than gl_shader_program

2016-11-10 Thread Timothy Arceri
This makes much more sense and should be more performant in some critical paths such as SSO validation which is called at draw time. Previously the CurrentProgram array could have contained multiple pointers to the same struct which was confusing and we would often need to fish out the

[Mesa-dev] [PATCH 66/70] mesa/glsl: move ProgramResourceList to gl_shader_program_data

2016-11-10 Thread Timothy Arceri
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/compiler/glsl/linker.cpp | 20 +-- src/mesa/main/mtypes.h |

[Mesa-dev] [PATCH 62/70] st/mesa: pass gl_program to st_bind_images()

2016-11-10 Thread Timothy Arceri
We no longer need anything from gl_linked_shader. --- src/mesa/state_tracker/st_atom_image.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c index

[Mesa-dev] [PATCH 65/70] st/mesa: get Version from gl_program rather than gl_shader_program

2016-11-10 Thread Timothy Arceri
--- src/mesa/state_tracker/st_atom_texture.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 5fe042b..58e753d 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++

[Mesa-dev] [PATCH 61/70] st/mesa: stop passing gl_linked_shader to set_affected_state_flags()

2016-11-10 Thread Timothy Arceri
We now get everything we need from the gl_program param. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 59de383..44c4960

[Mesa-dev] [PATCH 63/70] st/mesa: pass gl_program to st_bind_ubos()

2016-11-10 Thread Timothy Arceri
We no longer need anything from gl_linked_shader. --- src/mesa/state_tracker/st_atom_constbuf.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index

[Mesa-dev] [PATCH 64/70] st/mesa/glsl: move Version to gl_shader_program_data

2016-11-10 Thread Timothy Arceri
This is mostly just used during linking however the st uses it when updating textures. In order to store gl_program in the CurrentProgram array rather than gl_shader_program we need to move this field to the shared gl_shader_program_data struct. --- src/compiler/glsl/link_interface_blocks.cpp |

[Mesa-dev] [PATCH 60/70] st/mesa/glsl: set num_images directly in shader_info

2016-11-10 Thread Timothy Arceri
This change also removes the now duplicate NumImages field. --- src/compiler/glsl/link_uniforms.cpp| 2 +- src/compiler/glsl/linker.cpp | 7 --- src/mesa/main/mtypes.h | 7 --- src/mesa/main/shaderapi.c | 1 -

[Mesa-dev] [PATCH 58/70] st/mesa/glsl: move SamplerTargets to gl_program

2016-11-10 Thread Timothy Arceri
This will help allow us to simplify the handling of samplers by storing them in a single location rather than duplicating them in both gl_linked_shader and gl_program. --- src/compiler/glsl/link_uniforms.cpp | 7 --- src/mesa/main/mtypes.h| 14 --

[Mesa-dev] [PATCH 55/70] mesa: simplify sampler setting code

2016-11-10 Thread Timothy Arceri
There is no need to loop over active samplers the code above this would have already exited if the sampler was inactive, or errored if the count was larger than the uniforms array size. --- src/mesa/main/uniform_query.cpp | 33 +++-- 1 file changed, 11 insertions(+),

[Mesa-dev] [PATCH 54/70] mesa/glsl: set num_textures per stage directly in shader_info

2016-11-10 Thread Timothy Arceri
--- src/compiler/glsl/glsl_to_nir.cpp | 1 - src/compiler/glsl/link_uniforms.cpp| 2 +- src/compiler/glsl/linker.cpp | 3 ++- src/mesa/main/mtypes.h | 1 - src/mesa/main/uniform_query.cpp| 2 +-

[Mesa-dev] [PATCH 59/70] st/mesa: pass gl_program to st_bind_ssbos()

2016-11-10 Thread Timothy Arceri
We no longer need to pass gl_shader_program. --- src/mesa/state_tracker/st_atom_storagebuf.c | 30 ++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c b/src/mesa/state_tracker/st_atom_storagebuf.c index

[Mesa-dev] [PATCH 57/70] st/mesa/glsl: set SamplersUsed directly in gl_program

2016-11-10 Thread Timothy Arceri
--- src/compiler/glsl/link_uniforms.cpp | 3 ++- src/mesa/drivers/dri/i965/brw_link.cpp| 1 - src/mesa/main/mtypes.h| 3 +-- src/mesa/program/ir_to_mesa.cpp | 1 - src/mesa/state_tracker/st_glsl_to_nir.cpp | 1 - 5 files changed, 3 insertions(+), 6

[Mesa-dev] [PATCH 56/70] mesa/glsl: set sampler units directly in gl_program

2016-11-10 Thread Timothy Arceri
Now that we create gl_program earlier there is no need to mess about copying things to gl_linked_shader then to gl_program. --- src/compiler/glsl/link_uniform_initializers.cpp | 5 +++-- src/mesa/main/mtypes.h | 8 src/mesa/main/uniform_query.cpp

[Mesa-dev] [PATCH 49/70] st/mesa/glsl: add new is_arb_asm flag in gl_program

2016-11-10 Thread Timothy Arceri
Set the flag via the _mesa_init_gl_program() and NewProgram() helpers. In i965 we currently check for the existance of gl_shader_program to decide if this is an ARB assembly style program or not. Adding a flag makes the code clearer and will help removes a dependency on gl_shader_program in the

[Mesa-dev] [PATCH 48/70] i965: pass gl_program directly to brw_compile_tes()

2016-11-10 Thread Timothy Arceri
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 | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git

[Mesa-dev] [PATCH 50/70] i965: make use of new is_arb_asm flag

2016-11-10 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_vs.c | 15 +++ src/mesa/drivers/dri/i965/brw_wm.c | 13 ++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 3612385..9d3b685 100644 ---

[Mesa-dev] [PATCH 53/70] mesa: make _CurrentFragmentProgram a gl_program struct pointer

2016-11-10 Thread Timothy Arceri
Making this point to a gl_program struct rather than a gl_shader_program struct will allow use to later also make the CurrentProgram array hold gl_program structs which in turn will allow for code simpilifcation. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 ++--

[Mesa-dev] [PATCH 52/70] i965: stop passing gl_shader_program to the precompile and codegen functions

2016-11-10 Thread Timothy Arceri
We no longer need it. While we are at it we mark the vs, gs, and wm codegen functions as static. --- src/mesa/drivers/dri/i965/brw_cs.c | 12 +++- src/mesa/drivers/dri/i965/brw_gs.c | 14 -- src/mesa/drivers/dri/i965/brw_gs.h | 6 --

[Mesa-dev] [PATCH 51/70] mesa/glsl: remove hack to reset sampler units to zero

2016-11-10 Thread Timothy Arceri
Now that we have the is_arb_asm flag we can just skip the initialisation. --- src/compiler/glsl/link_uniforms.cpp | 11 --- src/mesa/program/program.c | 21 - 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/compiler/glsl/link_uniforms.cpp

[Mesa-dev] [PATCH 47/70] i965: stop passing gl_shader_program to brw_compile_gs() and gen6_gs_visitor()

2016-11-10 Thread Timothy Arceri
Instead we caan just use gl_program. --- src/mesa/drivers/dri/i965/brw_compiler.h | 2 +- src/mesa/drivers/dri/i965/brw_gs.c| 2 +- src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 7 +++ src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp | 2 +-

[Mesa-dev] [PATCH 44/70] i965: stop passing gl_shader_program to brw_nir_setup_glsl_uniforms()

2016-11-10 Thread Timothy Arceri
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/drivers/dri/i965/brw_nir.h| 1 -

[Mesa-dev] [PATCH 45/70] i965: eliminate gen6_xfb_enabled field in brw_gs_prog_data

2016-11-10 Thread Timothy Arceri
We can just get this information from shader_info instead. Note that passing gen6_gs_visitor() gl_program via _LinkedShaders will go away in a later patch. --- src/mesa/drivers/dri/i965/brw_compiler.h | 5 - src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 7 +--

[Mesa-dev] [PATCH 46/70] i965: get InfoLog and LinkStatus via the shader program data pointer in gl_program

2016-11-10 Thread Timothy Arceri
This removes another dependency on gl_shader_program in the codegen functions. --- src/mesa/drivers/dri/i965/brw_gs.c | 2 +- src/mesa/drivers/dri/i965/brw_tcs.c | 6 ++ src/mesa/drivers/dri/i965/brw_tes.c | 6 ++ src/mesa/drivers/dri/i965/brw_vs.c | 4 ++--

[Mesa-dev] [PATCH 38/70] st/mesa/glsl/i965: set num_ubos directly in shader_info

2016-11-10 Thread Timothy Arceri
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 ++-- src/compiler/glsl/linker.cpp | 14 +++---

[Mesa-dev] [PATCH 42/70] i965: stop passing gl_shader_program to brw_assign_common_binding_table_offsets()

2016-11-10 Thread Timothy Arceri
We now get eventhing we need directly from gl_program so there is no need for this. --- src/mesa/drivers/dri/i965/brw_cs.c | 5 ++--- src/mesa/drivers/dri/i965/brw_gs.c | 6 ++ src/mesa/drivers/dri/i965/brw_shader.cpp | 5 - src/mesa/drivers/dri/i965/brw_shader.h | 1 -

[Mesa-dev] [PATCH 43/70] i965: pass gl_program to brw_upload_ubo_surfaces()

2016-11-10 Thread Timothy Arceri
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/brw_tcs_surface_state.c | 4 ++-- src/mesa/drivers/dri/i965/brw_tes_surface_state.c | 4 ++--

[Mesa-dev] [PATCH 40/70] st/mesa/glsl/i965: set num_ssbos directly in shader_info

2016-11-10 Thread Timothy Arceri
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 | 2 +- src/compiler/glsl/linker.cpp | 14

[Mesa-dev] [PATCH 41/70] st/mesa/glsl/i965: move ShaderStorageBlocks to gl_program

2016-11-10 Thread Timothy Arceri
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 about the current program. In i965 we could be trying to recompile a shader

[Mesa-dev] [PATCH 39/70] st/mesa/glsl/i965: move per stage UniformBlocks to gl_program

2016-11-10 Thread Timothy Arceri
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/linker.cpp | 8

[Mesa-dev] [PATCH 33/70] glsl/mesa: add reference to gl_shader_program_data from gl_program

2016-11-10 Thread Timothy Arceri
We also add the stubs for the standalone compiler in this change. By adding a reference here we can now refactor some code to use gl_program where we were previously awkwardly using gl_shader_program. --- src/compiler/glsl/linker.cpp | 1 +

[Mesa-dev] [PATCH 36/70] i965: get InfoLog and LinkStatus via the pointer in gl_program

2016-11-10 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_cs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c index 7084776..c15cbc8 100644 --- a/src/mesa/drivers/dri/i965/brw_cs.c +++

[Mesa-dev] [PATCH 34/70] i965: stop depending on gl_shader_program for brw_compute_vue_map() params

2016-11-10 Thread Timothy Arceri
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/brw_gs.c | 2 +- src/mesa/drivers/dri/i965/brw_vs.c | 10 +- 2 files

[Mesa-dev] [PATCH 30/70] mesa/glsl/i965: remove Driver.NewShader()

2016-11-10 Thread Timothy Arceri
After removing brw_shader in the previous commit this is no longer needed. --- src/compiler/glsl/linker.cpp | 3 ++- src/compiler/glsl/standalone.cpp | 2 -- src/compiler/glsl/standalone_scaffolding.cpp | 13 - src/compiler/glsl/standalone_scaffolding.h

[Mesa-dev] [PATCH 32/70] i965: pass gl_program to the brw_*_debug_recompile() functions

2016-11-10 Thread Timothy Arceri
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 functions. This change reduces the codegen functions dependency on gl_shader_program. ---

[Mesa-dev] [PATCH 37/70] st/mesa/glsl/i965: move ImageUnits and ImageAccess fields to gl_program

2016-11-10 Thread Timothy Arceri
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 about the current program. In i965 we could be trying to recompile a shader

[Mesa-dev] [PATCH 35/70] i965: get shared_size from shader_info rather than gl_shader_program

2016-11-10 Thread Timothy Arceri
--- 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 3bd6ec4..7084776 100644 --- a/src/mesa/drivers/dri/i965/brw_cs.c +++ b/src/mesa/drivers/dri/i965/brw_cs.c

[Mesa-dev] [PATCH 31/70] i965: update brw_get_shader_time_index() not to take gl_shader_program

2016-11-10 Thread Timothy Arceri
This removes another dependency on gl_shader_program in the codegen functions which will help allow us to use gl_program in the CurrentProgram array rather than gl_shader_program. --- src/mesa/drivers/dri/i965/brw_context.h | 4 ++-- src/mesa/drivers/dri/i965/brw_cs.c | 2 +-

[Mesa-dev] [PATCH 29/70] i965: move compiled_once flag to brw_program

2016-11-10 Thread Timothy Arceri
This allows us to delete brw_shader and removes the last use of gl_linked_shader in the codegen paths. --- src/mesa/drivers/dri/i965/brw_context.h | 8 ++-- src/mesa/drivers/dri/i965/brw_cs.c | 10 +++--- src/mesa/drivers/dri/i965/brw_gs.c | 8 +++-

[Mesa-dev] [PATCH 27/70] mesa: store gl_program in gl_transform_feedback_object rather than gl_shader_program

2016-11-10 Thread Timothy Arceri
This will allow us to make the CurrentProgram array store gl_program which allows us to do a bunch of simplifications. --- src/mesa/drivers/dri/i965/gen6_sol.c | 3 +-- src/mesa/drivers/dri/i965/gen7_sol_state.c | 6 +++--- src/mesa/main/mtypes.h | 4 ++--

[Mesa-dev] [PATCH 26/70] mesa/glsl: move LinkedTransformFeedback from gl_shader_program to gl_program

2016-11-10 Thread Timothy Arceri
This will help allow us to store gl_program in the CurrentProgram array rather than gl_shader_program which will allow a bunch of simplifications. Note that we make LinkedTransformFeedback a pointer so we don't waste memory creating a struct for each stage. We also store a pointer to the

[Mesa-dev] [PATCH 24/70] mesa: move _Used to gl_program

2016-11-10 Thread Timothy Arceri
We no longer need to initialise it because gl_program is never reused. --- src/compiler/glsl/linker.cpp | 1 - src/mesa/main/api_validate.c | 8 src/mesa/main/mtypes.h | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/linker.cpp

[Mesa-dev] [PATCH 23/70] mesa/compiler: add local_size_variable to shader_info

2016-11-10 Thread Timothy Arceri
This will be used in api_validate.c in a following patch when we switch to using gl_program pointers for the pipelines CurrentProgram array. --- src/compiler/shader_info.h | 2 ++ src/mesa/main/shaderapi.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/compiler/shader_info.h

[Mesa-dev] [PATCH 25/70] i965: get LinkedTransformFeedback from gl_transform_feedback_object

2016-11-10 Thread Timothy Arceri
We have already set the gl_shader_program pointer to the correct shader program in _mesa_BeginTransformFeedback() so use it. This is more consistent with how we do it for gen7. --- src/mesa/drivers/dri/i965/gen6_sol.c | 27 +-- 1 file changed, 9 insertions(+), 18

[Mesa-dev] [PATCH 28/70] mesa/glsl: move BlendSupport bitfield to gl_program

2016-11-10 Thread Timothy Arceri
This will let us to make _CurrentFragmentProgram a gl_program pointer allowing for simpilifications to be made. We also need to add a field to gl_shader to hold it during parsing. In gl_program we put it inside a union in anticipation of moving more fields here that can be only fs or vertex

[Mesa-dev] [PATCH 21/70] glsl/mesa: set separate_shader directly in shader_info

2016-11-10 Thread Timothy Arceri
--- src/compiler/glsl/glsl_to_nir.cpp | 1 - src/mesa/main/shaderapi.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index e1b8cea..60451e4 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++

[Mesa-dev] [PATCH 22/70] mesa: pass gl_program to _mesa_append_uniforms_to_file()

2016-11-10 Thread Timothy Arceri
This now contains everything we need. --- src/mesa/main/api_validate.c | 2 +- src/mesa/program/prog_print.c | 5 ++--- src/mesa/program/prog_print.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index

[Mesa-dev] [PATCH 20/70] mesa/glsl: move subroutine metadata to gl_program

2016-11-10 Thread Timothy Arceri
This will allow us to store gl_program rather than gl_shader_program as the current program perstage which allows us to simplify code that makes use of the CurrentProgram list. --- src/compiler/glsl/link_uniforms.cpp | 22 src/compiler/glsl/linker.cpp| 98

[Mesa-dev] [PATCH 15/70] st/mesa/glsl/nir/i965: make use of new gl_shader_program_data in gl_shader_program

2016-11-10 Thread Timothy Arceri
--- src/compiler/glsl/link_atomics.cpp | 20 ++-- src/compiler/glsl/link_uniform_initializers.cpp | 9 +- src/compiler/glsl/link_uniforms.cpp | 100 ++-- src/compiler/glsl/linker.cpp| 116

[Mesa-dev] [PATCH 17/70] mesa: optimise interleaved sso validation

2016-11-10 Thread Timothy Arceri
Now that we have a linked_stages bitfield we can use this to check if the program is used at a later stage. This change is also required to be able to use gl_program rather than gl_shader_program in the CurrentProgram array. --- src/mesa/main/pipelineobj.c | 17 +++-- 1 file changed,

[Mesa-dev] [PATCH 19/70] mesa/compiler: add stage to shader_info

2016-11-10 Thread Timothy Arceri
This will allow us to simplify the current program logic for SSO. Also since we aim to detach shader_info from nir_shader this will come in handy avoiding passing nir_shader around just to keep track of the stage we are dealing with. --- src/compiler/shader_info.h | 3 +++

[Mesa-dev] [PATCH 14/70] mesa: create new gl_shader_program_data struct

2016-11-10 Thread Timothy Arceri
This will be used to share data between gl_program and gl_shader_program allowing for greater code simplification as we can remove a number of awkward uses of gl_shader_program. --- src/mesa/main/mtypes.h| 25 + src/mesa/main/shaderobj.c | 41

[Mesa-dev] [PATCH 13/70] glsl: tidy up entries temporary

2016-11-10 Thread Timothy Arceri
Here we just move initialisation of entries to where it is needed i.e. outside the loop and after the continue checks. --- src/compiler/glsl/link_uniforms.cpp | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/link_uniforms.cpp

[Mesa-dev] [PATCH 18/70] glsl: use linked_shaders bitmask to iterate stages for subroutine fields

2016-11-10 Thread Timothy Arceri
This should be faster than looping over every stage and null checking, but will also make the code a bit cleaner when we switch to getting more fields from gl_program rather than from gl_linked_shader as we can just copy the pointer and not need to worry about null checking then copying. ---

[Mesa-dev] [PATCH 16/70] mesa/glsl: add bitmask to track stages a program was linked against

2016-11-10 Thread Timothy Arceri
This will be used to enable us to store the current gl_program rather than gl_shader_program in the gl_pipline_object allowing us to simplify handing of validation. Also we should not be depending on _LinkedShader for this information as it may contain shaders from a failed linking attempt rather

[Mesa-dev] [PATCH 12/70] glsl/i965: move per stage AtomicBuffers list to gl_program

2016-11-10 Thread Timothy Arceri
--- src/compiler/glsl/link_atomics.cpp| 8 src/mesa/drivers/dri/i965/brw_context.h | 1 - src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 8 ++-- src/mesa/drivers/dri/i965/brw_tcs_surface_state.c | 9 +++--

[Mesa-dev] Rework use of gl program structures

2016-11-10 Thread Timothy Arceri
I started out with a goal of freeing _LinkedShaders after linking as this would have allowed a bunch of code simplification and also reduced the possibility of subtle bugs in i965 where a program that is currently active is relinked but fails and then we recompile a variant of the still active

[Mesa-dev] [PATCH 03/70] mesa/glsl: copy num_images to gl_program

2016-11-10 Thread Timothy Arceri
We should be able to free gl_linked_shader after linking in order to do so we need to switch to getting values from gl_program instead. --- src/compiler/glsl/glsl_to_nir.cpp | 1 - src/mesa/main/shaderapi.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 10/70] glsl: stub out _mesa_reference_program() in standalone compiler

2016-11-10 Thread Timothy Arceri
The follow patch will call this directly from the linker, the shader cache will also start calling these from the compiler. --- src/compiler/glsl/standalone_scaffolding.cpp | 8 src/compiler/glsl/standalone_scaffolding.h | 4 2 files changed, 12 insertions(+) diff --git

[Mesa-dev] [PATCH 11/70] glsl: create gl_program at the start of linking rather than the end

2016-11-10 Thread Timothy Arceri
This will allow us to directly store metadata we want to retain in gl_program this metadata is currently stored in gl_linked_shader and will be lost if relinking fails even though the program will remain in use and is still valid according to the spec. "If a program object that is active for any

[Mesa-dev] [PATCH 09/70] st/mesa/r200/i915/i965: move ARB program fields into a union

2016-11-10 Thread Timothy Arceri
It's common for games to compile 2000 programs or more so at 32bits x 2000 programs x 22 fields x 2 (at least) stages This should give us something like 352 kilobytes in savings. --- src/mesa/drivers/dri/i915/i915_fragprog.c | 12 ++-- src/mesa/drivers/dri/i915/i915_program.c| 16 ++---

[Mesa-dev] [PATCH 05/70] mesa/glsl: copy num_abos to gl_program

2016-11-10 Thread Timothy Arceri
We should be able to free gl_linked_shader after linking in order to do so we need to switch to getting values from gl_program instead. --- src/compiler/glsl/glsl_to_nir.cpp | 1 - src/mesa/main/shaderapi.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 02/70] nir: add support for counting AoA uniforms in nir_shader_gather_info()

2016-11-10 Thread Timothy Arceri
--- src/compiler/nir/nir_gather_info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index e5cedd9..7d349d5 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/nir/nir_gather_info.c

[Mesa-dev] [PATCH 08/70] mesa: make use of ralloc when creating ARB program instructions

2016-11-10 Thread Timothy Arceri
This will allow us to move the ARB asm fields in gl_program into a union as we will be able call ralloc_free() on the entire struct when destroying the context. --- src/mesa/main/ffvertex_prog.c | 7 +++ src/mesa/program/arbprogparse.c | 9 ++---

[Mesa-dev] [PATCH 06/70] i965: get num_abos from shader_info rather than gl_linked_shader

2016-11-10 Thread Timothy Arceri
This is a step towards freeing gl_linked_shader after linking. --- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 5 +++-- src/mesa/drivers/dri/i965/brw_shader.cpp | 4 ++-- src/mesa/drivers/dri/i965/brw_tcs_surface_state.c

[Mesa-dev] [PATCH 04/70] i965: get num_images from shader_info rather than gl_linked_shader

2016-11-10 Thread Timothy Arceri
This is a step towards freeing gl_linked_shader after linking. --- src/mesa/drivers/dri/i965/brw_context.c | 4 ++-- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/brw_cs.c| 5 +++-- src/mesa/drivers/dri/i965/brw_gs.c

  1   2   >