[Mesa-dev] [PATCH] virgl: wrap ret assignment with braces to do correct thing

2015-10-30 Thread Dave Airlie
Coverity reported that ret could only be 0 or 1, since it was setting ret = fn() > 0, instead of doing (ret = fn()) > 0. Signed-off-by: Dave Airlie --- src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 2 +- src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c | 2 +- 2 files changed, 2 inser

[Mesa-dev] freedreno: Enable a305 (better with the patch)

2015-10-30 Thread Guillaume Charifi
It seems to work without much changes (a simple kernel patch is needed for it to work on the tested device though) freedreno.add_305.patch Description: ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listin

[Mesa-dev] freedreno: Enable a305

2015-10-30 Thread Guillaume Charifi
It seems to work without much changes (a simple kernel patch is needed for it to work on the tested device though) Message d'origine De : Guillaume Charifi Date :31/10/2015 06:37 (GMT+01:00) À : d...@lists.freedesktop.org Cc : freedr...@lists.freedesktop.org Objet : freedre

[Mesa-dev] [PATCH v3 0/6] gallium: allow drivers to report debug info to st

2015-10-30 Thread Ilia Mirkin
I've switched the st/mesa impl around to be set in the manager, based on whether it's a debug context. I've also added a st/clover impl (entirely untested beyond compilation) as the OpenCL API appears to have similar allowances. Finally, I've added some nouveau patches that demonstrate how I intend

[Mesa-dev] [PATCH v3 4/6] nouveau: add support for sending debug messages via KHR_debug

2015-10-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nouveau_context.h | 4 src/gallium/drivers/nouveau/nouveau_screen.c| 19 +++ src/gallium/drivers/nouveau/nv30/nv30_context.c | 1 + src/gallium/drivers/nouveau/nv50/nv50_context.c | 1 + src/gallium/drivers/n

[Mesa-dev] [PATCH v3 1/6] gallium: expose a debug message callback settable by context owner

2015-10-30 Thread Ilia Mirkin
This will allow gallium drivers to send messages to KHR_debug endpoints Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/util/u_debug.c | 16 src/gallium/auxiliary/util/u_debug.h | 24 src/gallium/docs/source/context.rst | 3 +++ src/gallium/includ

[Mesa-dev] [PATCH v3 5/6] nv50, nvc0: provide debug messages with shader compilation stats

2015-10-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h | 1 + src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp | 2 ++ src/gallium/drivers/nouveau/nv50/nv50_program.c| 8 +++- src/gallium/drivers/nouveau/nv50/nv50_program.h| 3 ++- src/gall

[Mesa-dev] [PATCH v3 3/6] st/clover: provide a path for drivers to call through to pfn_notify

2015-10-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/state_trackers/clover/api/context.cpp | 2 +- src/gallium/state_trackers/clover/core/context.cpp | 18 -- src/gallium/state_trackers/clover/core/context.hpp | 13 - src/gallium/state_trackers/clover/core/queue.cpp | 20 +++

[Mesa-dev] [PATCH v3 6/6] nouveau: send back a debug message when waiting for a fence to complete

2015-10-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nouveau_buffer.c | 13 +++-- src/gallium/drivers/nouveau/nouveau_context.h| 1 + src/gallium/drivers/nouveau/nouveau_fence.c | 14 -- src/gallium/drivers/nouveau/nouveau_fence.h | 4 +++- src/galliu

[Mesa-dev] [PATCH v3 2/6] st/mesa: set debug callback for debug contexts

2015-10-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_manager.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 7abd128..2625fc8 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/m

Re: [Mesa-dev] [PATCH 1/2] mesa: fix uniforms calculation in glGetProgramiv

2015-10-30 Thread Tapani Pälli
On 10/30/2015 05:57 PM, Ilia Mirkin wrote: On Fri, Oct 30, 2015 at 8:30 AM, Tapani Pälli wrote: Since introduction of SSBO, UniformStorage contains not just uniforms but also buffer variables, this needs to be taken in to account when calculating active uniforms with GL_ACTIVE_UNIFORMS and GL_A

Re: [Mesa-dev] [PATCH] main: Match DispatchCompute* API validation from main specification

2015-10-30 Thread Jordan Justen
On 2015-10-30 00:16:43, Iago Toral wrote: > On Wed, 2015-10-14 at 13:46 -0700, Jordan Justen wrote: > > There is a discrepancy between the ARB_compute_shader specification, > > and the OpenGL 4.3 and OpenGLES 3.1 specifications. With regards to > > the indirect dispatch parameter, unsupported value

[Mesa-dev] [PATCH 3/7] i965/sched: get rid of the LIFO heuristic

2015-10-30 Thread Connor Abbott
In the future, we're going to rewrite the scheduler to switch to a more conservative heuristic if it goes over a register pressure limit, and turn it into a bottom-up scheduler. The LIFO heuristic is more difficult with a limit-based scheduler, since it's not clear when to switch to LIFO and when t

[Mesa-dev] [PATCH 5/7] i965/sched: switch to bottom-up scheduling

2015-10-30 Thread Connor Abbott
Previously, our scheduler was doing top-down scheduling, scheduling from the beginning to the end. But top-down scheduling isn't good for scheduling things with many nodes with no input dependencies (i.e. many reads) and few nodes with no output dependencies (i.e. few writes), which is generally tr

[Mesa-dev] [PATCH 6/7] i965/sched: use Sethi-Ullman numbering

