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

2016-11-20 Thread Tomasz Figa
Hi, On Wed, Nov 16, 2016 at 11:11 AM, Liu Zhiquan wrote: > mesa android path didn't support pbuffer, so add pbuffer support to > fix most deqp and cts pbuffer test cases fail; > add single buffer config to support pbuffer, and create image for > pbuffer when pbuffer type is front surface. > The E

Re: [Mesa-dev] [PATCH] i965/hsw: Set integer mode in sampling state for stencil texturing

2016-11-20 Thread Jason Ekstrand
On Nov 20, 2016 22:42, "Jordan Justen" wrote: > > On 2016-11-20 21:15:24, Jason Ekstrand wrote: > >On Sun, Nov 20, 2016 at 9:12 PM, Jason Ekstrand > >wrote: > > > > On Sun, Nov 20, 2016 at 8:03 PM, Jordan Justen > > wrote: > > > >Fixes: > > > > ES31-CTS.functional.textu

Re: [Mesa-dev] [PATCH v2 2/2] egl/android: Use gralloc::lock_ycbcr for resolving YUV formats (v2)

2016-11-20 Thread Tomasz Figa
On Thu, Nov 10, 2016 at 5:48 PM, Tapani Pälli wrote: > > > On 11/10/2016 09:55 AM, Tomasz Figa wrote: >> >> There is an interface that can be used to query YUV buffers for their >> internal format. Specifically, if gralloc:lock_ycbcr() is given no SW >> usage flags, it's supposed to return plane o

Re: [Mesa-dev] [PATCH] egl/android: Remove handling of RGB_888 pixel format

2016-11-20 Thread Tomasz Figa
On Thu, Nov 10, 2016 at 5:21 AM, Emil Velikov wrote: > On 9 November 2016 at 08:32, Tomasz Figa wrote: >> It is currently completely broken, as it ends up using RGBX_ on >> hardware side, due to no way of distinguishing between these two in the >> DRI API, while HAL_PIXEL_FORMAT_RGB_888 is cl

Re: [Mesa-dev] [PATCH v2 1/2] egl/android: Get gralloc module in dri2_initialize_android() (v2)

2016-11-20 Thread Tomasz Figa
On Thu, Nov 10, 2016 at 4:55 PM, Tomasz Figa wrote: > Currently droid_open_device() gets a reference to the gralloc module > only for its own use and does not store it anywhere. To make it possible > to call gralloc methods from code added in further patches, let's > refactor current code to get g

Re: [Mesa-dev] [PATCH] anv: Implement a depth stall restriction on gen7

2016-11-20 Thread Jordan Justen
On 2016-11-19 19:26:57, Jason Ekstrand wrote: >On Nov 19, 2016 6:56 PM, "Jordan Justen" >wrote: >> >> On 2016-11-19 15:08:11, Jason Ekstrand wrote: >> > Fixes 61 Vulkan CTS tests on Haswell >> > >> > Cc: "13.0" >> > --- >> > src/intel/vulkan/anv_genX.h

Re: [Mesa-dev] [PATCH] i965/hsw: Set integer mode in sampling state for stencil texturing

2016-11-20 Thread Jordan Justen
On 2016-11-20 21:15:24, Jason Ekstrand wrote: >On Sun, Nov 20, 2016 at 9:12 PM, Jason Ekstrand >wrote: > > On Sun, Nov 20, 2016 at 8:03 PM, Jordan Justen > wrote: > >Fixes: > > > ES31-CTS.functional.texture.border_clamp.formats.depth24_stencil8_sample_stencil.

[Mesa-dev] [Bug 98279] [vulkan/radeon] dota2 -vulkan hangs the GPU on R9-390

2016-11-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98279 --- Comment #9 from Michel Dänzer --- (In reply to Roman Serkov from comment #8) > [...] on Xorg i am able to alt-tab to terminal and kill the process. You may be running into a known issue with libxcb in the Steam runtime, see bug 97174. -- Y

[Mesa-dev] [Bug 98279] [vulkan/radeon] dota2 -vulkan hangs the GPU on R9-390

