[Mesa-dev] [PATCH 03/11] gallium: add common pipe_screen reference counting functions

2016-07-20 Thread Rob Herring
In order to prevent multiple pipe_screens being created in the same process, lookup of the DRM FD and reference counting of the pipe_screen are needed. Several implementations of this exist in various gallium drivers/winsys already. This creates a common version which is opt-in for winsys

[Mesa-dev] [PATCH 01/11] gallium: move pipe_screen destroy into pipe-loader

2016-07-20 Thread Rob Herring
In preparation to add reference counting of pipe_screen in the pipe-loader, pipe_loader_release needs to destroy the pipe_screen instead of state trackers. Signed-off-by: Rob Herring Cc: Emil Velikov --- src/gallium/auxiliary/pipe-loader/pipe_loader.h

Re: [Mesa-dev] [PATCH 06/15] i965: add helper for creating packing writemask

2016-07-20 Thread Kenneth Graunke
On Tuesday, July 19, 2016 4:33:18 PM PDT Timothy Arceri wrote: > For example where n=3 first_component=1 this will give us > 0xE (WRITEMASK_YZW). > > Reviewed-by: Edward O'Callaghan > --- > src/mesa/drivers/dri/i965/brw_reg.h | 6 ++ > 1 file changed, 6

Re: [Mesa-dev] [PATCH 06/10] egl/android: Fix support for pbuffers

2016-07-20 Thread Rob Herring
On Fri, Jul 15, 2016 at 2:53 AM, Tomasz Figa wrote: > From: Nicolas Boichat > > Existing image loader code supports creating images only for window > surfaces. Moreover droid_create_surface() passes wrong surface type to > dri2_get_dri_config(),

Re: [Mesa-dev] [PATCH 2/2] clover: Re-order includes in invocation.cpp to fix build

2016-07-20 Thread Francisco Jerez
Tom Stellard writes: > The build was failing because the official CL headers have a few defines, > like: > > \# define cl_khr_gl_sharing 1 > > Which have the same name as some class members of clang's OpenCLOptions class. > If we include the cl headers first, this

Re: [Mesa-dev] [PATCH 1/2] clover: Add missing include v2

2016-07-20 Thread Francisco Jerez
Tom Stellard writes: > There was a patch committed to clang to remove unnecessary includes from > header files, so we now need to explicitly include > clang/Lex/PreprocessorOptions.h > > v2: > - Use <> instead of "" for the include path. > --- >

Re: [Mesa-dev] [PATCH 02/15] i965: enable component packing for vs and fs

2016-07-20 Thread Kenneth Graunke
On Tuesday, July 19, 2016 4:33:14 PM PDT Timothy Arceri wrote: > Rather than trying to work out the total number of components > used at a location we simply treat all outputs as vec4s. > --- > src/mesa/drivers/dri/i965/brw_fs.h | 1 - > src/mesa/drivers/dri/i965/brw_fs_nir.cpp |

[Mesa-dev] [PATCH 02/11] pipe-loader-drm: protect create_screen() calls with a mutex

2016-07-20 Thread Rob Herring
Creating a screen needs to be serialized in order to support reusing existing screen. With this, driver private mutexes in create_screen() functions can be removed. Signed-off-by: Rob Herring Cc: Emil Velikov ---

[Mesa-dev] [PATCH 00/11] *** S

2016-07-20 Thread Rob Herring
*** BLURB HERE *** Rob Herring (11): gallium: move pipe_screen destroy into pipe-loader pipe-loader-drm: protect create_screen() calls with a mutex gallium: add common pipe_screen reference counting functions pipe-loader-drm: use pipe_screen_unreference to destroy screen nouveau: use

[Mesa-dev] [PATCH 05/12] st/va: add encode entrypoint

2016-07-20 Thread Boyuan Zhang
VAAPI passes PIPE_VIDEO_ENTRYPOINT_ENCODE as entry point for encoding case. We will save this encode entry point in config. config_id was used as profile previously. Now, config has both profile and entrypoint field, and config_id is used to get the config object. Later on, we pass this

[Mesa-dev] [PATCH 1/2] ttn: Update shader->info as we generate code.

2016-07-20 Thread Eric Anholt
We could use the nir_shader_gather_info() pass to update it after the fact, but this is what glsl_to_nir and prog_to_nir do. Note that this doesn't update all the fields (num_textures, num_ubos are still missing, for example). --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 13 + 1

Re: [Mesa-dev] [PATCH v3 05/11] nouveau: use common screen ref counting

2016-07-20 Thread Ilia Mirkin
On Wed, Jul 20, 2016 at 6:25 PM, Rob Herring wrote: > Use the common pipe_screen ref counting and fd hashing functions. The > mutex can be dropped as the pipe loader protects the create_screen() > calls. > > Signed-off-by: Rob Herring > Cc: Alexandre Courbot

Re: [Mesa-dev] [PATCH 06/15] i965: add helper for creating packing writemask