2015-10-30 Thread Connor Abbott
Sethi-Ullman numbering is a heuristic that lets us see a little farther when it comes to making decisions based on register pressure, instead of only greedily trying to decrease register pressure based on a threshold. It provides a lower bound on the number of registers required to schedule a node

[Mesa-dev] [PATCH 7/7] i965/fs: use a better heuristic for SIMD16

2015-10-30 Thread Connor Abbott
Previously, we presumed that any SIMD16 program that spilled wasn't worth it, and failed to compile SIMD16 if it spilled at all. But that isn't a real measure of why SIMD16 helps over SIMD8 at all. SIMD16 helps because, among a few other things, it helps reduce pipeline and hide latency. In other w

[Mesa-dev] [PATCH 1/7] i965: use real latencies in the pre-RA scheduler

2015-10-30 Thread Connor Abbott
Before, we simply assumed that reducing register pressure was the number one priority in the pre-RA scheduler, and set the latency of every instruction to 1 to get the scheduler to ignore it. But for the aggressive scheduler, this doesn't make much sense. It can also allow the register allocator to

[Mesa-dev] [PATCH 2/7] i965/sched: use a critical path heuristic

2015-10-30 Thread Connor Abbott
This makes the schedule more aggressive about hiding latency, but being able to dynamically switch to another strategy once our register pressure increases beyond a certain point should help here. total instructions in shared programs: 7460652 -> 7461304 (0.01%) instructions in affected programs:

[Mesa-dev] [PATCH 0/7] More i965 scheduling improvements

2015-10-30 Thread Connor Abbott
This series implements some more aggressive scheduler changes based on the original series that I sent out and now has been merged to master. In particular, it rewrites the scheduler to be bottom-up and top-down, and gives it a fancy new strategy involving a combination of limit scheduling and Seth

[Mesa-dev] [PATCH 4/7] i965/sched: switch to register pressure scheduling dynamically

2015-10-30 Thread Connor Abbott
Now that we keep track of the register pressure, and we don't need to fall back to the LIFO heuristic, it's trivial to be able to switch to a different heuristic when our register pressure exceeds a certain threshold, without worrying about which heuristic. We still need to try to schedule multiple

Re: [Mesa-dev] [PATCH] i965: Clean up FBH code.

2015-10-30 Thread Ian Romanick
On 10/29/2015 05:52 PM, Matt Turner wrote: > It did a bunch of unnecessary stuff, emitting an extra MOV included. > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 +++ > src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 18 +- > 2 files changed, 8 insertions(+), 17 deletions(

Re: [Mesa-dev] [PATCH] i965: Replace default case with list of enum values.

2015-10-30 Thread Ian Romanick
On 10/29/2015 05:52 PM, Matt Turner wrote: > If we add a new file type, we'd like to get warnings if it's not > handled. > > Unfortuately, gcc seems to have bugs (see the XXX). Did you submit a GCC bug? Assuming there are not warnings added, this patch is Reviewed-by: Ian Romanick > --- > sr

[Mesa-dev] [PATCH V2 5/7] i965: add support for image AoA

2015-10-30 Thread Timothy Arceri
From: Timothy Arceri V2: avoid useless zero-initialization and addition for the first AoA level, avoid redundant temporary, make use of type_size_scalar(), rename aoa_size to element_size, assign the indirect indexing temporary directly to image.reladdr, and replace while loop with a for loop. Al

Re: [Mesa-dev] [PATCH 00/11] nir: Add a pass management framework

2015-10-30 Thread Jason Ekstrand
On Fri, Oct 30, 2015 at 2:12 PM, Ian Romanick wrote: > On 10/28/2015 10:01 PM, Jason Ekstrand wrote: >> >> On Oct 28, 2015 9:12 PM, "Kenneth Graunke" > > wrote: >>> >>> On Wednesday, October 28, 2015 02:58:07 PM Kristian Høgsberg wrote: >>> > On Wed, Oct 28, 2015 at 2

Re: [Mesa-dev] [PATCH] i965/sched: don't calculate live intervals for post-RA scheduling

2015-10-30 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Fri, Oct 30, 2015 at 3:19 PM, Connor Abbott wrote: > For some reason, this causes assertions on gm965 only. In any case, it's > unnecessary since we don't need liveness information in the post-RA > scheduler. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?

[Mesa-dev] [PATCH] i965/sched: don't calculate live intervals for post-RA scheduling

2015-10-30 Thread Connor Abbott
For some reason, this causes assertions on gm965 only. In any case, it's unnecessary since we don't need liveness information in the post-RA scheduler. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92744 Cc: Mark Janes Signed-off-by: Connor Abbott --- src/mesa/drivers/dri/i965/brw_sche

Re: [Mesa-dev] [PATCH 00/10] i965: always mark used surfaces in the visitors

2015-10-30 Thread Jordan Justen
On 2015-10-30 09:28:10, Matt Turner wrote: > On Fri, Oct 30, 2015 at 4:11 AM, Iago Toral Quiroga wrote: > > Right now some opcodes that only use constant surface indexing mark them as > > used in the generator while others do it in the visitor. When the opcode can > > handle both direct and indire

[Mesa-dev] [PATCH v2 2/2] nouveau: add support for sending debug messages via KHR_debug

2015-10-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nouveau_context.h | 4 src/gallium/drivers/nouveau/nouveau_screen.c| 19 +++ src/gallium/drivers/nouveau/nv30/nv30_context.c | 1 + src/gallium/drivers/nouveau/nv50/nv50_context.c | 1 + src/gallium/drivers/n

[Mesa-dev] [PATCH v2 1/2] gallium: expose a debug message callback settable by context owner

2015-10-30 Thread Ilia Mirkin
This will allow gallium drivers to send messages to KHR_debug endpoints Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/util/u_debug.h | 38 src/gallium/docs/source/context.rst | 3 +++ src/gallium/include/pipe/p_context.h | 4 src/gallium/includ

Re: [Mesa-dev] [PATCH 3/5] glsl: Mark gl_ViewportIndex and gl_Layer varyings as flat.

2015-10-30 Thread Ian Romanick
On 10/26/2015 05:29 PM, Kenneth Graunke wrote: > On Monday, October 26, 2015 05:02:07 PM Ian Romanick wrote: >> On 10/26/2015 11:03 AM, Kenneth Graunke wrote: >>> Integer varyings need to be flat qualified - all others were already. >>> I think we just missed this. Presumably some hardware passes

[Mesa-dev] [PATCH v2 14/18] mesa: Fix EXT_texture_sRGB functionality leaks

2015-10-30 Thread Nanley Chery
From: Nanley Chery Stop leaks into GLES contexts in _mesa_base_tex_format() and lookup_view_class(). Stop allowing compressed sRGB formats as valid formats in GLES3 contexts. These formats are only exposed to contexts advertising EXT_texture_sRGB. v2. Remove references to pre-1.2 desktop GL con

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] [v3] i965/skl: Add GT4 PCI IDs