2016-11-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98279 --- Comment #8 from Roman Serkov --- I'm having the same issue but on R7 265 (PITCAIRN) on Arch OpenGL core profile version string: 4.5 (Core Profile) Mesa 13.1.0-devel (git-203c879) Tried linux-4.9-rc5 and linux-next-20161117. Been trying many

Re: [Mesa-dev] [PATCH] Revert "wayland: Block for the frame callback in get_back_bo not dri2_swap_buffers"

2016-11-20 Thread Jonas Ådahl
On Thu, Nov 10, 2016 at 10:38:51AM +, Daniel Stone wrote: > Hi, > > On 10 November 2016 at 06:08, Jonas Ådahl wrote: > > On Mon, Oct 24, 2016 at 08:42:59PM +0100, Daniel Stone wrote: > >> The intent of moving blocking from SwapBuffers to get_back_bo, was to > >> avoid unnecessary triple-buffe

Re: [Mesa-dev] [PATCH] i965/hsw: Set integer mode in sampling state for stencil texturing

2016-11-20 Thread Jason Ekstrand
On Sun, Nov 20, 2016 at 9:12 PM, Jason Ekstrand wrote: > On Sun, Nov 20, 2016 at 8:03 PM, Jordan Justen > wrote: > >> Fixes: >> >> ES31-CTS.functional.texture.border_clamp.formats.depth24_ste >> ncil8_sample_stencil.nearest_size_pot >> ES31-CTS.functional.texture.border_clamp.formats.depth24_ste

Re: [Mesa-dev] [PATCH] i965/hsw: Set integer mode in sampling state for stencil texturing

2016-11-20 Thread Jason Ekstrand
On Sun, Nov 20, 2016 at 8:03 PM, Jordan Justen wrote: > Fixes: > > ES31-CTS.functional.texture.border_clamp.formats.depth24_ > stencil8_sample_stencil.nearest_size_pot > ES31-CTS.functional.texture.border_clamp.formats.depth24_ > stencil8_sample_stencil.nearest_size_npot > ES31-CTS.functional.tex

Re: [Mesa-dev] [PATCH v2 11/13] anv: Use pass attachment information to insert flushes

2016-11-20 Thread Jason Ekstrand
On Sun, Nov 20, 2016 at 8:21 PM, Jason Ekstrand wrote: > Input and resolve attachments can cause an implicit dependency in the > pipeline. It's our job to insert the needed flushes. Fortunately, we can > easily reuse the usage tracking that we use for CCS resolves. > > This fixes 120 Vulkan CTS

[Mesa-dev] [PATCH v2 11/13] anv: Use pass attachment information to insert flushes

2016-11-20 Thread Jason Ekstrand
Input and resolve attachments can cause an implicit dependency in the pipeline. It's our job to insert the needed flushes. Fortunately, we can easily reuse the usage tracking that we use for CCS resolves. This fixes 120 Vulkan CTS tests on Haswell --- src/intel/vulkan/anv_blorp.c | 88 +

[Mesa-dev] [PATCH] i965/hsw: Set integer mode in sampling state for stencil texturing

2016-11-20 Thread Jordan Justen
Fixes: ES31-CTS.functional.texture.border_clamp.formats.depth24_stencil8_sample_stencil.nearest_size_pot ES31-CTS.functional.texture.border_clamp.formats.depth24_stencil8_sample_stencil.nearest_size_npot ES31-CTS.functional.texture.border_clamp.formats.depth32f_stencil8_sample_stencil.nearest_size

[Mesa-dev] [Bug 98714] Weird whitish spots and green stuff mostly on black.

2016-11-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98714 --- Comment #2 from Mathieu Belanger --- I tested different git version of Mesa and LLVM git 4.0 and the 3.9 included by Gentoo. I don't think it's a LLVM issue as it was working fine with some 4.0 gitted a while ago. -- You are receiving this

[Mesa-dev] [PATCH] swr: allocate all scratch space in one go for vertex buffers

2016-11-20 Thread Ilia Mirkin
Multiple buffers may reference client arrays. When this happens, we might reach for scratch space multiple times, which could cause later arrays to invalidate the pointers allocated for the earlier ones. This fixes copyteximage 2D_ARRAY. Signed-off-by: Ilia Mirkin --- It also fixes a bunch of r