2016-07-20 Thread Timothy Arceri
On Wed, 2016-07-20 at 12:14 -0700, Kenneth Graunke wrote: > On Tuesday, July 19, 2016 4:33:18 PM PDT Timothy Arceri wrote: > > For example where n=3 first_component=1 this will give us > > 0xE (WRITEMASK_YZW). > > > > Reviewed-by: Edward O'Callaghan > > --- > >  

Re: [Mesa-dev] [PATCH 00/56] Die copy-and-paste code, die

2016-07-20 Thread Matt Turner
On Tue, Jul 19, 2016 at 6:41 PM, Matt Turner wrote: > 1-27 are > > Reviewed-by: Matt Turner Python's not my forte, so I'm going to call the rest of the series weakly Reviewed-by: Matt Turner Dylan may be interested in having a look.

Re: [Mesa-dev] [PATCH 02/15] i965: enable component packing for vs and fs

2016-07-20 Thread Timothy Arceri
On Wed, 2016-07-20 at 12:15 -0700, Kenneth Graunke wrote: > On Tuesday, July 19, 2016 4:33:14 PM PDT Timothy Arceri wrote: > > Rather than trying to work out the total number of components > > used at a location we simply treat all outputs as vec4s. > > --- > >  src/mesa/drivers/dri/i965/brw_fs.h  

Re: [Mesa-dev] [PATCH 12/15] i965/vec4: add support for packing tes inputs

2016-07-20 Thread Kenneth Graunke
On Tuesday, July 19, 2016 4:33:24 PM PDT Timothy Arceri wrote: > --- > src/mesa/drivers/dri/i965/brw_vec4_tes.cpp | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp > b/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp >

Re: [Mesa-dev] [PATCH 13/15] i965/vec4: add packing support for tes load outputs

2016-07-20 Thread Kenneth Graunke
On Tuesday, July 19, 2016 4:33:25 PM PDT Timothy Arceri wrote: > Reviewed-by: Edward O'Callaghan > --- > src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp | 17 + > src/mesa/drivers/dri/i965/brw_vec4_tcs.h | 1 + > 2 files changed, 14 insertions(+), 4

[Mesa-dev] [PATCH 3/8] glsl/nir: Call nir_lower_constant_initializers

2016-07-20 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compiler/glsl/glsl_to_nir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 20302e3..e6171d9 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++

[Mesa-dev] [PATCH 2/8] anv/pipeline: Call nir_lower_constant_initializers

2016-07-20 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/intel/vulkan/anv_pipeline.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 3723423..df57182 100644 --- a/src/intel/vulkan/anv_pipeline.c +++

[Mesa-dev] [PATCH 5/8] nir: Simplify nir_lower_gs_intrinsics

2016-07-20 Thread Jason Ekstrand
It's only ever called on single-function shaders. At this point, there are a lot of helpers that can make it all much simpler. Signed-off-by: Jason Ekstrand --- src/compiler/nir/nir_lower_gs_intrinsics.c | 37 +- 1 file changed, 16

[Mesa-dev] [PATCH 7/8] nir: Delete most of the constant_initializer support

2016-07-20 Thread Jason Ekstrand
Constant initializers have been a constant (ha!) pain for quite some time. While they're useful from a language perspective, people writing passes or backends really don't want deal with them most of the time. This commit removes most of the constant initializer support from NIR. It is expected

[Mesa-dev] [PATCH v3 11/11] virgl: use common screen ref counting

2016-07-20 Thread Rob Herring
Use the common pipe_screen ref counting and fd hashing functions. The mutex can be dropped as the pipe loader protects the create_screen() calls. The fd does not need to be dup'ed as the caller has already done that. Signed-off-by: Rob Herring Cc: Dave Airlie

Re: [Mesa-dev] [PATCH v3] glsl: reuse main extension table to appropriately restrict extensions

2016-07-20 Thread Ilia Mirkin
Thanks to the kind folks at Intel, this has been run through their CI system, which runs against piglit, as well as CTS. This turned up just a handful of regressions: (a) GL_OES_texture_storage_multisample_2d_array define test used #version 300 es in piglit instead of 310, fixed by

[Mesa-dev] [PATCH 12/12] st/va: enable h264 VAAPI encode

2016-07-20 Thread Boyuan Zhang
Enable H.264 VAAPI encoding through config. Currently only H.264 baseline is supported. Encode entrypoint is not accepted by driver. Signed-off-by: Boyuan Zhang --- src/gallium/state_trackers/va/config.c | 34 ++ 1 file changed, 22

[Mesa-dev] [PATCH 08/12] st/va: get rate control method from configattrib

2016-07-20 Thread Boyuan Zhang
Rate control method is passed from app to driver through config attrib list. That is why we need to store this rate control method to config. And later on, we will pass this value to context->desc.h264enc.rate_ctrl.rate_ctrl_method. Signed-off-by: Boyuan Zhang ---

Re: [Mesa-dev] [PATCH 06/11] vl/util: add copy func for yv12image to nv12surface

