[Mesa-dev] [PATCH] st/mesa: handle indirect samplers in arrays/structs properly (v2)

2016-02-03 Thread Dave Airlie
From: Dave Airlie The state tracker never handled this properly, and it finally annoyed me for the second time so I decided to fix it properly. This is inspired by the NIR sampler lowering code and I only realised NIR seems to do its deref ordering different to GLSL at the last minute, once I go

Re: [Mesa-dev] [PATCH] egl/wayland: Set __DRI_IMAGE_USE_SCANOUT for shared buffers

2016-02-03 Thread Michel Dänzer
On 01.02.2016 12:48, Michel Dänzer wrote: > On 29.01.2016 21:36, Daniel Stone wrote: >> On 29 January 2016 at 03:44, Michel Dänzer wrote: >>> It still sounds like significant work (particularly for somebody like me >>> who isn't very familiar with Wayland details yet). It should be done by >>> som

Re: [Mesa-dev] [PATCH 2/5] android: radeonsi: fix building error in si_shader.c

2016-02-03 Thread Michel Dänzer
On 03.02.2016 12:18, Mauro Rossi wrote: > Hi Michel, > > Patch was updated according to the instructions and log/commit messages > changed. Thanks, but I'm afraid it doesn't match existing compatibility headers very well. > +#ifndef _ANDROID_COMPAT_H_ > +#define _ANDROID_COMPAT_H_ > + > +/* > +

[Mesa-dev] [PATCH] [RFC] st/mesa: handle indirect samplers in arrays/structs properly

2016-02-03 Thread Dave Airlie
From: Dave Airlie The state tracker never handled this properly, and it finally annoyed me for the second time so I decided to fix it properly. This is inspired by the NIR sampler lowering code and I only realised NIR seems to do its deref ordering different to GLSL at the last minute, once I go

Re: [Mesa-dev] [PATCH] glsl: Ensure glsl/ exists before making the lexer/parser.

2016-02-03 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 02/03/2016 10:04 PM, Matt Turner wrote: Reported-by: Jan Ziak <0xe2.0x9a.0...@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93989 --- src/compiler/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/Makefile.am b/src

Re: [Mesa-dev] [PATCH] radeonsi: Dump LLVM IR before optimization passes

2016-02-03 Thread Michel Dänzer
On 04.02.2016 11:28, Michel Dänzer wrote: > From: Michel Dänzer > > Otherwise it's not possible to diagnose problems caused by optimization > passes. Unfortunately, this also seems to dump before some transformation passes which are necessary for the dumped IR to be consumable by LLVM tools such

Re: [Mesa-dev] [PATCH] radeonsi: Dump LLVM IR before optimization passes

2016-02-03 Thread eocallaghan
Reviewed-by: Edward O'Callaghan On 2016-02-04 13:28, Michel Dänzer wrote: From: Michel Dänzer Otherwise it's not possible to diagnose problems caused by optimization passes. Signed-off-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_shader.c | 20 ++-- 1 file changed,

[Mesa-dev] [PATCH] radeonsi: Dump LLVM IR before optimization passes

2016-02-03 Thread Michel Dänzer
From: Michel Dänzer Otherwise it's not possible to diagnose problems caused by optimization passes. Signed-off-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_shader.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/s

[Mesa-dev] [PATCH] glsl: simplify setting of image access qualifiers

2016-02-03 Thread Timothy Arceri
Cc: Francisco Jerez --- src/compiler/glsl/link_uniforms.cpp | 73 - 1 file changed, 16 insertions(+), 57 deletions(-) diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index da39941..fc46ba2 100644 --- a/src/compiler/glsl/

Re: [Mesa-dev] [PATCH 1/2] virgl: reuse screen when fd is already open

2016-02-03 Thread Emil Velikov
On 2 February 2016 at 17:55, Rob Clark wrote: > On Tue, Feb 2, 2016 at 12:13 PM, Emil Velikov > wrote: >> On 31 January 2016 at 19:40, Rob Clark wrote: >>> On Sun, Jan 31, 2016 at 6:18 AM, Emil Velikov >>> wrote: Hi Rob, On 30 January 2016 at 00:36, Rob Herring wrote: > It

[Mesa-dev] [PATCH] nv50/ir: make sure to fetch all sources before creating instruction

2016-02-03 Thread Ilia Mirkin
We must fetch all sources into the instruction stream before generating the instruction that uses them. Otherwise we'll define values after using them, which won't work so well. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 13 - 1 file ch

Re: [Mesa-dev] [PATCH 0/4] radeonsi: experimental support for GPUPerfStudio

2016-02-03 Thread eocallaghan
Can't see any serious issues here and a non-verified `working' instance of GPUPerfStudio is sure better than a crashing one! This series is, Reviewed-by: Edward O'Callaghan On 2016-02-04 00:52, Nicolai Hähnle wrote: Hi, this bunch of patches meets GPUPerfStudio half-way in supporting the

mesa-dev@lists.freedesktop.org

2016-02-03 Thread Miklós Máté
On 02/01/2016 03:51 PM, Miklós Máté wrote: On 12/19/2015 12:24 AM, Marek Olšák wrote: On Fri, Dec 18, 2015 at 11:45 PM, Miklós Máté wrote: On 12/17/2015 01:06 PM, Marek Olšák wrote: On Wed, Dec 16, 2015 at 11:30 PM, Miklós Máté wrote: On 12/16/2015 05:27 PM, Marek Olšák wrote:

Re: [Mesa-dev] [PATCH] mesa: Use SSE prefetch instructions rather than 3DNow instructions

2016-02-03 Thread Roland Scheidegger
I don't see much point in replacing the ones in the _mesa_3dnow_xx functions, but I suppose it's better than missing some, and it shouldn't hurt neither. (There are 3dnow capable cpus not supporting prefetcht1 but supporting prefetch, but there aren't any x64_64 cpus not supporting prefetcht1, so w

[Mesa-dev] [Bug 92869] OpenGL ES 3.0 context creation failure

2016-02-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92869 --- Comment #5 from Ilia Mirkin --- To be clear, an Xorg patch is also necessary: http://cgit.freedesktop.org/xorg/xserver/commit/?id=bc415fb1e0031ad23bda6e9c3f4664532876a0e5 It appears to be included in the 1.18 backport list, not sure about 1

[Mesa-dev] [Bug 92869] OpenGL ES 3.0 context creation failure

2016-02-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92869 Jose Fonseca changed: What|Removed |Added CC||imir...@alum.mit.edu Resolution|-

Re: [Mesa-dev] [PATCH v2] nv50: avoid freeing the symbols if they're about to be stored

2016-02-03 Thread Samuel Pitoiset
On 02/03/2016 09:55 PM, Ilia Mirkin wrote: On Wed, Feb 3, 2016 at 3:47 PM, Samuel Pitoiset wrote: On 02/03/2016 08:00 PM, Ilia Mirkin wrote: Spotted by Coverity Signed-off-by: Ilia Mirkin --- v1 -> v2: forgot to remove the original free... src/gallium/drivers/nouveau/nv50/nv50_prog

[Mesa-dev] [Bug 27512] Illegal instruction _mesa_x86_64_transform_points4_general

2016-02-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27512 --- Comment #19 from Timothy Arceri --- (In reply to Roland Scheidegger from comment #18) > > That doesn't make sense to me. The offset is just part of the memory > operand. Unless the assembler encodes it wrong I can't see why that wouldn't > w

[Mesa-dev] [PATCH] mesa: Use SSE prefetch instructions rather than 3DNow instructions

2016-02-03 Thread Timothy Arceri
From: Patrick Baggett 64-bit Pentium 4 CPUs don't have the 3DNow prefetch instructions which results in an Illegal instruction crash. Cc: Roland Scheidegger Tested-by: Timothy Arceri https://bugs.freedesktop.org/show_bug.cgi?id=27512 --- src/mesa/x86-64/xform4.S | 40 -

Re: [Mesa-dev] [PATCH v2] nv50: avoid freeing the symbols if they're about to be stored

2016-02-03 Thread Ilia Mirkin
On Wed, Feb 3, 2016 at 3:47 PM, Samuel Pitoiset wrote: > > > On 02/03/2016 08:00 PM, Ilia Mirkin wrote: >> >> Spotted by Coverity >> >> Signed-off-by: Ilia Mirkin >> --- >> >> v1 -> v2: forgot to remove the original free... >> >> src/gallium/drivers/nouveau/nv50/nv50_program.c | 9 +++-- >>

Re: [Mesa-dev] [PATCH] st/mesa: fix potential null deref if no shader is passed in

2016-02-03 Thread Samuel Pitoiset
Reviewed-by: Samuel Pitoiset On 02/03/2016 07:53 PM, Ilia Mirkin wrote: Spotted by Coverity Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_atom_storagebuf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c b/src/m

Re: [Mesa-dev] [PATCH v2] nv50: avoid freeing the symbols if they're about to be stored

2016-02-03 Thread Samuel Pitoiset
On 02/03/2016 08:00 PM, Ilia Mirkin wrote: Spotted by Coverity Signed-off-by: Ilia Mirkin --- v1 -> v2: forgot to remove the original free... src/gallium/drivers/nouveau/nv50/nv50_program.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/n

[Mesa-dev] [PATCH] glsl: Ensure glsl/ exists before making the lexer/parser.

2016-02-03 Thread Matt Turner
Reported-by: Jan Ziak <0xe2.0x9a.0...@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93989 --- src/compiler/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/Makefile.am b/src/compiler/Makefile.am index 0bc8e48..f218af1 100644 --- a/src/compiler/Make

Re: [Mesa-dev] [PATCH 2/3] radeonsi: implement PK2H and UP2H opcodes

2016-02-03 Thread Jose Fonseca
On 03/02/16 17:01, Marek Olšák wrote: On Wed, Feb 3, 2016 at 5:37 PM, Roland Scheidegger wrote: Am 03.02.2016 um 10:38 schrieb Michel Dänzer: On 03.02.2016 18:29, Marek Olšák wrote: On Wed, Feb 3, 2016 at 10:19 AM, Michel Dänzer wrote: On 03.02.2016 05:15, Marek Olšák wrote: On Sat, Jan 30

[Mesa-dev] [PATCH v2] nv50: avoid freeing the symbols if they're about to be stored

2016-02-03 Thread Ilia Mirkin
Spotted by Coverity Signed-off-by: Ilia Mirkin --- v1 -> v2: forgot to remove the original free... src/gallium/drivers/nouveau/nv50/nv50_program.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_program.c b/src/gallium/drivers

[Mesa-dev] [PATCH] st/mesa: fix potential null deref if no shader is passed in

2016-02-03 Thread Ilia Mirkin
Spotted by Coverity Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_atom_storagebuf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c b/src/mesa/state_tracker/st_atom_storagebuf.c index a581818..f165cc3 100644 --- a/src

[Mesa-dev] [PATCH] nv50: avoid freeing the symbols if they're about to be stored

2016-02-03 Thread Ilia Mirkin
Spotted by Coverity Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nv50/nv50_program.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_program.c b/src/gallium/drivers/nouveau/nv50/nv50_program.c index 888d62e..e742099

Re: [Mesa-dev] [PATCH] dir-locals.el: set case-offset to 0

2016-02-03 Thread Kristian Høgsberg
On Wed, Feb 3, 2016 at 10:09 AM, Ilia Mirkin wrote: > While this is the default, private .emacs files might have it set to > something else. No harm in forcing it to 0. Not my .emacs, but the patch looks good. Reviewed-by: Kristian Høgsberg > Signed-off-by: Ilia Mirkin > --- > .dir-locals.el

Re: [Mesa-dev] [PATCH 2/3] radeonsi: implement PK2H and UP2H opcodes

2016-02-03 Thread Marek Olšák
On Wed, Feb 3, 2016 at 6:29 PM, Roland Scheidegger wrote: > Am 03.02.2016 um 18:01 schrieb Marek Olšák: >> On Wed, Feb 3, 2016 at 5:37 PM, Roland Scheidegger >> wrote: >>> Am 03.02.2016 um 10:38 schrieb Michel Dänzer: On 03.02.2016 18:29, Marek Olšák wrote: > On Wed, Feb 3, 2016 at 10:1

[Mesa-dev] [PATCH] dir-locals.el: set case-offset to 0

2016-02-03 Thread Ilia Mirkin
While this is the default, private .emacs files might have it set to something else. No harm in forcing it to 0. Signed-off-by: Ilia Mirkin --- .dir-locals.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.dir-locals.el b/.dir-locals.el index d95eb48..4b53931 100644 --- a/.dir-locals.el ++

Re: [Mesa-dev] About drm_hwcomposer (Was Re: About the PixelFormat mappings in drm_gralloc)

2016-02-03 Thread Sean Paul
On Thu, Jan 21, 2016 at 10:00 AM, Sean Paul wrote: > > > On Wed, Jan 20, 2016 at 8:49 PM, Chih-Wei Huang > wrote: > >> CC to the android-x86 devel list so more developers can follow. >> >> 2016-01-21 6:19 GMT+08:00 Rob Clark : >> > On Wed, Jan 20, 2016 at 4:59 PM, Rob Herring wrote: >> >> Hi Se

Re: [Mesa-dev] [PATCH 2/3] radeonsi: implement PK2H and UP2H opcodes

2016-02-03 Thread Roland Scheidegger
Am 03.02.2016 um 18:29 schrieb Roland Scheidegger: > Am 03.02.2016 um 18:01 schrieb Marek Olšák: >> On Wed, Feb 3, 2016 at 5:37 PM, Roland Scheidegger >> wrote: >>> Am 03.02.2016 um 10:38 schrieb Michel Dänzer: On 03.02.2016 18:29, Marek Olšák wrote: > On Wed, Feb 3, 2016 at 10:19 AM, Mi

Re: [Mesa-dev] [PATCH 2/3] radeonsi: implement PK2H and UP2H opcodes

2016-02-03 Thread Roland Scheidegger
Am 03.02.2016 um 18:01 schrieb Marek Olšák: > On Wed, Feb 3, 2016 at 5:37 PM, Roland Scheidegger wrote: >> Am 03.02.2016 um 10:38 schrieb Michel Dänzer: >>> On 03.02.2016 18:29, Marek Olšák wrote: On Wed, Feb 3, 2016 at 10:19 AM, Michel Dänzer wrote: > On 03.02.2016 05:15, Marek Olšák wr

[Mesa-dev] [Bug 27512] Illegal instruction _mesa_x86_64_transform_points4_general

2016-02-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27512 --- Comment #18 from Roland Scheidegger --- (In reply to Timothy Arceri from comment #17) > (In reply to Michael Harder from comment #15) > > It worked for a few days but now I get this: > > > > [Thread debugging using libthread_db enabled] > >

[Mesa-dev] [PATCH 4/4] st/mesa: bail out of try_pbo_upload_common when constant upload fails

2016-02-03 Thread Nicolai Hähnle
From: Nicolai Hähnle Also fixes a resource leak when an upload_mgr is used for constants. --- src/mesa/state_tracker/st_cb_texture.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 84dfc70..f2b607c 1

[Mesa-dev] [PATCH 1/4] st/mesa: do uploads earlier in try_pbo_upload_common

2016-02-03 Thread Nicolai Hähnle
From: Nicolai Hähnle While rather unlikely, uploads _can_ fail. Doing them earlier means we'll have to restore less state when they do fail, and it's slightly easier to check the restore code. --- src/mesa/state_tracker/st_cb_texture.c | 89 +- 1 file changed, 44

[Mesa-dev] [PATCH 2/4] st/mesa: reduce the scope of sampler_view in try_pbo_upload_common

2016-02-03 Thread Nicolai Hähnle
From: Nicolai Hähnle We can get rid of our reference immediately, since the driver will hold onto it for us. --- src/mesa/state_tracker/st_cb_texture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb

[Mesa-dev] [PATCH 3/4] st/mesa: bail out of try_pbo_upload_common when vertex upload fails

2016-02-03 Thread Nicolai Hähnle
From: Nicolai Hähnle At the same time, fix a memory leak noticed by Ilia Mirkin. --- src/mesa/state_tracker/st_cb_texture.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 7429711

Re: [Mesa-dev] [PATCH 2/3] radeonsi: implement PK2H and UP2H opcodes

2016-02-03 Thread Marek Olšák
On Wed, Feb 3, 2016 at 5:37 PM, Roland Scheidegger wrote: > Am 03.02.2016 um 10:38 schrieb Michel Dänzer: >> On 03.02.2016 18:29, Marek Olšák wrote: >>> On Wed, Feb 3, 2016 at 10:19 AM, Michel Dänzer wrote: On 03.02.2016 05:15, Marek Olšák wrote: > On Sat, Jan 30, 2016 at 12:46 AM, Marek

Re: [Mesa-dev] [PATCH v2 07/11] gallium: add a way to store query result into buffer

2016-02-03 Thread Marek Olšák
On Wed, Feb 3, 2016 at 4:59 PM, Ilia Mirkin wrote: > On Wed, Feb 3, 2016 at 5:07 AM, Marek Olšák wrote: >> On Sun, Jan 31, 2016 at 9:32 PM, Ilia Mirkin wrote: >>> Signed-off-by: Ilia Mirkin >>> --- >>> src/gallium/docs/source/context.rst | 5 + >>> src/gallium/include/pipe/p_context.h |

Re: [Mesa-dev] [PATCH 2/3] radeonsi: implement PK2H and UP2H opcodes

2016-02-03 Thread Roland Scheidegger
Am 03.02.2016 um 10:38 schrieb Michel Dänzer: > On 03.02.2016 18:29, Marek Olšák wrote: >> On Wed, Feb 3, 2016 at 10:19 AM, Michel Dänzer wrote: >>> On 03.02.2016 05:15, Marek Olšák wrote: On Sat, Jan 30, 2016 at 12:46 AM, Marek Olšák wrote: > From: Marek Olšák > > Based on a ga

Re: [Mesa-dev] [PATCH 7/7] radeonsi: Enable ARB_framebuffer_no_attachments

2016-02-03 Thread Marek Olšák
On Wed, Feb 3, 2016 at 1:09 PM, Ilia Mirkin wrote: > I've sent a few tests to cover samples, but haven't quite been able to work > out the implication of layered vs non. I guess the main thing is to assure that primitives with gl_Layer >= 0 aren't discarded by the rasterizer. Marek _

[Mesa-dev] [PATCH v2 63/65] mesa/glformats: Consider DEPTH/STENCIL when resolving a mesa_format

2016-02-03 Thread Eduardo Lima Mitev
_mesa_format_from_format_and_type() is currently not considering DEPTH and STENCIL formats, which are not array formats and are not handled anywhere. This patch adds cases for common combinations of DEPTH/STENCIL format and types. --- src/mesa/main/glformats.c | 21 + 1 file c

Re: [Mesa-dev] [PATCH 63/65] mesa/glformats: Consider DEPTH/STENCIL when resolving a mesa_format

2016-02-03 Thread Ilia Mirkin
On Wed, Feb 3, 2016 at 10:57 AM, Eduardo Lima Mitev wrote: > On 02/03/2016 04:53 PM, Ilia Mirkin wrote: >> On Wed, Feb 3, 2016 at 10:45 AM, Eduardo Lima Mitev wrote: >>> _mesa_format_from_format_and_type() is currently not considering DEPTH and >>> STENCIL formats, which are not array formats and

Re: [Mesa-dev] [PATCH v2 07/11] gallium: add a way to store query result into buffer

2016-02-03 Thread Ilia Mirkin
On Wed, Feb 3, 2016 at 5:07 AM, Marek Olšák wrote: > On Sun, Jan 31, 2016 at 9:32 PM, Ilia Mirkin wrote: >> Signed-off-by: Ilia Mirkin >> --- >> src/gallium/docs/source/context.rst | 5 + >> src/gallium/include/pipe/p_context.h | 22 ++ >> src/gallium/include/pipe/p_de

Re: [Mesa-dev] [PATCH 63/65] mesa/glformats: Consider DEPTH/STENCIL when resolving a mesa_format

2016-02-03 Thread Eduardo Lima Mitev
On 02/03/2016 04:53 PM, Ilia Mirkin wrote: > On Wed, Feb 3, 2016 at 10:45 AM, Eduardo Lima Mitev wrote: >> _mesa_format_from_format_and_type() is currently not considering DEPTH and >> STENCIL formats, which are not array formats and are not handled anywhere. >> >> This patch adds cases for common

[Mesa-dev] [PATCH 20/65] mesa/main: not fill mesa_error on _mesa_legal_texture_base_format_for_target

2016-02-03 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro This would allow to use this method if you are just querying if it is allowed, like for arb_internalformat_query2. --- src/mesa/main/teximage.c | 18 +- src/mesa/main/teximage.h | 4 +--- src/mesa/main/texstorage.c | 8 3 files changed, 10 i

Re: [Mesa-dev] [PATCH 63/65] mesa/glformats: Consider DEPTH/STENCIL when resolving a mesa_format

2016-02-03 Thread Ilia Mirkin
On Wed, Feb 3, 2016 at 10:45 AM, Eduardo Lima Mitev wrote: > _mesa_format_from_format_and_type() is currently not considering DEPTH and > STENCIL formats, which are not array formats and are not handled anywhere. > > This patch adds cases for common combinations of DEPTH/STENCIL format and > types

[Mesa-dev] [PATCH 26/65] mesa/main: Extend _mesa_base_format_has_channel to accept new pnames

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes The new pnames accepted by the function are: - INTERNALFORMAT_RED_SIZE - INTERNALFORMAT_GREEN_SIZE - INTERNALFORMAT_BLUE_SIZE - INTERNALFORMAT_ALPHA_SIZE - INTERNALFORMAT_DEPTH_SIZE - INTERNALFORMAT_STENCIL_SIZE - INTERN

[Mesa-dev] [PATCH 12/65] mesa/formatquery: Added function to validate parameters

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes Handles the cases where an error should be returned according to the ARB_internalformat_query and ARB_internalformat_query2 specifications. --- src/mesa/main/formatquery.c | 227 1 file changed, 227 insertions(+) diff --git a/src/

[Mesa-dev] [PATCH 63/65] mesa/glformats: Consider DEPTH/STENCIL when resolving a mesa_format

2016-02-03 Thread Eduardo Lima Mitev
_mesa_format_from_format_and_type() is currently not considering DEPTH and STENCIL formats, which are not array formats and are not handled anywhere. This patch adds cases for common combinations of DEPTH/STENCIL format and types. --- src/mesa/main/glformats.c | 15 +++ 1 file changed

[Mesa-dev] [PATCH 65/65] i965: Enable the ARB_internalformat_query2 extension

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes --- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 889f7cb..4392112 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +

[Mesa-dev] [PATCH 42/65] mesa/formatquery: Added SRGB_{READ, WRITE} queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- SRGB_READ: The support for converting from sRGB colorspace on read operations (see section 3.9.18) from the resource is returned in . Possible values returned are FULL_SUPPORT, CAVEAT_SUPPORT, or NONE.

[Mesa-dev] [PATCH 64/65] i965/formatquery: Add support for INTERNALFORMAT_PREFERRED query

2016-02-03 Thread Eduardo Lima Mitev
This pname is tricky. The spec states that an internal format should be returned, that is compatible with the passed internal format, and has at least the same precision. There is no clear API to resolve this. The closest we have (and what other drivers (i.e, NVidia proprietary) do, is to return t

[Mesa-dev] [PATCH 61/65] mesa/formatquery: Add (GET_)TEXTURE_IMAGE_FORMAT pnames

2016-02-03 Thread Eduardo Lima Mitev
--- src/mesa/main/formatquery.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 0b09c70..d378d1d 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -649,6 +649,21

[Mesa-dev] [PATCH 44/65] mesa/formatquery: Added queries related to texture sampling in shaders

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- VERTEX_TEXTURE: The support for using the resource as a source for texture sampling in a vertex shader is written to . - TESS_CONTROL_TEXTURE: The support for using the resource as a source for texture s

[Mesa-dev] [PATCH 54/65] mesa/formatquery: Added texture gather/shadow related queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- TEXTURE_SHADOW: The support for using the resource with shadow samplers is written to . - TEXTURE_GATHER: The support for using the resource with texture gather operations is written to . - TEXTURE_

[Mesa-dev] [PATCH 56/65] mesa/texparam: make public target_allows_setting_sampler_parameters

2016-02-03 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro In order to allow to be used on ARB_internalformat_query2 implementation. --- src/mesa/main/texparam.c | 32 src/mesa/main/texparam.h | 3 +++ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/mesa/main/texparam.c b/src

[Mesa-dev] [PATCH 62/65] mesa/formatquery: Add (GET_)TEXTURE_IMAGE_TYPE pnames

2016-02-03 Thread Eduardo Lima Mitev
These basically reuse the default implementation of GL_READ_PIXELS_TYPE. --- src/mesa/main/formatquery.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index d378d1d..953d2a0 100644 --- a/src/mesa/main/fo

[Mesa-dev] [PATCH 49/65] mesa/formatquery: Added simultaneous texture and depth/stencil queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST: The support for using the resource both as a source for texture sampling while it is bound as a buffer for depth test is written to . For example, a depth (or stencil)

[Mesa-dev] [PATCH 45/65] mesa/shaderimage: Make is_image_format_supported public

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes It will be used by the ARB_internalformat_query2 implementation to implement queries related to the ARB_shader_image_load_store extension. --- src/mesa/main/shaderimage.c | 13 + src/mesa/main/shaderimage.h | 8 2 files changed, 13 insertions(+), 8 delet

[Mesa-dev] [PATCH 60/65] mesa/formatquery: Add READ_PIXELS_TYPE pname

2016-02-03 Thread Eduardo Lima Mitev
We call the driver to provide its preferred type, but also provide a default implementation that selects a generic type based on the passed internal format. --- src/mesa/main/formatquery.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/

[Mesa-dev] [PATCH 59/65] mesa/formatquery: Add READ_PIXELS_FORMAT pname

2016-02-03 Thread Eduardo Lima Mitev
--- src/mesa/main/formatquery.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index ba43dfc..81d2b6d 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -593,9 +59

[Mesa-dev] [PATCH 55/65] mesa/formatquery: Added framebuffer renderability related queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- FRAMEBUFFER_RENDERABLE: The support for rendering to the resource via framebuffer attachment is returned in . - FRAMEBUFFER_RENDERABLE_LAYERED: The support for layered rendering to the resource via frame

[Mesa-dev] [PATCH 43/65] mesa/formatquery: Added SRGB_DECODE_ARB query

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- SRGB_DECODE_ARB: The support for toggling whether sRGB decode happens at sampling time (see EXT/ARB_texture_sRGB_decode) for the resource is returned in . Possible values returned are FULL_SUPPORT, CAVE

[Mesa-dev] [PATCH 46/65] mesa/formatquery: Added SHADER_IMAGE_{LOAD, STORE, ATOMIC} queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- SHADER_IMAGE_LOAD: The support for using the resource with image load operations in shaders is written to . In this case the is the value of the parameter that would be passed to BindImageTexture.

[Mesa-dev] [PATCH 58/65] mesa/formatquery: Add support for READ_PIXELS query

2016-02-03 Thread Eduardo Lima Mitev
This is supported since very early version of OpenGL, but we still call the driver to give it the opportunity to report caveat or no support. --- src/mesa/main/formatquery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquer

[Mesa-dev] [PATCH 48/65] mesa/formatquery: Added queries related to image textures

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- IMAGE_TEXEL_SIZE: The size of a texel when the resource when used as an image texture is returned in . This is the value from the /Size/ column in Table 3.22. If the resource is not supported for image

[Mesa-dev] [PATCH 50/65] mesa/formatquery: Added compressed texture related queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- TEXTURE_COMPRESSED: If is a compressed format that is supported for this type of resource, TRUE is returned in . If the internal format is not compressed, or the type of resource is not supported, FALS

[Mesa-dev] [PATCH 53/65] mesa/formatquery: Added texture view related queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- TEXTURE_VIEW: The support for using the resource with the TextureView command is returned in . Possible values returned are FULL_SUPPORT, CAVEAT_SUPPORT, or NONE. If the resource or operation is not sup

[Mesa-dev] [PATCH 51/65] mesa/formatquery: Added CLEAR_BUFFER query

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- CLEAR_BUFFER: The support for using the resource with ClearBuffer*Data commands is returned in . Possible values returned are FULL_SUPPORT, CAVEAT_SUPPORT, or NONE. If the resource or operation is not s

[Mesa-dev] [PATCH 52/65] mesa/textureview: Make _lookup_view_class public

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes It will be used by the ARB_internalformat_query2 implementation to implement the VIEW_COMPATIBILITY_CLASS query. --- src/mesa/main/textureview.c | 12 src/mesa/main/textureview.h | 8 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/

[Mesa-dev] [PATCH 47/65] mesa/shaderimage: Added func to get the GL_IMAGE_CLASS from the format

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes It will be used by the ARB_internalformat_query2 implementation to implement the IMAGE_COMPATIBILITY_CLASS query. --- src/mesa/main/shaderimage.c | 45 + src/mesa/main/shaderimage.h | 6 ++ 2 files changed, 51 insertions(+) d

[Mesa-dev] [PATCH 57/65] mesa/formatquery: added FILTER pname support

2016-02-03 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro It discards out the targets and internalformats that explicitly mention (per-spec) that doesn't support filter types other than NEAREST or NEAREST_MIPMAP_NEAREST. Those are: * Texture buffers target * Multisample targets * Any integer internalformat For the case of

[Mesa-dev] [PATCH 35/65] mesa/formatquery: Added {COLOR, DEPTH, STENCIL}_COMPONENTS queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes --- src/mesa/main/formatquery.c | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 571af91..966d210 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/fo

[Mesa-dev] [PATCH 38/65] mesa/genmipmap: Added a function to validate the internalformat

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes It will be used by the ARB_internalformat_query2 implementation to implement mipmap related queries. --- src/mesa/main/genmipmap.c | 16 src/mesa/main/genmipmap.h | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/genmipma

[Mesa-dev] [PATCH 40/65] mesa/glformats: Add a helper function _mesa_is_srgb_format()

2016-02-03 Thread Eduardo Lima Mitev
Returns true if the passed format is an sRGB format, false otherwise. --- src/mesa/main/glformats.c | 45 + src/mesa/main/glformats.h | 3 +++ 2 files changed, 48 insertions(+) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 87

[Mesa-dev] [PATCH 33/65] mesa/teximage: add _mesa_is_cube_map_texture utility method

2016-02-03 Thread Eduardo Lima Mitev
--- src/mesa/main/teximage.c | 18 ++ src/mesa/main/teximage.h | 4 2 files changed, 22 insertions(+) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 250d758..4cca396 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -256,6 +256,2

[Mesa-dev] [PATCH 32/65] main/formatquery: support for MAX_{WIDTH/HEIGHT/DEPTH/LAYERS}

2016-02-03 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro Implemented by calling GetIntegerv with the equivalent pname and handling individually the exceptions related to dimensions. All those pnames are used to get the maximum value for each dimension of the given target. The only difference between this calls and calling GetIn

[Mesa-dev] [PATCH 28/65] mesa/formatquery: Added INTERNALFORMAT_{X}_{SIZE, TYPE} queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 spec: "- INTERNALFORMAT_RED_SIZE - INTERNALFORMAT_GREEN_SIZE - INTERNALFORMAT_BLUE_SIZE - INTERNALFORMAT_ALPHA_SIZE - INTERNALFORMAT_DEPTH_SIZE - INTERNALFORMAT_STENCIL_SIZE - INTERNALFORMAT_SHARED_SIZE For u

[Mesa-dev] [PATCH 31/65] mesa/formatquery: support for IMAGE_FORMAT_COMPATIBILITY_TYPE

2016-02-03 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro From arb_internalformat_query2 spec: "IMAGE_FORMAT_COMPATIBILITY_TYPE: The matching criteria use for the resource when used as an image textures is returned in . This is equivalent to calling GetTexParameter with set to IMAGE_FORMAT_COMPATIBILITY_TYPE." Current i

[Mesa-dev] [PATCH 37/65] mesa/genmipmap: Added a function to check if the target is valid

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes It will be used by the ARB_internalformat_query2 implementation to implement mipmap related queries. --- src/mesa/main/genmipmap.c | 34 +- src/mesa/main/genmipmap.h | 3 +++ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 39/65] mesa/formatquery: Added mipmap related queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes Specifically MIPMAP, MANUAL_GENERATE_MIPMAP and AUTO_GENERATE_MIPMAP queries. From the ARB_internalformat_query2 specification: "- MIPMAP: If the resource supports mipmaps, TRUE is returned in . If the resource is not supported, or if mipmaps are not supported for

[Mesa-dev] [PATCH 34/65] mesa/formatquery: support for MAX_COMBINED_DIMENSIONS

2016-02-03 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro It is implemented combining the values returned by calls to the 32-bit query _mesa_GetInternalformati32v. The main reason is simplicity. The other option would be C&P how we implemented the support of GL_MAX_{WIDTH/HEIGHT/DEPTH} and GL_SAMPLES. Additionally, doing this w

[Mesa-dev] [PATCH 36/65] mesa/formatquery: Added {COLOR, DEPTH, STENCIL}_RENDERABLE queries

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes --- src/mesa/main/formatquery.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 966d210..8b523a0 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquer

[Mesa-dev] [PATCH 41/65] mesa/formatquery: Added COLOR_ENCODING query.

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "- COLOR_ENCODING: The color encoding for the resource is returned in . Possible values for color buffers are LINEAR or SRGB, for linear or sRGB-encoded color components, respectively. For non-color forma

[Mesa-dev] [PATCH 30/65] mesa/formatquery: handle unmodified buffer for SAMPLES on the 64-bit query

2016-02-03 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro From arb_internalformat_query2 spec: " If is not color-renderable, depth-renderable, or stencil-renderable (as defined in section 4.4.4), or if does not support multiple samples (ie other than TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY, or RENDERBUFFER

[Mesa-dev] [PATCH 29/65] mesa/formatquery: initial implementation for GetInternalformati64v

2016-02-03 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro It just does a wrapping on the existing 32-bit GetInternalformativ. We will maintain the 32-bit query as default as it is likely that it would be the one most used. --- src/mesa/main/formatquery.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a

[Mesa-dev] [PATCH 27/65] mesa/main: Extend _mesa_get_format_bits to accept new pnames

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes The new pnames accepted by the function are: - INTERNALFORMAT_RED_SIZE - INTERNALFORMAT_GREEN_SIZE - INTERNALFORMAT_BLUE_SIZE - INTERNALFORMAT_ALPHA_SIZE - INTERNALFORMAT_DEPTH_SIZE - INTERNALFORMAT_STENCIL_SIZE It will be used

[Mesa-dev] [PATCH 21/65] mesa/formatquery: Added func to check if the 'resource' is supported

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes Checks that the 'resource', as defined by the ARB_internalformat_query2 specification, is supported by the implementation for those 'pnames' that require this check. --- src/mesa/main/formatquery.c | 91 - 1 file changed, 90 inserti

[Mesa-dev] [PATCH 24/65] mesa/formatquery: Added INTERNALFORMAT_PREFERRED pname

2016-02-03 Thread Eduardo Lima Mitev
--- src/mesa/main/formatquery.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 73eeba4..39ac07e 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -577,6 +577,10 @@ _mesa

[Mesa-dev] [PATCH 25/65] mesa/main: Make legal_get_tex_level_parameter_target public

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes It will be used by the ARB_internalformat_query2 implementation to check if the target is valid for those that are said in the spec that should return the same values than the 'glGetTexLevelParameter{if}v' function: - INTERNALFORMAT_RED_SIZE - INTERNALFORMAT_GREEN_SI

[Mesa-dev] [PATCH 23/65] mesa/formatquery: Added the INTERNALFORMAT_SUPPORTED query

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes --- src/mesa/main/formatquery.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 4ce1709..73eeba4 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -572,

[Mesa-dev] [PATCH 22/65] mesa/formatquery: Added a func to check supported

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 specification: "The INTERNALFORMAT_SUPPORTED can be used to determine if the internal format is supported, and the other are defined in terms of whether or not the format is supported." --- src/mesa/main/formatquery.c | 34 ++

[Mesa-dev] [PATCH 17/65] mesa/main: Added empty skeleton of glGetInternalformati64v

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes --- src/mesa/main/formatquery.c | 16 src/mesa/main/formatquery.h | 4 2 files changed, 20 insertions(+) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index b64469b..60cbb90 100644 --- a/src/mesa/main/formatquery.c +++ b/src/me

[Mesa-dev] [PATCH 15/65] mesa/formatquery: Added boilerplate code to extend GetInternalformativ

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes The goal is to extend the GetInternalformativ query to implement the ARB_internalformat_query2 specification, keeping the behaviour defined by the ARB_internalformat_query if ARB_internalformat_query2 is not supported. --- src/mesa/main/formatquery.c | 442 +++

[Mesa-dev] [PATCH 10/65] mesa: Completely remove QuerySamplesForFormat from driver func table

2016-02-03 Thread Eduardo Lima Mitev
At this point, all uses have been replaced by the more general hook QueryInternalFormat, introduced by ARB_internalformat_query2. --- src/mesa/drivers/common/driverfuncs.c | 1 - src/mesa/main/dd.h| 18 -- src/mesa/main/formatquery.c | 14

[Mesa-dev] [PATCH 18/65] mesa/teximage: make public is_renderable_texture_format

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes It will be used by the ARB_internalformat_query2 implementation to check if the 'internalformat' passed is supported by texture MULTISAMPLE 'targets'. --- src/mesa/main/teximage.c | 6 +++--- src/mesa/main/teximage.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-)

[Mesa-dev] [PATCH 19/65] mesa/teximage: Make _mesa_format_no_online_compression public

2016-02-03 Thread Eduardo Lima Mitev
From: Antia Puentes It will be used by the ARB_internalformat_query2 implementation to check if a certain compressed 'internalformat' is supported by texture 'targets'. --- src/mesa/main/teximage.c | 2 +- src/mesa/main/teximage.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --

[Mesa-dev] [PATCH 07/65] mesa/multisample: Check sample count using the new driver hook

2016-02-03 Thread Eduardo Lima Mitev
Use QueryInternalFormat instead of QuerySamplesForFormat to obtain the highest supported sample. QuerySamplesForFormat is to be removed. --- src/mesa/main/multisample.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multis

  1   2   >