[Mesa-dev] [PATCH] swr: don't claim to allow setting layer/viewport from VS

2016-11-20 Thread Ilia Mirkin
This may ultimately be possible to support, but for now it's not hooked up and the swr core only supports this output from GS. This normally wouldn't matter, but we lie about supporting GL 3.2, and also the blitter and st/mesa will make use of this functionality if claimed. Signed-off-by: Ilia Mi

[Mesa-dev] [PATCH v3] swr: calculate viewport width/height based on the scale

2016-11-20 Thread Ilia Mirkin
The former calculations were for min/max y. The width/height don't take translate into account. Signed-off-by: Ilia Mirkin --- v2 -> v3: - reduce viewport width when clamping the x/y offsets to 0 - subtract vp->y from height, not vp->x Let's hope I don't need to write a v4 of this trivial pat

Re: [Mesa-dev] [PATCH] gallium: create a debug screen wrapper around swrast screens

2016-11-20 Thread Ilia Mirkin
Thanks Marek. Emil, I'd appreciate it if you could have a look as well. I believe you were the last to touch these helpers. I'm highly confused by the flow of things, and mainly want to ensure that we don't warp the same screen *twice*. Cheers, -ilia On Sun, Nov 20, 2016 at 10:56 AM, Marek Ol

Re: [Mesa-dev] [PATCH] radeonsi: Fix resource leak in gs_copy_shader allocation failure path

2016-11-20 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Sun, Nov 20, 2016 at 5:19 AM, Mun Gwan-gyeong wrote: > CID 1394028 > > Signed-off-by: Mun Gwan-gyeong > --- > src/gallium/drivers/radeonsi/si_shader.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/radeonsi

Re: [Mesa-dev] [PATCH] gallium: create a debug screen wrapper around swrast screens

2016-11-20 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Sun, Nov 20, 2016 at 3:42 AM, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > src/gallium/auxiliary/target-helpers/inline_sw_helper.h | 3 +++ > src/gallium/auxiliary/target-helpers/sw_helper.h| 3 +++ > 2 files changed, 6 insertions(+) > > di

[Mesa-dev] [Bug 98783] Talos Principle rendering garbage in main menu animation when using Vulkan

2016-11-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98783 Vedran Miletić changed: What|Removed |Added URL||https://llvm.org/bugs/show_

[Mesa-dev] [PATCH] util/disk_cache: close a previously opened handle in disk_cache_put

2016-11-20 Thread Mun Gwan-gyeong
We're missing the close() to the matching open(). CID 1373407 Signed-off-by: Mun Gwan-gyeong --- src/util/disk_cache.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 4287878..5ceb3aa 100644 --- a/src/util/disk_

[Mesa-dev] [PATCH 1/1] r600/sb: Fix loop optimization related hangs on eg

2016-11-20 Thread Heiko Przybyl
Make sure unused ops and their references are removed, prior to entering the GCM (global code motion) pass, to stop GCM from breaking the loop logic and thus hanging the GPU. Turns out, that sb has problems with loops and node optimizations regarding associative folding: - the global code motion

[Mesa-dev] [PATCH 49/58] st/mesa/glsl: move Version to gl_shader_program_data

2016-11-20 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 50/58] st/mesa: get Version from gl_program rather than gl_shader_program

2016-11-20 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 +++ b/src/mesa/stat

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

2016-11-20 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 fil

[Mesa-dev] [PATCH 35/58] i965: make use of new is_arb_asm flag

2016-11-20 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 11a170e..0296bb3 100644 --- a/src/mesa

[Mesa-dev] [PATCH 38/58] mesa: make _CurrentFragmentProgram a gl_program struct pointer

2016-11-20 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 ++-- src/mesa/main/api

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

2016-11-20 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 deletions

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

2016-11-20 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 tha

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

2016-11-20 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 vari

[Mesa-dev] [PATCH 58/58] glsl: use last_vert_prog to get last {clip, cull}_distance_array_size

2016-11-20 Thread Timothy Arceri
--- src/compiler/glsl/link_varyings.cpp | 6 -- src/compiler/glsl/linker.cpp| 14 -- src/mesa/main/mtypes.h | 7 --- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp

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