2016-07-20 Thread Zhang, Boyuan
Hi Andy, Thanks very much for providing all the information. The I420 U V swapping issue still can't be reproduced from my side, I will try it again later. CQP issue is fixed in the new patch set I just submitted. Please use " ... vaapiencodeh264 rate-control=cqp init-qp=x ..." command, where

[Mesa-dev] [PATCH v3 00/11] Common pipe screen ref counting

2016-07-20 Thread Rob Herring
Another version of common pipe_screen reference counting. Changes in v3: - dup() fd and store in pipe_screen as the lifetime of the pipe_loader_drm_device and pipe_screen are different. - Fix leaking of pipe_loader_drm_device. Only the last one closed was getting freed. - Move mutex for fd hash

[Mesa-dev] [PATCH v3 08/11] radeon: use common screen ref counting

2016-07-20 Thread Rob Herring
Use the common pipe_screen ref counting and fd hashing functions. The mutex can be dropped as the pipe loader protects the create_screen() calls. Signed-off-by: Rob Herring Cc: "Marek Olšák" Cc: Ilia Mirkin ---

Re: [Mesa-dev] [PATCH v3 05/11] nouveau: use common screen ref counting

2016-07-20 Thread Ilia Mirkin
On Wed, Jul 20, 2016 at 6:29 PM, Ilia Mirkin wrote: > On Wed, Jul 20, 2016 at 6:25 PM, Rob Herring wrote: >> Use the common pipe_screen ref counting and fd hashing functions. The >> mutex can be dropped as the pipe loader protects the create_screen() >>

Re: [Mesa-dev] V5 ARB_enhanced_layouts packing support for i965 Gen6+

2016-07-20 Thread Timothy Arceri
On Wed, 2016-07-20 at 18:43 +0200, Alejandro Piñeiro wrote: > On 19/07/16 08:33, Timothy Arceri wrote: > > V5: > >  - rebase on Ken's interpolation clean-ups [1] > > > > V4: > >  - add vec4 backend support and enable for Gen6+ > >   > >  V3: > > - Rewrite patch 9 (add support for packing arrays)

[Mesa-dev] [PATCH 6/8] i965/vec4: Make opt_vector_float reset at the top of each block

2016-07-20 Thread Jason Ekstrand
The pass isn't really control-flow aware and you can get into case where it tries to combine instructions from different blocks. This can actually lead to an assertion failure when removing unneeded instructions if part of the vector is set in one block and part in another. This prevents

Re: [Mesa-dev] [PATCH 09/12] st/va: add functions for VAAPI encode

2016-07-20 Thread Zhang, Boyuan
>We can keep it like this for now, but I would prefer that we clean this up and >change the radeon_vce so that it matches the begin/encode/end calls from >VA-API. >We should probably work on this together with the performance improvements. >Regards, >Christian. Hi Christian, Sure, I agree,

[Mesa-dev] [PATCH 4/8] nir/lower_returns: Stop using constant initializers

2016-07-20 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compiler/nir/nir_lower_returns.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_lower_returns.c b/src/compiler/nir/nir_lower_returns.c index 8dbea6e..cf49d5b 100644 ---

[Mesa-dev] [PATCH 8/8] nir: Remove some unused fields from nir_variable

2016-07-20 Thread Jason Ekstrand
All of these are happily set from glsl_to_nir or spirv_to_nir but their values are never used for anything. Signed-off-by: Jason Ekstrand --- src/compiler/glsl/glsl_to_nir.cpp | 5 - src/compiler/nir/nir.h | 34 --

[Mesa-dev] [PATCH 1/8] nir: Add a pass for lowering away constant initializers

2016-07-20 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand --- src/compiler/Makefile.sources | 1 + src/compiler/nir/nir.h | 2 + src/compiler/nir/nir_lower_constant_initializers.c | 102 + 3 files changed, 105 insertions(+)

[Mesa-dev] [PATCH 10/12] st/va: add preset values for VAAPI encode

2016-07-20 Thread Boyuan Zhang
Add some hardcoded values hardware needs mainly for rate control purpose. With previously hardcoded values for OMX, the rate control result is not correct. This change fixed the rate control result by setting correct values for Vaapi. Signed-off-by: Boyuan Zhang ---

[Mesa-dev] [PATCH v3 06/11] freedreno: use common screen ref counting

2016-07-20 Thread Rob Herring
Use the common pipe_screen ref counting and fd hashing functions. The mutex can be dropped as the pipe loader protects the create_screen() calls. Signed-off-by: Rob Herring Cc: Rob Clark --- src/gallium/drivers/freedreno/freedreno_screen.c | 1 -

[Mesa-dev] [PATCH v3 05/11] nouveau: use common screen ref counting

2016-07-20 Thread Rob Herring
Use the common pipe_screen ref counting and fd hashing functions. The mutex can be dropped as the pipe loader protects the create_screen() calls. Signed-off-by: Rob Herring Cc: Alexandre Courbot --- src/gallium/drivers/nouveau/nouveau_screen.c | 6

[Mesa-dev] [PATCH v3 07/11] amdgpu: use common screen ref counting