2015-10-30 Thread Ben Widawsky
On Fri, Oct 30, 2015 at 01:38:47PM -0700, Ian Romanick wrote: > On 10/29/2015 05:30 PM, Ben Widawsky wrote: > > Like other gen8+ hardware, the hardware automatically scales up thread > > counts > > and URB sizes, so there is no need to do anything but add the PCI IDs. > > Give the v3 change, is t

[Mesa-dev] [PATCH v2 16/18] mesa/extensions: Remove extra memsets on gl_extensions

2015-10-30 Thread Nanley Chery
From: Nanley Chery All gl_extensions structs are zero-initialized by default. There is therefore no need to memset the structs to 0. Also, remove the open-coded memset in _mesa_init_extensions(). v2. Drop the hunk that zero-initializes the global structs (Marek) Signed-off-by: Nanley Chery ---

[Mesa-dev] [PATCH v2 08/18] mesa: Generate a helper function for each extension

2015-10-30 Thread Nanley Chery
From: Nanley Chery Generate functions which determine if an extension is supported in the current context. Initially, enums were going to be explicitly used with _mesa_extension_supported(). The idea to embed the function and enums into generated helper functions was suggested by Kristian Høgsber

[Mesa-dev] [PATCH v2 12/18] mesa: Fix EXT_texture_compression_s3tc functionality leaks

2015-10-30 Thread Nanley Chery
From: Nanley Chery Stop leaks into GLES 1 contexts in _mesa_get_compressed_formats() and lookup_view_class(). The extension spec lists GLES 2.0.25 and 3.0.2 dependencies, so update the extension table accordingly. v2. Remove references to pre-1.2 desktop GL contexts Signed-off-by: Nanley Chery

[Mesa-dev] [PATCH v2 11/18] mesa: Use _mesa_has_3DFX_texture_compression_FXT1()

2015-10-30 Thread Nanley Chery
From: Nanley Chery Replace the open-coded check for extension support with the helper function that determines this support. v2. Don't check for pre-1.2 desktop GL contexts Signed-off-by: Nanley Chery --- src/mesa/main/glformats.c | 3 +-- src/mesa/main/texcompress.c | 3 +-- 2 files change

[Mesa-dev] [PATCH v2 18/18] mesa: Remove gl_extensions::dummy

2015-10-30 Thread Nanley Chery
From: Nanley Chery This variable existed to enable 0 as a valid error value for name_to_offset(). Since o(extension_sentinel) is also a valid error value, save space and replace this mysterious variable with a less mysterious one (extension_sentinel). v2. Reword git comment and update function c

[Mesa-dev] [PATCH v2 15/18] mesa: Fix ARB_texture_compression_bptc functionality leaks

2015-10-30 Thread Nanley Chery
From: Nanley Chery Stop leaks into GLES contexts in _mesa_target_can_be_compressed(). v2. Remove OpenGL 3.1 requirement (Marek, Chad) Signed-off-by: Nanley Chery --- src/mesa/main/glformats.c | 3 +-- src/mesa/main/teximage.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --g

[Mesa-dev] [PATCH v2 10/18] mesa: In helpers, only check driver capability for meta

2015-10-30 Thread Nanley Chery
From: Nanley Chery Make API context and version checks done by the helper functions pass unconditionally while meta is in progress. This transparently makes extension checks solely dependent on struct gl_extensions while in meta. v2. Use 8-bit wide datatype instead GLuint. Signed-off-by: Nanley

[Mesa-dev] [PATCH v2 09/18] mesa/extensions: Prefix global struct and extension type

2015-10-30 Thread Nanley Chery
From: Nanley Chery Rename the following types and variables: * struct extension -> struct mesa_extension, like the mesa_format type. * extension_table -> _mesa_extension_table, like the _mesa_extension_override_{enables,disables} structs. Suggested-by: Marek Olšák Suggested-by: Chad Versace