2016-11-20 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 s

[Mesa-dev] [PATCH 56/58] st/mesa/glsl: change xfb_program field to last_vert_prog

2016-11-20 Thread Timothy Arceri
Now that the i965 backend doesn't depend on this field we can make it more generic and short circuit a bunch of code paths. The new field will be used in a following patch for another clean-up. --- src/compiler/glsl/link_varyings.cpp| 5 +++- src/compiler/glsl/linker.cpp |

[Mesa-dev] [PATCH 57/58] mesa/glsl: set {clip, cull}_distance_array_size directly in gl_program

2016-11-20 Thread Timothy Arceri
There are some line wrapping violations here but those lines will get deleted in the following patch. --- src/compiler/glsl/glsl_to_nir.cpp | 2 -- src/compiler/glsl/linker.cpp| 32 +++ src/mesa/drivers/dri/i965/brw_vs.c | 2 +- src/mesa/main/mtypes.h

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

2016-11-20 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 e4d82cf..522ddb9 100644 --- a/src/mesa/drivers/dri/i965/brw_cs.c +++ b/src/mesa/drivers/dri/i965/brw_cs.c @@

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

2016-11-20 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 -- src/mes

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

2016-11-20 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 information

[Mesa-dev] [PATCH 51/58] mesa/glsl: move ProgramResourceList to gl_shader_program_data

2016-11-20 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 44/58] st/mesa: pass gl_program to st_bind_ssbos()

2016-11-20 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 e1efd62.

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

2016-11-20 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 | 2 ++ src/compiler/glsl/standalone_scaffoldin

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

2016-11-20 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 -- src/mesa/drivers/dri/i9

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

2016-11-20 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 vari

[Mesa-dev] [PATCH 28/58] i965: pass gl_program to brw_upload_ubo_surfaces()

2016-11-20 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 36/58] mesa/glsl: remove hack to reset sampler units to zero

2016-11-20 Thread Timothy Arceri
Now that we have the is_arb_asm flag we can just skip the initialisation. V2: remove hack from standalone compiler where it was never needed since it only compiles glsl shaders. --- src/compiler/glsl/link_uniforms.cpp | 11 --- src/compiler/glsl/standalone.cpp| 4 src/mesa/progr

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

2016-11-20 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 i

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

2016-11-20 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 45bb885..ef1a6

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

2016-11-20 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 - src/mesa/drivers/dri/i965/brw_nir_

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

2016-11-20 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 - src/mesa/state_tr

[Mesa-dev] [PATCH 40/58] mesa: simplify sampler setting code

2016-11-20 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(+), 22

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

2016-11-20 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 a/src/me

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

2016-11-20 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 52a88cb..79ed715

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

2016-11-20 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 39/58] mesa/glsl: set num_textures per stage directly in shader_info

2016-11-20 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 +- src/mesa/state_tracker/st_glsl_to_tgsi.c

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

2016-11-20 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 - src/m

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

2016-11-20 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 +- src/mesa/drivers/dri

[Mesa-dev] [PATCH 30/58] i965: eliminate gen6_xfb_enabled field in brw_gs_prog_data

2016-11-20 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 +-- src/mesa/driv

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

2016-11-20 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 2fb37f5..4a6e

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

2016-11-20 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 ++-- src/mesa/drivers/dri/i965/brw

[Mesa-dev] [PATCH 14/58] i965: move compiled_once flag to brw_program

2016-11-20 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 +++- src/mesa/drivers/dri/i96

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

2016-11-20 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 522ddb9..f220846 100644 --- a/src/mesa/drivers/dri/i965/brw_cs.c +++ b/src/mesa/drivers/dri/i965/brw_cs.

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

2016-11-20 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 +- src/mesa/drive

[Mesa-dev] [PATCH 05/58] mesa/glsl: move subroutine metadata to gl_program

2016-11-20 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 24/58] st/mesa/glsl/i965: move per stage UniformBlocks to gl_program

2016-11-20 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 src/compiler/glsl/lower_ubo_refe

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

2016-11-20 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 +++--- src/

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

2016-11-20 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 11/58] mesa/glsl: move LinkedTransformFeedback from gl_shader_program to gl_program