2016-07-20 Thread Rob Herring
Use the common pipe_screen ref count. amdgpu is unique in its hashing the dev pointer rather than the fd, so the common fd hashing cannot be used. However, the same reference count can be used instead of the private one. The mutex can be dropped as the pipe loader protects the create_screen()

[Mesa-dev] [PATCH v3 02/11] pipe-loader-drm: protect create_screen() calls with a mutex

2016-07-20 Thread Rob Herring
Creating a screen needs to be serialized in order to support reusing existing screen. With this, driver private mutexes in create_screen() functions can be removed. Signed-off-by: Rob Herring Cc: Emil Velikov ---

[Mesa-dev] [PATCH v3 09/11] vmwgfx: use common screen ref counting

2016-07-20 Thread Rob Herring
Use the common pipe_screen ref counting and fd hashing functions. The mutex can be dropped as the pipe loader protects the create_screen() calls. Signed-off-by: Rob Herring --- src/gallium/winsys/svga/drm/vmw_screen.c | 51

[Mesa-dev] [PATCH v3 01/11] gallium: move pipe_screen destroy into pipe-loader

2016-07-20 Thread Rob Herring
In preparation to add reference counting of pipe_screen in the pipe-loader, pipe_loader_release needs to destroy the pipe_screen instead of state trackers. Signed-off-by: Rob Herring Cc: Emil Velikov --- src/gallium/auxiliary/pipe-loader/pipe_loader.h

[Mesa-dev] [PATCH v3 04/11] pipe-loader-drm: use pipe_screen_unreference to destroy screen

2016-07-20 Thread Rob Herring
Use pipe_screen_unreference as it will call pipe_screen->destroy() when the pipe_screen is no longer referenced. The pipe_screen referencing is done within create_screen() functions as drivers (like amdgpu) may have special needs for ref counting. Signed-off-by: Rob Herring Cc:

[Mesa-dev] [PATCH v3 03/11] gallium: add common pipe_screen reference counting functions

2016-07-20 Thread Rob Herring
In order to prevent multiple pipe_screens being created in the same process, lookup of the DRM FD and reference counting of the pipe_screen are needed. Several implementations of this exist in various gallium drivers/winsys already. This creates a common version which is opt-in for winsys

Re: [Mesa-dev] [PATCH 0/7] mesa: Enable -fstrict-aliasing

2016-07-20 Thread
GCC 6.1 -O3 Mesa 12.1.0-devel (git-d2b4b16) Some line numbers provided below may be off by a few lines. List of warnings generated AFTER http://patchwork.freedesktop.org/series/9204/ rev 2 has been applied: *

Re: [Mesa-dev] [PATCH] egl/dri2: Add reference count for dri2_egl_display

2016-07-20 Thread Nicolas Boichat
On Wed, Jul 20, 2016 at 11:52 PM, Emil Velikov wrote: > On 20 July 2016 at 15:42, Emil Velikov wrote: >> On 20 July 2016 at 09:26, Nicolas Boichat wrote: >>> android.opengl.cts.WrapperTest#testGetIntegerv1 CTS test calls

[Mesa-dev] [PATCH] i965: Include VUE handles for GS with invocations > 1.

2016-07-20 Thread Kenneth Graunke
We always resort to the pull model for instanced GS inputs. So, we'd better include the VUE handles, or else we can't actually pull anything. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- 1 file

[Mesa-dev] [PATCH 2/2] vc4: Disable early Z with computed depth.

2016-07-20 Thread Eric Anholt
We don't tell the hardware whether we're computing depth, so we need to manage early Z state manually. Fixes piglit early-z. --- src/gallium/drivers/vc4/vc4_context.h | 2 ++ src/gallium/drivers/vc4/vc4_emit.c| 6 -- src/gallium/drivers/vc4/vc4_program.c | 5 + 3 files changed, 11

Re: [Mesa-dev] [PATCH 06/11] vl/util: add copy func for yv12image to nv12surface

2016-07-20 Thread Andy Furniss
Andy Furniss wrote: I tried again, and there's a possible further regression - though I have no idea whether it's ffmpeg or the newer patches here. Just thought I would mention it, as I haven't had time to look into it further yet. I can confirm this is a regression with the current

Re: [Mesa-dev] [PATCH v3 05/11] nouveau: use common screen ref counting

2016-07-20 Thread Rob Herring
On Wed, Jul 20, 2016 at 5:32 PM, Ilia Mirkin wrote: > On Wed, Jul 20, 2016 at 6:29 PM, Ilia Mirkin wrote: >> On Wed, Jul 20, 2016 at 6:25 PM, Rob Herring wrote: >>> Use the common pipe_screen ref counting and fd hashing functions. The

[Mesa-dev] [PATCH 06/12] vl/util: add copy func for yv12image to nv12surface

2016-07-20 Thread Boyuan Zhang
Add function to copy from yv12 image to nv12 surface for VAAPI putimage call. We need this function in VaPutImage call where copying from yv12 image to nv12 surface for encoding. Existing function can't be used because it only work for copying from yv12 surface to nv12 image in Vaapi.