[Mesa-dev] [PATCH v2 07/18] mesa/extensions: Replace extension::api_set with ::version

2015-10-30 Thread Nanley Chery
From: Nanley Chery The api_set field has no users outside of _mesa_extension_supported(). Remove it and allow the version field to take its place. The brunt of the transformation was performed with the following vim commands: s/\(GL [^,]\+\),\s*\d*,\s*\d*\(,\s*\d*\)\(,\s*\d*\)/\1, GLL, GLC\2\3/g

[Mesa-dev] [PATCH v2 17/18] mesa: Replace gl_extensions::EXT_texture3D with ::dummy_true

2015-10-30 Thread Nanley Chery
From: Nanley Chery Mesa unconditionally sets this driver flag to true in _mesa_init_extensions(). There is therefore no need for the driver to communicate support for this extension. Replace the driver capability flag with ::dummy_true. Signed-off-by: Nanley Chery Reviewed-by: Chad Versace ---

[Mesa-dev] [PATCH v2 13/18] mesa: Fix ASTC extension functionality leak into GLES 1

2015-10-30 Thread Nanley Chery
From: Nanley Chery Stop a leak of ASTC functionality into GLES 1 contexts. v2. Handle ASTC driver capability check in texcompress.c Signed-off-by: Nanley Chery --- src/mesa/main/glformats.c | 4 ++-- src/mesa/main/texcompress.c | 2 +- src/mesa/main/teximage.c| 6 +++--- 3 files changed

[Mesa-dev] [PATCH v2 04/18] mesa/extensions: Add extension::version

2015-10-30 Thread Nanley Chery
From: Nanley Chery Enable limiting advertised extension support by context version with finer granularity. v2. Use uint*t type for version and note the expected values (Emil) Use an 8-bit wide datatype. Reformat macro for better readability (Chad) Signed-off-by: Nanley Chery --- src/m

Re: [Mesa-dev] [PATCH 00/11] nir: Add a pass management framework

2015-10-30 Thread Ian Romanick
On 10/28/2015 10:01 PM, Jason Ekstrand wrote: > > On Oct 28, 2015 9:12 PM, "Kenneth Graunke" > wrote: >> >> On Wednesday, October 28, 2015 02:58:07 PM Kristian Høgsberg wrote: >> > On Wed, Oct 28, 2015 at 2:34 PM, Jason Ekstrand > mailto:ja...@jlekstrand.net>> wrote:

[Mesa-dev] [PATCH v2 06/18] mesa/extensions: Use _mesa_extension_supported()

2015-10-30 Thread Nanley Chery
From: Nanley Chery Replace open-coded checks for extension support with _mesa_extension_supported(). Signed-off-by: Nanley Chery --- src/mesa/main/extensions.c | 54 src/mesa/main/extensions_table.h | 6 ++--- 2 files changed, 14 insertions(+), 4

[Mesa-dev] [PATCH v2 05/18] mesa/extensions: Create _mesa_extension_supported()

2015-10-30 Thread Nanley Chery
From: Nanley Chery Create a function which determines if an extension is supported in the current context. v2. Use common variable names (Emil) Insert new line between variables and return statement (Chad) Rename api_set variable to api_bit (Chad) Signed-off-by: Nanley Chery --- src/m

[Mesa-dev] [PATCH v2 03/18] mesa/extensions: Move entries entries to seperate file

2015-10-30 Thread Nanley Chery
From: Nanley Chery With this infrastructure set in place, we can now reuse the entries to generate useful code. v2. Add the new file into Makefile.sources (Emil) Signed-off-by: Nanley Chery --- src/mesa/Makefile.sources| 1 + src/mesa/main/extensions.c | 321 +-

[Mesa-dev] [PATCH v2 02/18] mesa/extensions: Wrap array entries in macros

2015-10-30 Thread Nanley Chery
From: Nanley Chery Now that we're using macros, remove the redundant text from each entry. Remove comments between the entries to make editing easier and separate the sections with blank lines. Structure the EXT macros in a way that helps reviewers verify that no meaning has been altered. Signe

[Mesa-dev] [PATCH v2 01/18] mesa/extensions: Remove array sentinel

2015-10-30 Thread Nanley Chery
From: Nanley Chery Simplify future updates to the extension struct array by removing the sentinel. Signed-off-by: Nanley Chery --- src/mesa/main/extensions.c | 43 +-- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/mesa/main/extensio

Re: [Mesa-dev] [PATCH 02/11] nir: Add a pass-running infastructure

2015-10-30 Thread Ian Romanick
On 10/28/2015 06:15 PM, Connor Abbott wrote: > On Wed, Oct 28, 2015 at 8:04 PM, Ian Romanick wrote: >> On 10/28/2015 04:43 PM, Connor Abbott wrote: >>> On Wed, Oct 28, 2015 at 7:06 PM, Ian Romanick wrote: On 10/28/2015 02:32 PM, Jason Ekstrand wrote: > --- > src/glsl/nir/nir.h

Re: [Mesa-dev] [PATCH 02/11] nir: Add a pass-running infastructure

2015-10-30 Thread Ian Romanick
On 10/28/2015 06:30 PM, Kenneth Graunke wrote: > On Wednesday, October 28, 2015 05:04:07 PM Ian Romanick wrote: >> On 10/28/2015 04:43 PM, Connor Abbott wrote: >>> On Wed, Oct 28, 2015 at 7:06 PM, Ian Romanick wrote: On 10/28/2015 02:32 PM, Jason Ekstrand wrote: > --- > src/glsl/nir/