2016-11-20 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 gl_progra

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

2016-11-20 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. --- src/mesa

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

2016-11-20 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 changed

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

2016-11-20 Thread Timothy Arceri
After removing brw_shader in the previous commit this is no longer needed. V2: remove use in src/compiler/glsl/test_optpass.cpp --- src/compiler/glsl/linker.cpp | 3 ++- src/compiler/glsl/standalone.cpp | 1 - src/compiler/glsl/standalone_scaffolding.cpp | 13 ---

[Mesa-dev] [PATCH 08/58] mesa/compiler: add local_size_variable to shader_info

2016-11-20 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 b/src/comp

[Mesa-dev] [PATCH 10/58] i965: get LinkedTransformFeedback from gl_transform_feedback_object

2016-11-20 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 deletions

[Mesa-dev] [PATCH 09/58] mesa: move _Used to gl_program

2016-11-20 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 b/src/compiler

[Mesa-dev] [PATCH 13/58] mesa/glsl: move BlendSupport bitfield to gl_program

2016-11-20 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 stage

[Mesa-dev] [PATCH 07/58] mesa: pass gl_program to _mesa_append_uniforms_to_file()

2016-11-20 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 d3b4cab..c

[Mesa-dev] [PATCH 04/58] mesa/compiler: add stage to shader_info

2016-11-20 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 +++ src/mesa/main/shaderapi

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

2016-11-20 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 ++-- src/mesa/ma

[Mesa-dev] [PATCH 06/58] glsl/mesa: set separate_shader directly in shader_info

2016-11-20 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 90fdd69..d84be92 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/

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

2016-11-20 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. --- src/c

[Mesa-dev] V2 Rework gl program structures (lots of clean-up)

2016-11-20 Thread Timothy Arceri
Most of these patches are clean-ups on there own so I'd be grateful for even partial series reviews. Series is available in the free_gl_linked_shader8 branch of: https://github.com/tarceri/Mesa.git V2: - some make check fixes - rebase on master - previously reviewed patches pushed (Thanks Emil)

[Mesa-dev] [PATCH 02/58] mesa: optimise interleaved sso validation

2016-11-20 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 01/58] mesa/glsl: add bitmask to track stages a program was linked against

2016-11-20 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

Re: [Mesa-dev] [PATCH] anv: Add missing error-checking to anv_block_pool_init

2016-11-20 Thread Nayan Deshmukh
Reviewed-by: Nayan Deshmukh On Sun, Nov 20, 2016 at 4:41 PM, Mun Gwan-gyeong wrote: > When the allocation fails on u_vector_init(), it returns 0 > This fixes u_vector_init failure path on anv_block_pool_init > > CID 1394319 > > Signed-off-by: Mun Gwan-gyeong > --- > src/intel/vulkan/anv_alloca

[Mesa-dev] [PATCH] anv: Fix unintentional integer overflow in anv_CreateDmaBufImageINTEL

2016-11-20 Thread Mun Gwan-gyeong
pCreateInfo->strideInBytes * pCreateInfo->extent.height with type "unsigned int" is evaluated using 32-bit arithmetic. This fixes unintentional integer overflow by casting to uint64_t before multifying. CID 1394321 Signed-off-by: Mun Gwan-gyeong --- src/intel/vulkan/anv_intel.c | 2 +- 1 file c

[Mesa-dev] [PATCH] anv: Add missing error-checking to anv_block_pool_init

2016-11-20 Thread Mun Gwan-gyeong
When the allocation fails on u_vector_init(), it returns 0 This fixes u_vector_init failure path on anv_block_pool_init CID 1394319 Signed-off-by: Mun Gwan-gyeong --- src/intel/vulkan/anv_allocator.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_

Re: [Mesa-dev] [PATCH] radeonsi: Fix resource leak in gs_copy_shader allocation failure path

2016-11-20 Thread Edward O'Callaghan
Reviewed-by: Edward O'Callaghan On 11/20/2016 03:19 PM, Mun Gwan-gyeong wrote: > CID 1394028 > > Signed-off-by: Mun Gwan-gyeong > --- > src/gallium/drivers/radeonsi/si_shader.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/radeonsi/si_shad