[Mesa-dev] [PATCH 11/12] st/va: add enviromental variable to disable interlace

2016-07-20 Thread Boyuan Zhang
Add environmental variable to disable interlace mode. At VAAPI decoding stage, driver can not distinguish b/w pure decoding case and transcoding case. And since interlace encoding is not supported, we have to disable interlace for transcoding case. The temporary solution is to use enviromental

[Mesa-dev] [PATCH 07/12] st/va: add conversion for yv12 to nv12in putimage

2016-07-20 Thread Boyuan Zhang
For putimage call, if image format is yv12 (or IYUV with U V field swap) and surface format is nv12, then we need to convert yv12 to nv12 and then copy the converted data from image to surface. We can't use the existing logic where surface is destroyed and re-created with yv12 format.

[Mesa-dev] [PATCH 09/12] st/va: add functions for VAAPI encode

2016-07-20 Thread Boyuan Zhang
Add necessary functions/changes for VAAPI encoding to buffer and picture. These changes will allow driver to handle all Vaapi encode related operations. This patch doesn't change the Vaapi decode behaviour. Signed-off-by: Boyuan Zhang ---

[Mesa-dev] [PATCH v3 10/11] vc4: use common screen ref counting

2016-07-20 Thread Rob Herring
Use the common pipe_screen ref counting and fd hashing functions. The mutex can be dropped as the pipe loader protects the create_screen() calls. Cc: Eric Anholt Signed-off-by: Rob Herring --- src/gallium/winsys/vc4/drm/vc4_drm_winsys.c | 9 - 1 file

Re: [Mesa-dev] [PATCH v3 10/11] vc4: use common screen ref counting

2016-07-20 Thread Eric Anholt
Rob Herring writes: > Use the common pipe_screen ref counting and fd hashing functions. The > mutex can be dropped as the pipe loader protects the create_screen() > calls. I think the mutex mention in the commit message is copy-and-paste from another commit, since there's no

Re: [Mesa-dev] [PATCH 6/8] i965/vec4: Make opt_vector_float reset at the top of each block

2016-07-20 Thread Matt Turner
I had no idea what was going on until I did git show -w. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 05/17] mesa: Move shader memory barrier functions into barrier.c.

2016-07-20 Thread Francisco Jerez
--- src/mesa/main/barrier.c | 51 + src/mesa/main/barrier.h | 6 ++ src/mesa/main/shaderimage.c | 51 - src/mesa/main/shaderimage.h | 6 -- 4 files changed, 57 insertions(+), 57 deletions(-)

[Mesa-dev] [PATCH 06/17] mesa: Add blend barrier entry point and driver hook.

2016-07-20 Thread Francisco Jerez
Both MESA_shader_framebuffer_fetch_non_coherent and the non-coherent variant of KHR_blend_equation_advanced will use this driver hook to request coherency between framebuffer reads and writes. This intentionally doesn't hook up glBlendBarrierMESA to the dispatch layer since the extension isn't

[Mesa-dev] [PATCH 10/17] glsl: Define a gl_LastFragData built-in for GLSL versions that have gl_FragData.

2016-07-20 Thread Francisco Jerez
The EXT_shader_framebuffer_fetch extension defines alternative language for GLES2 shaders where user-defined fragment outputs are not allowed. Instead of using inout user-defined fragment outputs the shader is expected to read from the gl_LastFragData built-in array. In addition this allows using

[Mesa-dev] [PATCH 09/17] glsl: Handle the inout qualifier in fragment shader output declarations.

2016-07-20 Thread Francisco Jerez
According to the EXT_shader_framebuffer_fetch extension the inout qualifier can be used on ESSL 3.0+ shaders to declare a special kind of fragment output that gets implicitly initialized with the previous framebuffer contents at the current fragment coordinates. In addition we allow using the

[Mesa-dev] [PATCH 04/17] mesa: Rename "texturebarrier" source files to "barrier".

2016-07-20 Thread Francisco Jerez
In preparation for collecting all pipeline barrier GL entry points into a single source file. --- src/mapi/glapi/gen/gl_genexec.py | 2 +- src/mesa/Makefile.sources | 4 ++-- src/mesa/drivers/common/driverfuncs.c | 4 ++--

[Mesa-dev] [PATCH 08/17] glsl: Add support for representing framebuffer fetch in the GLSL IR.

2016-07-20 Thread Francisco Jerez
The GLSL IR representation of framebuffer fetch amounts to a single bit in the ir_variable object applicable to fragment shader outputs. The flag indicates that the variable will be implicitly initialized to the previous contents of the render buffer at the same fragment coordinates and sample

[Mesa-dev] [PATCH 02/17] mesa: Add extension enables for framebuffer fetch extensions.

2016-07-20 Thread Francisco Jerez
This allows drivers to expose EXT_shader_framebuffer_fetch in GLES2+ contexts if desired. Note that this adds boolean flags for two MESA extensions, but only the EXT GLES-only extension is exposed for the moment, see the cover letter of this series [1] for the rationale. [1]