Re: [Mesa-dev] [PATCH 02/11] nir: Add a pass-running infastructure

2015-10-30 Thread Ian Romanick
On 10/28/2015 09:26 PM, Ilia Mirkin wrote: > On Wed, Oct 28, 2015 at 8:04 PM, Ian Romanick wrote: >> People often complain about the way that open-source projects are so nit >> picky about coding standards. It's a necessary survival tactic. Mesa >> is 22 years old. It has had dozens of contribu

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] [v3] i965/skl: Add GT4 PCI IDs

2015-10-30 Thread Ian Romanick
On 10/29/2015 05:30 PM, Ben Widawsky wrote: > Like other gen8+ hardware, the hardware automatically scales up thread counts > and URB sizes, so there is no need to do anything but add the PCI IDs. Give the v3 change, is that really true? > FINISHME: This patch still needs testing before merge. >

Re: [Mesa-dev] [PATCH v2 11/11] i965: Add scalar GS input lowering code.

2015-10-30 Thread Kristian Høgsberg
On Mon, Oct 12, 2015 at 02:49:13PM -0700, Kenneth Graunke wrote: > We really ought to compute the VUE map at link time and stash it, rather > than recomputing it here, but with the mess of program structures I > wasn't sure where to put it. We can improve that later. Yeah, this will work for now,

Re: [Mesa-dev] [PATCH 0/7] DRI3 support for EGL (v3)

2015-10-30 Thread Kristian Høgsberg
On Fri, Oct 30, 2015 at 06:03:31PM +0200, Martin Peres wrote: > First of all, I would like to thank Boyan for his work here. I rebased his > patch > series, fixed minor issues here and there and reviewed it. You can check the > changes in every patch but the biggest changes are related to the buil

Re: [Mesa-dev] [PATCH v4 7/9] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-30 Thread Emil Velikov
On 30 October 2015 at 14:48, Daniel Stone wrote: > Hi Julien, > > On 30 October 2015 at 11:32, Julien Isorce wrote: >> Thx for pointing this out. Where are the files related to >> winsys/presentation :) ? > > The one you're changing. ;) > > src/gbm already has a great deal of infrastructure for h

Re: [Mesa-dev] [PATCH] gallium: expose a debug message callback settable by context owner

2015-10-30 Thread Ilia Mirkin
On Fri, Oct 30, 2015 at 12:38 PM, Ilia Mirkin wrote: > On Fri, Oct 30, 2015 at 10:23 AM, Brian Paul wrote: >> On 10/30/2015 01:23 AM, Ilia Mirkin wrote: >>> >>> On Fri, Oct 30, 2015 at 3:17 AM, Ilia Mirkin wrote: This will allow gallium drivers to send messages to KHR_debug endpoints >

Re: [Mesa-dev] [RFC PATCH 00/40] Rework/consolidate the pipe-loader business

2015-10-30 Thread Emil Velikov
On 19 October 2015 at 18:41, Emil Velikov wrote: > On 19 October 2015 at 17:07, Brian Paul wrote: >> >> I'm not too familiar with this code or these changes but I'm wondering how >> much of chance there is of this breaking any driver/target builds. >> >> For example, is there a chance of breakin

Re: [Mesa-dev] [PATCH v2 shader-db] report.py: rework and update for cycle info

2015-10-30 Thread Connor Abbott
Ping. I just pushed the corresponding mesa patch to master yesterday, so I'd like to get this landed in shader-db soon. On Fri, Oct 16, 2015 at 11:09 PM, Connor Abbott wrote: > Now that we have three separate things we want to measure (instructions, > cycles, and loops), it's impractical to keep

Re: [Mesa-dev] [PATCH 00/15] virgl: misc cleanups and bikeshedding

2015-10-30 Thread Emil Velikov
On 29 October 2015 at 21:50, Dave Airlie wrote: > On 29 October 2015 at 21:12, Emil Velikov wrote: >> On 29 October 2015 at 11:12, Emil Velikov wrote: >>> Hi all, >>> >>> A slightly longer series (that builds on top of the previous sent a >>> minute ago), that moves/renames a couple of files, ad

Re: [Mesa-dev] [PATCH] gallium: expose a debug message callback settable by context owner

2015-10-30 Thread Ilia Mirkin
On Fri, Oct 30, 2015 at 10:23 AM, Brian Paul wrote: > On 10/30/2015 01:23 AM, Ilia Mirkin wrote: >> >> On Fri, Oct 30, 2015 at 3:17 AM, Ilia Mirkin wrote: >>> >>> This will allow gallium drivers to send messages to KHR_debug endpoints >>> >>> Signed-off-by: Ilia Mirkin >>> --- >>> >>> This patch

Re: [Mesa-dev] [PATCH 00/10] i965: always mark used surfaces in the visitors

2015-10-30 Thread Matt Turner
On Fri, Oct 30, 2015 at 4:11 AM, Iago Toral Quiroga wrote: > Right now some opcodes that only use constant surface indexing mark them as > used in the generator while others do it in the visitor. When the opcode can > handle both direct and indirect surface indexing then some opcodes handle > only

Re: [Mesa-dev] [PATCH 4/7] egl/x11: Implement dri3 support with loader's dri3 helper

2015-10-30 Thread Matt Turner
On Fri, Oct 30, 2015 at 9:03 AM, Martin Peres wrote: > diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am > index 5c2ba30..cdf2216 100644 > --- a/src/egl/Makefile.am > +++ b/src/egl/Makefile.am > @@ -47,12 +47,18 @@ libEGL_la_LDFLAGS = \ > $(LD_NO_UNDEFINED) > > dri2_backend_FILES = >

[Mesa-dev] [PATCH 2/7] glx/dri3: Convert to use dri3 helper in loader library

2015-10-30 Thread Martin Peres
From: Boyan Ding Signed-off-by: Boyan Ding Reviewed-by: Martin Peres --- configure.ac|4 - src/glx/dri3_glx.c | 1446 ++- src/glx/dri3_priv.h | 96 +--- 3 files changed, 171 insertions(+), 1375 deletions(-) diff --git a/configure.

[Mesa-dev] [PATCH 6/7] egl/x11_dri3: Implement EGL_KHR_image_pixmap

2015-10-30 Thread Martin Peres
From: Boyan Ding v2: from Martin Peres - Replace a tab with spaces Signed-off-by: Boyan Ding Reviewed-by: Martin Peres --- src/egl/drivers/dri2/platform_x11.c | 1 + src/egl/drivers/dri2/platform_x11_dri3.c | 77 +++- 2 files changed, 77 insertions(+), 1 del

[Mesa-dev] [PATCH 4/7] egl/x11: Implement dri3 support with loader's dri3 helper

2015-10-30 Thread Martin Peres
From: Boyan Ding v2: From Martin Peres - Tell we are compiling the dri3 backend in configure.ac - Update the Makefile.am - get rid of the LIBDRM_HAS_RENDERNODE_SUPPORT macro - fix some warnings related to EGLuint64KHR to int64_t conversions - use dri2_get_dri_config to get the __DRIconfig in

[Mesa-dev] [PATCH 0/7] DRI3 support for EGL (v3)

2015-10-30 Thread Martin Peres
First of all, I would like to thank Boyan for his work here. I rebased his patch series, fixed minor issues here and there and reviewed it. You can check the changes in every patch but the biggest changes are related to the build system. Speaking about the build system it seems like scons is not b

[Mesa-dev] [PATCH 3/7] egl_dri2: Add a function to let platform code return dri drawable from _EGLSurface

2015-10-30 Thread Martin Peres
From: Boyan Ding dri3 for EGL will use different struct other than dri2_egl_surface for an EGL surface, the common code only uses __DRIdrawable from that struct, so instead of converting _EGLSurface to dri2_egl_surface, let the platform code return the __DRIdrawable by its own (although the curre

[Mesa-dev] [PATCH 5/7] loader/dri3: Expose function to create __DRIimage from pixmap

2015-10-30 Thread Martin Peres
From: Boyan Ding Used to support EGL_KHR_image_pixmap. Signed-off-by: Boyan Ding Reviewed-by: Martin Peres --- src/loader/loader_dri3_helper.c | 81 + src/loader/loader_dri3_helper.h | 9 + 2 files changed, 58 insertions(+), 32 deletions(-) diff -

[Mesa-dev] [PATCH 7/7] egl: make it clear which platform x11 backend is being used (dri2 or 3)

2015-10-30 Thread Martin Peres
Signed-off-by: Martin Peres --- src/egl/drivers/dri2/egl_dri2.c | 6 +++--- src/egl/drivers/dri2/platform_x11.c | 6 +- src/egl/drivers/dri2/platform_x11_dri3.c | 10 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/s

[Mesa-dev] [PATCH 1/7] loader: Add dri3 helper

2015-10-30 Thread Martin Peres
From: Boyan Ding v2: From Martin Peres - Try to fit in the 80-col limit as much as possible Signed-off-by: Boyan Ding Reviewed-by: Martin Peres --- configure.ac|8 +- src/loader/Makefile.am |9 + src/loader/loader_dri3_helper.c | 1404

Re: [Mesa-dev] [PATCH 1/2] mesa: fix uniforms calculation in glGetProgramiv

2015-10-30 Thread Ilia Mirkin
On Fri, Oct 30, 2015 at 8:30 AM, Tapani Pälli wrote: > Since introduction of SSBO, UniformStorage contains not just uniforms > but also buffer variables, this needs to be taken in to account when > calculating active uniforms with GL_ACTIVE_UNIFORMS and > GL_ACTIVE_UNIFORM_MAX_LENGTH. > > No Pigli

Re: [Mesa-dev] [PATCH 2/2] mesa: check if resource backed by buffer in property queries

2015-10-30 Thread Eduardo Lima Mitev
Patch is, Reviewed-by: Eduardo Lima Mitev On 10/30/2015 01:30 PM, Tapani Pälli wrote: > Patch fixes broken behaviour of queries for following properties, from > ARB_program_interface_query specification: > > GL_OFFSET: > >"For active variables not backed by a buffer object, an offset of >

Re: [Mesa-dev] [PATCH v4 6/9] st/va: add colospace conversion through Video Post Processing

2015-10-30 Thread Julien Isorce
On 30 October 2015 at 11:54, Christian König wrote: > On 29.10.2015 18:40, Julien Isorce wrote: > >> Add support for VPP in the following functions: >> vlVaCreateContext >> vlVaDestroyContext >> vlVaBeginPicture >> vlVaRenderPicture >> vlVaEndPicture >> >> Add support for VAProcFilterNone in: >>

Re: [Mesa-dev] [PATCH v4 7/9] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-30 Thread Daniel Stone
Hi Julien, On 30 October 2015 at 11:32, Julien Isorce wrote: > Thx for pointing this out. Where are the files related to > winsys/presentation :) ? The one you're changing. ;) src/gbm already has a great deal of infrastructure for handling direct connections to DRM/KMS devices, buffer allocatio