[Mesa-dev] [PATCH 03/17] mesa: Add support for querying GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT.

2016-07-20 Thread Francisco Jerez
This can currently only give true as result since the only way you can expose EXT_shader_framebuffer_fetch right now is by flipping the MESA_shader_framebuffer_fetch bit, but that could potentially change in the future, see [1] for an explanation. [1]

[Mesa-dev] [PATCH 07/17] glsl: Add parser state enables for the framebuffer fetch extensions.

2016-07-20 Thread Francisco Jerez
--- src/compiler/glsl/glsl_parser_extras.cpp | 3 +++ src/compiler/glsl/glsl_parser_extras.h | 13 + 2 files changed, 16 insertions(+) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 0077434..a2c1afe 100644 ---

Re: [Mesa-dev] [PATCH] i965: print error messages if gs fails to compile

2016-07-20 Thread Kenneth Graunke
On Thursday, July 21, 2016 2:07:01 PM PDT Timothy Arceri wrote: > From: Timothy Arceri > > We do this for all other stages. > --- > src/mesa/drivers/dri/i965/brw_gs.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_gs.c

Re: [Mesa-dev] [PATCH 06/10] egl/android: Fix support for pbuffers

2016-07-20 Thread Tomasz Figa
On Thu, Jul 21, 2016 at 6:19 AM, Rob Herring wrote: > On Fri, Jul 15, 2016 at 2:53 AM, Tomasz Figa wrote: >> From: Nicolas Boichat >> >> Existing image loader code supports creating images only for window >> surfaces. Moreover

[Mesa-dev] [PATCH 00/17] Framebuffer fetch.

2016-07-20 Thread Francisco Jerez
This series implements the driver-independent part of the EXT_shader_framebuffer_fetch extension that provides fully programmable blending to GLES shaders. The GLSL IR and NIR representation of the framebuffer fetch functionality should be straightforward, but the way extension tracking works may

[Mesa-dev] [PATCH] i965: print error messages if gs fails to compile

2016-07-20 Thread Timothy Arceri
From: Timothy Arceri We do this for all other stages. --- src/mesa/drivers/dri/i965/brw_gs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index d9f18c4..67a2480 100644 ---

[Mesa-dev] [PATCH 16/17] nir: Pass through fb_fetch_output and OutputsRead from GLSL IR.

2016-07-20 Thread Francisco Jerez
The NIR representation of framebuffer fetch is the same as the GLSL IR's until interface variables are lowered away, at which point it will be translated to load output intrinsics. The GLSL-to-NIR pass just needs to copy the bits over to the NIR program. --- src/compiler/glsl/glsl_to_nir.cpp | 2

Re: [Mesa-dev] [PATCH 10/10] egl/android: Add fallback to kms_swrast driver

2016-07-20 Thread Tomasz Figa
On Wed, Jul 20, 2016 at 10:34 PM, Rob Herring wrote: > On Wed, Jul 20, 2016 at 12:53 AM, Tomasz Figa wrote: >> On Wed, Jul 20, 2016 at 7:40 AM, Rob Herring wrote: >>> On Fri, Jul 15, 2016 at 2:53 AM, Tomasz Figa wrote:

Re: [Mesa-dev] [PATCH 05/12] st/va: add encode entrypoint

2016-07-20 Thread Zhang, Boyuan
>Makes sense, but I suggest that in this case we should add at least a comment >why this is still disabled. >And it would look better if we have an "#if 0" or something like this in the >code which gets explicitly removed with the last patch. Sure, I agree. I will submit a new patch set to add

Re: [Mesa-dev] [PATCH 01/15] i965: bring back type_size_vec4_times_4()

2016-07-20 Thread Kenneth Graunke
On Tuesday, July 19, 2016 4:33:13 PM PDT Timothy Arceri wrote: > We will use this for output varyings. To make component > packing simpler we will just treat all varyings as vec4s. > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 13 + > src/mesa/drivers/dri/i965/brw_shader.h | 1 + >

[Mesa-dev] [PATCH] anv: add function to get prime buffer from memory+image

2016-07-20 Thread Jonathan
I followed your suggestions and changed the prototype, although the implementation only supports basic formats --- include/vulkan/vulkan_intel.h | 17 +++ src/intel/vulkan/anv_intel.c | 49 +++ 2 files changed, 66 insertions(+) diff --git

[Mesa-dev] [PATCH 15/17] glsl: Keep track of the set of fragment outputs read by a GL program.

2016-07-20 Thread Francisco Jerez
This is the set of shader outputs whose initial value is provided to the shader by some external means when the shader is executed, rather than computed by the shader itself. --- src/compiler/glsl/ir_set_program_inouts.cpp | 3 +++ src/mesa/main/mtypes.h | 1 + 2 files

[Mesa-dev] [PATCH 11/17] glsl: Don't attempt to do dead varying elimination on gl_LastFragData arrays.