Re: [Mesa-dev] [PATCH v4 3/9] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-30 Thread Emil Velikov
On 30 October 2015 at 09:59, Julien Isorce wrote: > > > -Original Message- > From: Emil Velikov [mailto:emil.l.veli...@gmail.com] > Sent: 29 October 2015 19:04 > To: Julien Isorce > Cc: ML mesa-dev > Subject: Re: [Mesa-dev] [PATCH v4 3/9] st/va: implement VaCreateSurfaces2 and > VaQuerySu

Re: [Mesa-dev] [PATCH] gallium: expose a debug message callback settable by context owner

2015-10-30 Thread Brian Paul
On 10/30/2015 01:23 AM, Ilia Mirkin wrote: On Fri, Oct 30, 2015 at 3:17 AM, Ilia Mirkin wrote: This will allow gallium drivers to send messages to KHR_debug endpoints Signed-off-by: Ilia Mirkin --- This patch has a major problem in that it uses GET_CURRENT_CONTEXT. I was thinking of maybe ad

Re: [Mesa-dev] [PATCH 00/10] i965: always mark used surfaces in the visitors

2015-10-30 Thread Francisco Jerez
Iago Toral Quiroga writes: > Right now some opcodes that only use constant surface indexing mark them as > used in the generator while others do it in the visitor. When the opcode can > handle both direct and indirect surface indexing then some opcodes handle > only the constant part in the gener

Re: [Mesa-dev] [PATCH 1/2] mesa: fix uniforms calculation in glGetProgramiv

2015-10-30 Thread Eduardo Lima Mitev
On 10/30/2015 01:30 PM, Tapani Pälli wrote: > Since introduction of SSBO, UniformStorage contains not just uniforms > but also buffer variables, this needs to be taken in to account when > calculating active uniforms with GL_ACTIVE_UNIFORMS and > GL_ACTIVE_UNIFORM_MAX_LENGTH. > > No Piglit regress

Re: [Mesa-dev] [PATCH 10/10] i965/fs: Do not mark used surfaces in FS_OPCODE_FB_WRITE/FS_OPCODE_REP_FB_WRITE

2015-10-30 Thread Francisco Jerez
Iago Toral Quiroga writes: > Do it in the visitor, like we do for other opcodes. Hm... I'm not 100% convinced of this and the texturing changes (patches 3 and 5). It definitely makes sense to do this explicitly in the visitor for the pull constant and dataport surface opcodes, because they tak

Re: [Mesa-dev] [PATCH 09/10] i965/fs: Do not mark used surfaces in FS_OPCODE_GET_BUFFER_SIZE

2015-10-30 Thread Francisco Jerez
Iago Toral Quiroga writes: > Do it in the visitor, like we do for other opcodes. > --- > src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 -- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 5 - > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/src/mesa/drivers/dri/i96

Re: [Mesa-dev] [PATCH 08/10] i965/vec4: Do not mark used surfaces in VS_OPCODE_GET_BUFFER_SIZE

2015-10-30 Thread Francisco Jerez
Iago Toral Quiroga writes: > Do it in the visitor, like we do for other opcodes. > --- > src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 2 -- > src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 6 -- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/mesa/drivers/dr

Re: [Mesa-dev] [PATCH 04/10] i965/vec4: Do not mark used direct surfaces in VS_OPCODE_PULL_CONSTANT_LOAD

2015-10-30 Thread Francisco Jerez
Iago Toral Quiroga writes: > Right now the generator marks direct surfaces as used but leaves marking of > indirect surfaces to the caller. Just make the callers handle marking in both > cases for consistency. > --- > src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 9 - > src/mesa/dri

Re: [Mesa-dev] [PATCH 02/10] i965/fs: Do not mark used direct surfaces in UNIFORM_PULL_CONSTANT_LOAD

2015-10-30 Thread Francisco Jerez
Iago Toral Quiroga writes: > Right now the generator marks direct surfaces as used but leaves marking of > indirect surfaces to the caller. Just make the callers handle marking in both > cases for consistency. > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- > src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH 01/10] i965/fs: Do not mark direct used surfaces in VARYING_PULL_CONSTANT_LOAD

2015-10-30 Thread Francisco Jerez
Francisco Jerez writes: > Iago Toral Quiroga writes: > >> Right now the generator marks direct surfaces as used but leaves marking of >> indirect surfaces to the caller. Just make the callers handle marking in both >> cases for consistency. >> --- >> src/mesa/drivers/dri/i965/brw_fs.cpp

Re: [Mesa-dev] [PATCH 01/10] i965/fs: Do not mark direct used surfaces in VARYING_PULL_CONSTANT_LOAD

2015-10-30 Thread Francisco Jerez
Iago Toral Quiroga writes: > Right now the generator marks direct surfaces as used but leaves marking of > indirect surfaces to the caller. Just make the callers handle marking in both > cases for consistency. > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 4 +++- > src/mesa/drivers/dr

Re: [Mesa-dev] [PATCH 5/7] i965: add support for image AoA