2016-07-20 Thread Francisco Jerez
Apparently this pass can only handle elimination of a single built-in fragment output array, so the presence of gl_LastFragData (which it wouldn't split correctly anyway) could prevent it from splitting the actual gl_FragData array. Just match gl_FragData by name since it's the only built-in it

[Mesa-dev] [PATCH 17/17] nir: Handle FB fetch outputs correctly in nir_lower_io_to_temporaries.

2016-07-20 Thread Francisco Jerez
This requires emitting a series of copies at the top of the program from each output variable to the corresponding temporary. The initial copy can be skipped for non-framebuffer fetch outputs whose initial value is undefined, and the final copy needs to be skipped for read-only outputs (i.e.

[Mesa-dev] [PATCH 13/17] glsl/linker: Allow fragment output overlap for gl_LastFragData.

2016-07-20 Thread Francisco Jerez
gl_LastFragData overlaps gl_FragData by definition. --- src/compiler/glsl/linker.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 6d45a02..aeaeb9c 100644 --- a/src/compiler/glsl/linker.cpp +++

[Mesa-dev] [PATCH 14/17] glsl: Don't consider read-only fragment outputs to be written to.

2016-07-20 Thread Francisco Jerez
Since they cannot be written. This prevents adding fragment outputs to the OutputsWritten set that are only read from via the gl_LastFragData array but never written to. --- src/compiler/glsl/ir_set_program_inouts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 12/17] glsl/ast: Allow redeclaration of gl_LastFragData with different precision qualifier.

2016-07-20 Thread Francisco Jerez
--- src/compiler/glsl/ast_to_hir.cpp | 13 + 1 file changed, 13 insertions(+) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index c050a3f..ac651a9 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -3948,6

[Mesa-dev] [PATCH 01/17] glapi: Add XML for GL_EXT_shader_framebuffer_fetch.

2016-07-20 Thread Francisco Jerez
--- src/mapi/glapi/gen/es_EXT.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index 6886dab..929e0e7 100644 --- a/src/mapi/glapi/gen/es_EXT.xml +++ b/src/mapi/glapi/gen/es_EXT.xml @@ -790,6 +790,11 @@ + + + +

Re: [Mesa-dev] [PATCH 00/10] egl/android: Improve the Android EGL backend

2016-07-20 Thread Tomasz Figa
On Wed, Jul 20, 2016 at 10:43 PM, Rob Herring wrote: > On Mon, Jul 18, 2016 at 11:29 PM, Tomasz Figa wrote: >> On Tue, Jul 19, 2016 at 12:35 PM, Rob Herring wrote: >>> On Fri, Jul 15, 2016 at 2:53 AM, Tomasz Figa wrote:

[Mesa-dev] [PATCH 2/2] clover: Re-order includes in invocation.cpp to fix build

2016-07-20 Thread Tom Stellard
The build was failing because the official CL headers have a few defines, like: \# define cl_khr_gl_sharing 1 Which have the same name as some class members of clang's OpenCLOptions class. If we include the cl headers first, this breaks the build because the member names of this class are

[Mesa-dev] [PATCH 1/2] clover: Add missing include v2

2016-07-20 Thread Tom Stellard
There was a patch committed to clang to remove unnecessary includes from header files, so we now need to explicitly include clang/Lex/PreprocessorOptions.h v2: - Use <> instead of "" for the include path. --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 2 ++ 1 file changed, 2

[Mesa-dev] [PATCH] egl/dri2: Add reference count for dri2_egl_display

2016-07-20 Thread Nicolas Boichat
android.opengl.cts.WrapperTest#testGetIntegerv1 CTS test calls eglTerminate, followed by eglReleaseThread. A similar case is observed in this bug: https://bugs.freedesktop.org/show_bug.cgi?id=69622, where the test calls eglTerminate, then eglMakeCurrent(dpy, NULL, NULL, NULL). With the current

Re: [Mesa-dev] [PATCH 3/3] radeonsi: advertise 8 bits subpixel precision for viewport bounds

2016-07-20 Thread Marek Olšák
Pushed the series, thanks. Marek On Tue, Jul 19, 2016 at 1:07 PM, Józef Kucia wrote: > Signed-off-by: Józef Kucia > --- > src/gallium/drivers/radeonsi/si_pipe.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

[Mesa-dev] RFC Steps towards replacing the GLSL IR optimisations with NIR

2016-07-20 Thread Timothy Arceri
Currently disabling these optimisations causes some major regressions mainly because cross shader removal of unused varyings is done in the GLSL IR linker. I've spent some time today attempting to insert a glsl->nir conversion just before assigning varying locations. The idea was I could then

[Mesa-dev] [PATCH 1/2] mesa/i965: create Driver.ProcessGLSLIR()

2016-07-20 Thread Timothy Arceri
This allows us to do backend specific processing on GLSL IR from the shared linker. --- src/mesa/drivers/dri/i965/brw_link.cpp | 14 +++--- src/mesa/drivers/dri/i965/brw_program.c | 1 + src/mesa/drivers/dri/i965/brw_shader.h | 4 src/mesa/main/dd.h | 3 +++

[Mesa-dev] [PATCH 2/2] glsl/i965: call backend optimisations from glsl linker

2016-07-20 Thread Timothy Arceri
Here we get the backend to do its extra GLSL IR passes before assigning varying and uniform locations. Broadwell shader-db results: total instructions in shared programs: 8649621 -> 8642352 (-0.08%) instructions in affected programs: 49023 -> 41754 (-14.83%) helped:

Re: [Mesa-dev] [PATCH 2/2] clover: Re-order includes in invocation.cpp to fix build

2016-07-20 Thread Vedran Miletić
On 07/20/2016 11:46 AM, Tom Stellard wrote: The build was failing because the official CL headers have a few defines, like: \# define cl_khr_gl_sharing 1 Which have the same name as some class members of clang's OpenCLOptions class. If we include the cl headers first, this breaks the build

Re: [Mesa-dev] [PATCH 1/3] gallium: split transfer_inline_write into buffer and texture callbacks

2016-07-20 Thread Marek Olšák
On Tue, Jul 19, 2016 at 4:00 PM, Nicolai Hähnle wrote: > On 18.07.2016 14:25, Marek Olšák wrote: >> >> From: Marek Olšák >> >> to reduce the call indirections with u_resource_vtbl. >> >> The worst call tree you could get was: >>-

Re: [Mesa-dev] [PATCH 06/11] vl/util: add copy func for yv12image to nv12surface

2016-07-20 Thread Andy Furniss
Zhang, Boyuan wrote: Hi Andy, Thanks for the confirmation. It seems like all basic functionality is working now. I will look into the cqp issue. And for the speed related issue, we understand the reason and have already planned to work on it after this bring-up. However, it will be a

Re: [Mesa-dev] [PATCH 00/10] egl/android: Improve the Android EGL backend

2016-07-20 Thread Tomasz Figa
Hi Rob, On Tue, Jul 19, 2016 at 1:29 PM, Tomasz Figa wrote: > On Tue, Jul 19, 2016 at 12:35 PM, Rob Herring wrote: >> >> Patches 7-10 wouldn't apply. Do you have a git tree with the series? > > Hmm, I rebased them on Mesa master just before sending. Let me

Re: [Mesa-dev] Testing patches 9987 and 9988

2016-07-20 Thread
Results for Bioshock Infinite on R9 390: TIMEAVG MIN MAX 2016-05-25.15-51-53: 139.06, 9.81, 1.72, 58.78 2016-06-14.01-13-33: 100.91, 16.12, 3.06, 60.06 2016-07-07.16-44-55: 95.88, 18.45, 3.74, 68.32 2016-07-20.11-55-04: 85.97, 27.20, 4.54, 68.63 (git-0b626d7)

Re: [Mesa-dev] [PATCH] egl/dri2: dri2_make_current: Make sure display is initialized before using it

2016-07-20 Thread Nicolas Boichat
On Mon, Jul 18, 2016 at 4:37 PM, Emil Velikov wrote: > On 18 July 2016 at 04:19, Nicolas Boichat wrote: >> On Fri, Jul 15, 2016 at 9:03 PM, Emil Velikov >> wrote: >>> On 15 July 2016 at 09:28, Nicolas Boichat

Re: [Mesa-dev] [PATCH v2 1/3] i965/miptree: Enforce that height == 1 for 1-D array textures

2016-07-20 Thread Iago Toral
All 4 patches are: Reviewed-by: Iago Toral Quiroga On Tue, 2016-07-19 at 08:26 -0700, Jason Ekstrand wrote: > The GL API and mesa internals do this differently than we do.  In GL, > there > is no depth parameter for 1-D arrays and height is used.  In the i965 > miptree code we

Re: [Mesa-dev] [PATCH 09/12] st/va: add functions for VAAPI encode

2016-07-20 Thread Christian König
Am 20.07.2016 um 06:21 schrieb Zhang, Boyuan: >> - context->decoder->begin_frame(context->decoder, context->target, >desc.base); >> + if (context->decoder->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE) >> + context->decoder->begin_frame(context->decoder, context->target, >desc.base); >Why

Re: [Mesa-dev] [PATCH] egl/dri2: Add reference count for dri2_egl_display

2016-07-20 Thread Eric Engestrom
On Wed, Jul 20, 2016 at 04:26:50PM +0800, Nicolas Boichat wrote: > android.opengl.cts.WrapperTest#testGetIntegerv1 CTS test calls > eglTerminate, followed by eglReleaseThread. A similar case is > observed in this bug: https://bugs.freedesktop.org/show_bug.cgi?id=69622, > where the test calls

Re: [Mesa-dev] [PATCH] egl/dri2: Add reference count for dri2_egl_display

2016-07-20 Thread Emil Velikov
On 20 July 2016 at 09:26, Nicolas Boichat wrote: > android.opengl.cts.WrapperTest#testGetIntegerv1 CTS test calls > eglTerminate, followed by eglReleaseThread. A similar case is > observed in this bug: https://bugs.freedesktop.org/show_bug.cgi?id=69622, > where the test

  1   2   >