2015-10-30 Thread Francisco Jerez
Timothy Arceri writes: > Cc: Francisco Jerez > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 44 > -- > src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp | 2 ++ > 2 files changed, 30 insertions(+), 16 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_f

Re: [Mesa-dev] [PATCH 4/7] glsl: set image access qualifiers for AoA

2015-10-30 Thread Francisco Jerez
Timothy Arceri writes: > Cc: Francisco Jerez > --- > src/glsl/link_uniforms.cpp | 77 > +- > 1 file changed, 49 insertions(+), 28 deletions(-) > > diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp > index 647aa2b..2a1da07 100644 >

[Mesa-dev] [PATCH 2/2] mesa: check if resource backed by buffer in property queries

2015-10-30 Thread Tapani Pälli
Patch fixes broken behaviour of queries for following properties, from ARB_program_interface_query specification: GL_OFFSET: "For active variables not backed by a buffer object, an offset of -1 is written to ." GL_ARRAY_STRIDE: "For active variables not declared as an array of basic ty

[Mesa-dev] [PATCH 1/2] mesa: fix uniforms calculation in glGetProgramiv

2015-10-30 Thread Tapani Pälli
Since introduction of SSBO, UniformStorage contains not just uniforms but also buffer variables, this needs to be taken in to account when calculating active uniforms with GL_ACTIVE_UNIFORMS and GL_ACTIVE_UNIFORM_MAX_LENGTH. No Piglit regressions. Signed-off-by: Tapani Pälli --- src/mesa/main/s

Re: [Mesa-dev] [PATCH v4 9/9] st/va: add support to export a surface as dmabuf

2015-10-30 Thread Christian König
On 29.10.2015 18:40, Julien Isorce wrote: I.e. implements: VaAcquireBufferHandle VaReleaseBufferHandle for memory of type VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME And apply relatives change to: vlVaMapBuffer vlVaUnMapBuffer vlVaDestroyBuffer Implementation inspired from cgit.freedesktop.org/vaapi/i

Re: [Mesa-dev] [PATCH v4 8/9] st/va: implement VaDeriveImage

2015-10-30 Thread Christian König
On 29.10.2015 18:40, Julien Isorce wrote: And apply relatives change to: vlVaBufferSetNumElements vlVaCreateBuffer vlVaMapBuffer vlVaUnmapBuffer vlVaDestroyBuffer vlVaPutImage It is unfortunate that there is no proper va buffer type and struct for this. Only possible to use VAImageBufferType whi

Re: [Mesa-dev] [PATCH v4 7/9] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-30 Thread Christian König
On 29.10.2015 18:40, Julien Isorce wrote: This patch allows to use gallium vaapi without requiring a X server running for your second graphic card. Signed-off-by: Julien Isorce Reviewed-by: Christian König --- src/gallium/state_trackers/va/Makefile.am | 9 src/gallium/state_tracke

Re: [Mesa-dev] [PATCH v4 6/9] st/va: add colospace conversion through Video Post Processing

2015-10-30 Thread Christian König
On 29.10.2015 18:40, Julien Isorce wrote: Add support for VPP in the following functions: vlVaCreateContext vlVaDestroyContext vlVaBeginPicture vlVaRenderPicture vlVaEndPicture Add support for VAProcFilterNone in: vlVaQueryVideoProcFilters vlVaQueryVideoProcFilterCaps vlVaQueryVideoProcPipelineC

[Mesa-dev] [PATCH v5 02/10] st/va: do not destroy old buffer when new one failed

2015-10-30 Thread Julien Isorce
If formats are not the same vlVaPutImage re-creates the video buffer with the right format. But if the creation of this new video buffer fails then the surface looses its current buffer. Let's just destroy the previous buffer on success. Signed-off-by: Julien Isorce --- src/gallium/state_tracker

[Mesa-dev] [PATCH v5 07/10] st/va: add headless support, i.e. VA_DISPLAY_DRM

2015-10-30 Thread Julien Isorce
This patch allows to use gallium vaapi without requiring a X server running for your second graphic card. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/Makefile.am | 9 src/gallium/state_trackers/va/context.c | 70 --- 2 files changed, 73 inse

[Mesa-dev] [PATCH v5 08/10] st/va: add more errors checks in vlVaBufferSetNumElements and vlVaMapBuffer

2015-10-30 Thread Julien Isorce
Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/state_trackers/va/buffer.c b/src/gallium/state_trackers/va/buffer.c index 8f9ba44..f5b9e81 100644 --- a/src/gallium/state_trackers/va/buffer.c +++ b/src/g

[Mesa-dev] [PATCH v5 03/10] st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

2015-10-30 Thread Julien Isorce
Inspired from http://cgit.freedesktop.org/vaapi/intel-driver/ especially src/i965_drv_video.c::i965_CreateSurfaces2. This patch is mainly to support gstreamer-vaapi and tools that uses this newer libva API. The first advantage of using VaCreateSurfaces2 over existing VaCreateSurfaces, is that it i

[Mesa-dev] [PATCH v5 00/10] st/va: add support for VPP, headless and dmabuf

2015-10-30 Thread Julien Isorce
All these patches have been already reviewed by Emil Velikov. And are now under review by Christian Koenig. This patch serie adds initial support for Video Post Processing. It also implements VaCreateSurfaces2 for common purpose and also to import a dmabuf. It also adds support for headless mode,

  1   2   >