Re: [Mesa-dev] [PATCH 1/2] radeonsi: add max waves / CU to shader stats

2016-01-19 Thread eocallaghan
This series is, Reviewed-by: Edward O'Callaghan On 2016-01-20 12:39, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 33 +--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shad

[Mesa-dev] [PATCH 2/2] nir: Lower ldexp to arithmetic.

2016-01-19 Thread Kenneth Graunke
This is a port of Matt's GLSL IR lowering pass to NIR. It's required because we translate SPIR-V directly to NIR, bypassing GLSL IR. I haven't introduced a lower_ldexp flag, as I believe all current NIR consumers would set the flag. i965 wants this, vc4 doesn't implement this feature, and st_gls

[Mesa-dev] [PATCH 1/2] nir: Let nir_opt_algebraic rules contain unsigned constants > INT_MAX.

2016-01-19 Thread Kenneth Graunke
struct.pack('i', val) interprets `val` as a signed integer, and dies if `val` > INT_MAX. For larger constants, we need to use 'I' which interprets it as an unsigned value. This patch makes us use 'I' for all values >= 0, and 'i' for negative values. This should work in all cases. Signed-off-by:

Re: [Mesa-dev] [PATCH] glsl: add missing explicit_image_format flag to has_layout()

2016-01-19 Thread Francisco Jerez
Timothy Arceri writes: > Fixes piglit regression after fixes to duplicate layout rules. > > Previously catching multiple layouts was relying on the code > meant to catch duplicates within a single layout(...), this > change triggers the rules for multiple layouts. > > Cc: Mark Janes > --- > src

[Mesa-dev] [Bug 85586] Draw module crashes in LLVM generated code since commit 60ec95fa1e0c42bd42358185970b20c9b81591fa

2016-01-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=85586 Michel Dänzer changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [PATCH 1/2] radeonsi: add max waves / CU to shader stats

2016-01-19 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 33 +--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 0c5fd32..5c536f8 100644 --- a/src/galliu

[Mesa-dev] [PATCH 2/2] radeonsi: implement SAMPLEPOS system value without a constant buffer load

2016-01-19 Thread Marek Olšák
From: Marek Olšák We always get per-sample input position. --- src/gallium/drivers/radeonsi/si_shader.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 5c536f8..d788c41

[Mesa-dev] [PATCH 4/4] radeonsi: enable late VS allocation (v2)

2016-01-19 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index f005461..ca32f5c 100644 --- a/src/gallium/drivers/rade

[Mesa-dev] [PATCH 3/4] radeonsi: allow tessellation on CU1 and ES on CU0

2016-01-19 Thread Marek Olšák
From: Marek Olšák We don't use on-chip GS, so it's not required to reserve CU1 for ES. --- src/gallium/drivers/radeonsi/si_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 4b67

[Mesa-dev] [PATCH 2/4] winsys/amdgpu: compute num_good_compute_units correctly

2016-01-19 Thread Marek Olšák
From: Marek Olšák --- src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 9835024..69df363 100644 --- a/src/gallium/

[Mesa-dev] [PATCH 1/4] gallium/radeon: rename max_compute_units -> num_good_compute_units

2016-01-19 Thread Marek Olšák
From: Marek Olšák radeon sets this correctly, but not amdgpu --- src/gallium/drivers/radeon/r600_pipe_common.c | 4 ++-- src/gallium/drivers/radeon/radeon_winsys.h| 2 +- src/gallium/drivers/radeonsi/si_compute.c | 4 ++-- src/gallium/drivers/radeonsi/si_pipe.c| 2

Re: [Mesa-dev] [PATCH] glsl: add missing explicit_image_format flag to has_layout()

2016-01-19 Thread Timothy Arceri
On Tue, 2016-01-19 at 16:28 -0800, Mark Janes wrote: > This patch fixes > arb_shader_image_load_store.compiler.declaration-format-qualifier > -duplicate > tests. However, it regresses 17 other arb_shader_image_load_store > other > tests with: > > Failed to compile fragment shader: 0:20(1): error:

Re: [Mesa-dev] [PATCH] glsl: add missing explicit_image_format flag to has_layout()

2016-01-19 Thread Mark Janes
This patch fixes arb_shader_image_load_store.compiler.declaration-format-qualifier-duplicate tests. However, it regresses 17 other arb_shader_image_load_store other tests with: Failed to compile fragment shader: 0:20(1): error: storage qualifiers must come after precise, invariant, interpolation

Re: [Mesa-dev] [PATCH] glsl: Conditionalize atan2 math.

2016-01-19 Thread Matt Turner
I wonder how you came across that. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] glsl: add missing explicit_image_format flag to has_layout()

2016-01-19 Thread Timothy Arceri
Fixes piglit regression after fixes to duplicate layout rules. Previously catching multiple layouts was relying on the code meant to catch duplicates within a single layout(...), this change triggers the rules for multiple layouts. Cc: Mark Janes --- src/glsl/ast_type.cpp | 1 + 1 file changed,

[Mesa-dev] [PATCH] llvmpipe: warn about illegal use of objects in different contexts

2016-01-19 Thread sroland
From: Roland Scheidegger Doing that is clearly a bug. We can't quite assert as st/mesa may hit this, but increase at least visibility of it a bit. (For the non-refcounted objects it would be illegal too, but we can't detect that unless we'd store the context ourselves. Plus, those don't tend to c

Re: [Mesa-dev] [PATCH] i965/vec4: Use UW type for multiply into accumulator on GEN8+

2016-01-19 Thread Jason Ekstrand
On Tue, Jan 19, 2016 at 12:57 PM, Matt Turner wrote: > On Sat, Jan 16, 2016 at 7:31 PM, Jason Ekstrand > wrote: > > > > On Jan 16, 2016 5:56 PM, "Matt Turner" wrote: > >> > >> On Thu, Jan 14, 2016 at 12:27 PM, Matt Turner > wrote: > >> > On Thu, Jan 14, 2016 at 12:08 PM, Jason Ekstrand < > ja.

[Mesa-dev] [PATCH] glsl: Conditionalize atan2 math.

2016-01-19 Thread Kenneth Graunke
In the old hand-writen implementation of atan2, the calculation of atan(y/x) was performed conditionally in the "then" block of the outermost if statement. I believe I accidentally lifted this out into unconditional code when converting to IR builder. For reference, the original hand-written IR i

Re: [Mesa-dev] [RFC 00/63] ARB_internalformat_query2 on Mesa and i965 backend

2016-01-19 Thread Nanley Chery
On Tue, Jan 19, 2016 at 05:41:40PM +0100, Eduardo Lima Mitev wrote: > Hello, > > This is an RFC series adding support for the ARB_internalformat-query2 > extension: > > https://www.opengl.org/registry/specs/ARB/internalformat_query2.txt > > The corresponding bug is being tracked at: > > https:

Re: [Mesa-dev] [PATCH 2/4] i965: Provide sse2 version for rgba8 <-> bgra8 swizzle

2016-01-19 Thread Matt Turner
On Tue, Jan 19, 2016 at 3:05 PM, Roland Scheidegger wrote: > Ping? Yesterday was a holiday in the US. I'm planning to review this. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/4] i965: Provide sse2 version for rgba8 <-> bgra8 swizzle

2016-01-19 Thread Roland Scheidegger
Ping? Am 17.01.2016 um 22:49 schrieb srol...@vmware.com: > From: Roland Scheidegger > > The existing code used ssse3, and because it isn't compiled in a separate > file compiled with that, it is usually not used (that, of course, could > be fixed...), whereas sse2 is always present at least with

Re: [Mesa-dev] [RFC 11/63] mesa/main: Add extension tracking bit for ARB_internalformat_query2

2016-01-19 Thread Nanley Chery
On Tue, Jan 19, 2016 at 05:41:51PM +0100, Eduardo Lima Mitev wrote: > From: Antia Puentes > > --- > src/mesa/main/extensions_table.h | 1 + > src/mesa/main/mtypes.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/src/mesa/main/extensions_table.h > b/src/mesa/main/extension

Re: [Mesa-dev] [PATCH 2/2] i965: Implement compute sampler state atom.

2016-01-19 Thread Francisco Jerez
Ben Widawsky writes: > On Mon, Jan 18, 2016 at 12:37:18PM -0800, Francisco Jerez wrote: >> Fixes a number of GLES31 CTS failures and hangs on various hardware: >> >> ES31-CTS.texture_gather.plain-gather-depth-2d >> ES31-CTS.texture_gather.plain-gather-depth-2darray >> ES31-CTS.texture_gather.

Re: [Mesa-dev] [PATCH v2] mesa: remove link validation that should be done elsewhere

2016-01-19 Thread Timothy Arceri
On Tue, 2016-01-19 at 14:09 -0800, Ian Romanick wrote: > On 01/05/2016 05:40 PM, Timothy Arceri wrote: > > Even if re-linking fails rendering shouldn't fail as the previous > > succesfully linked program will still be available. It also > > shouldn't > > be possible to have an unlinked program as p

Re: [Mesa-dev] [PATCH] radeonsi: fix discard-only fragment shaders

2016-01-19 Thread Marek Olšák
On Tue, Jan 19, 2016 at 9:13 PM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > When a fragment shader is used that has no outputs but does conditional > discard (KILL_IF), all fragments are killed without this patch. > > By comparing various register settings, my conclusion is that the exec ma

Re: [Mesa-dev] [PATCH v2] mesa: remove link validation that should be done elsewhere

2016-01-19 Thread Ian Romanick
On 01/05/2016 05:40 PM, Timothy Arceri wrote: > Even if re-linking fails rendering shouldn't fail as the previous > succesfully linked program will still be available. It also shouldn't > be possible to have an unlinked program as part of the current rendering > state. > > This fixes a subtest in:

Re: [Mesa-dev] [PATCH 7/7] radeonsi: disable SPI color outputs the shader doesn't write

2016-01-19 Thread Nicolai Hähnle
Apart from two comments on patch #2, the series is Reviewed-by: Nicolai Hähnle On 19.01.2016 11:11, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.h| 4 src/gallium/drivers/radeonsi/si_state_shaders.c | 12 2 files changed, 16 i

Re: [Mesa-dev] [PATCH] i965/vec4: Use UW type for multiply into accumulator on GEN8+

2016-01-19 Thread Matt Turner
On Sat, Jan 16, 2016 at 7:31 PM, Jason Ekstrand wrote: > > On Jan 16, 2016 5:56 PM, "Matt Turner" wrote: >> >> On Thu, Jan 14, 2016 at 12:27 PM, Matt Turner wrote: >> > On Thu, Jan 14, 2016 at 12:08 PM, Jason Ekstrand >> > wrote: >> >> BDW adds the following restriction: "When multiplying DW x

Re: [Mesa-dev] [PATCH 2/7] radeonsi: use SPI_SHADER_COL_FORMAT fields instead of export_16bpc

2016-01-19 Thread Nicolai Hähnle
On 19.01.2016 11:11, Marek Olšák wrote: From: Marek Olšák This does change the behavior slightly: If a shader writes COLOR[i] and that color buffer isn't bound, the shader will export MRT_NULL instead and discard the IR tree that calculates the output. The only exception is alpha-to-co

Re: [Mesa-dev] [PATCH v2] mesa: remove link validation that should be done elsewhere

2016-01-19 Thread Timothy Arceri
On Fri, 2016-01-15 at 08:50 +0200, Tapani Pälli wrote: > > On 01/06/2016 03:40 AM, Timothy Arceri wrote: > > Even if re-linking fails rendering shouldn't fail as the previous > > succesfully linked program will still be available. It also > > shouldn't > > be possible to have an unlinked program a

Re: [Mesa-dev] Allow duplicate layout qualifiers V2

2016-01-19 Thread Matt Turner
On Mon, Jan 18, 2016 at 12:29 AM, Timothy Arceri wrote: > After sending out V1 where I didn't fix the global default > merging (just issued and error), I got motivated and fixed > it properly. > > There are two changes here. > > 1. ARB_enhanced_layouts > > Allows duplicates within a single layout

Re: [Mesa-dev] [PATCH 01/10] tgsi: add MEMBAR opcode to handle memoryBarrier* GLSL intrinsics

2016-01-19 Thread Francisco Jerez
Marek Olšák writes: > On Tue, Jan 19, 2016 at 9:09 PM, Francisco Jerez > wrote: >> Marek Olšák writes: >> >>> On Tue, Jan 19, 2016 at 3:25 AM, Ilia Mirkin wrote: On Mon, Jan 18, 2016 at 6:06 AM, Marek Olšák wrote: > For 1-4, > > Reviewed-by: Marek Olšák > > I'm not

Re: [Mesa-dev] [PATCH] glsl: Restore Mesa-style to shader_enums.c/h.

2016-01-19 Thread Brian Paul
On 01/15/2016 02:44 PM, Matt Turner wrote: On Fri, Jan 15, 2016 at 1:39 PM, Ilia Mirkin wrote: ? (Along with "extern" thrown in for no apparent reason.) Heh :) IIRC, many years ago there was some odd compiler that warned if function prototypes didn't have 'extern' (AIX? Ultrix?). -Bria

Re: [Mesa-dev] [PATCH 0/6] Move nir/glsl to src/compiler, take 2

2016-01-19 Thread Matt Turner
On Mon, Jan 18, 2016 at 4:02 AM, Emil Velikov wrote: > Hi all, > > Here is another attempt at splitting up nir, glsl and the rest. > > The gist is that we have three independent static libraries - compiler, > nir and glsl. Thus we don't need to pull nir if working with glsl and > vice versa. > > F

Re: [Mesa-dev] [PATCH 01/10] tgsi: add MEMBAR opcode to handle memoryBarrier* GLSL intrinsics

2016-01-19 Thread Marek Olšák
On Tue, Jan 19, 2016 at 9:09 PM, Francisco Jerez wrote: > Marek Olšák writes: > >> On Tue, Jan 19, 2016 at 3:25 AM, Ilia Mirkin wrote: >>> On Mon, Jan 18, 2016 at 6:06 AM, Marek Olšák wrote: For 1-4, Reviewed-by: Marek Olšák I'm not very familiar with the code in 2, bu

Re: [Mesa-dev] [PATCH] glx: don't force version == 2.0 for ES2 GLX context creation

2016-01-19 Thread Matt Turner
On Tue, Jan 19, 2016 at 7:08 AM, Ilia Mirkin wrote: > dEQP tests request a specific version. The EXT spec has been updated to > allow other versions, so allow anything >= 2.0 to be requested. > > Signed-off-by: Ilia Mirkin > --- > > The X server was also blocking this... a patch has been sent (pe

[Mesa-dev] [PATCH] radeonsi: fix discard-only fragment shaders (11.1 version)

2016-01-19 Thread Nicolai Hähnle
From: Nicolai Hähnle When a fragment shader is used that has no outputs but does conditional discard (KILL_IF), all fragments are killed without this patch. By comparing various register settings, my conclusion is that the exec mask is either not properly forwarded to the DB by NULL exports or e

Re: [Mesa-dev] [PATCH 01/10] tgsi: add MEMBAR opcode to handle memoryBarrier* GLSL intrinsics

2016-01-19 Thread Francisco Jerez
Marek Olšák writes: > On Tue, Jan 19, 2016 at 3:25 AM, Ilia Mirkin wrote: >> On Mon, Jan 18, 2016 at 6:06 AM, Marek Olšák wrote: >>> For 1-4, >>> >>> Reviewed-by: Marek Olšák >>> >>> I'm not very familiar with the code in 2, but the changes seem reasonable. >>> >>> Also, and I know this is not

Re: [Mesa-dev] [PATCH] mesa: Move sanity check of BindVertexBuffer for OpenGL ES 3.1

2016-01-19 Thread Ian Romanick
On 01/08/2016 05:55 AM, Marta Lofstedt wrote: > From: Marta Lofstedt > > Sanity check of BindVertexBuffer for OpenGL ES in > _mesa_handle_bind_buffer_gen breaks OpenGL ES 2 conformance. What was previously broken, and why does this fix it? I think it's also worth mentioning that this is a rever

Re: [Mesa-dev] [PATCH] gallium: make image views non-persistent objects

2016-01-19 Thread Ilia Mirkin
On Tue, Jan 19, 2016 at 10:42 AM, Nicolai Hähnle wrote: > On 18.01.2016 22:08, Ilia Mirkin wrote: >> >> Make them akin to shader buffers, with no refcounting/etc. Just used to >> pass data about the bound image in ->set_shader_images. >> >> Signed-off-by: Ilia Mirkin >> --- >> >> I don't really s

[Mesa-dev] [PATCH] radeonsi: fix discard-only fragment shaders

2016-01-19 Thread Nicolai Hähnle
From: Nicolai Hähnle When a fragment shader is used that has no outputs but does conditional discard (KILL_IF), all fragments are killed without this patch. By comparing various register settings, my conclusion is that the exec mask is either not properly forwarded to the DB by NULL exports or e

Re: [Mesa-dev] [PATCH] glsl: Restore Mesa-style to shader_enums.c/h.

2016-01-19 Thread Ian Romanick
On 01/15/2016 01:44 PM, Matt Turner wrote: > On Fri, Jan 15, 2016 at 1:39 PM, Ilia Mirkin wrote: >> On Fri, Jan 15, 2016 at 4:34 PM, Matt Turner wrote: >>> --- >>> src/glsl/nir/shader_enums.c | 24 >>> src/glsl/nir/shader_enums.h | 16 >>> 2 files change

Re: [Mesa-dev] [PATCH] gallium: make image views non-persistent objects

2016-01-19 Thread Marek Olšák
On Tue, Jan 19, 2016 at 4:42 PM, Nicolai Hähnle wrote: > On 18.01.2016 22:08, Ilia Mirkin wrote: >> >> Make them akin to shader buffers, with no refcounting/etc. Just used to >> pass data about the bound image in ->set_shader_images. >> >> Signed-off-by: Ilia Mirkin >> --- >> >> I don't really se

Re: [Mesa-dev] [PATCH] arb_shader_subroutine: fix lowering reusing actual parmaters

2016-01-19 Thread Ian Romanick
On 01/16/2016 08:23 PM, Dave Airlie wrote: > From: Dave Airlie > > One of the oglconform tests was crashing here, and it was > due to not cloning the actual parameters before creating the > new call. This makes a call clone function that does the right > things to make sure we clone all the neede

Re: [Mesa-dev] [Mesa-stable] New stable-branch 11.0 candidate pushed

2016-01-19 Thread Oded Gabbay
On Tue, Jan 19, 2016 at 2:48 PM, Emil Velikov wrote: > > Hello list, > > The candidate for the Mesa 11.0.9 is now available. Currently we have: > - 22 queued > - 20 nominated (outstanding) > - and 1 rejected/obsolete patches > > Current queue addressed a few important driver issues - nouveau >

Re: [Mesa-dev] [PATCH v2 01/10] tgsi: add MEMBAR opcode to handle memoryBarrier* GLSL intrinsics

2016-01-19 Thread Roland Scheidegger
Am 19.01.2016 um 18:26 schrieb Ilia Mirkin: > This is designed to map the GLSL intrinsics. Should one have a desire > to also support d3d11, one could figure out what the overlap is and > rejigger the arguments so that both sets of desires are expressible. I > glanced at SM5 sync before doing this,

Re: [Mesa-dev] [PATCH v2 01/10] tgsi: add MEMBAR opcode to handle memoryBarrier* GLSL intrinsics

2016-01-19 Thread Ilia Mirkin
This is designed to map the GLSL intrinsics. Should one have a desire to also support d3d11, one could figure out what the overlap is and rejigger the arguments so that both sets of desires are expressible. I glanced at SM5 sync before doing this, and TBH I couldn't really make sense of it: https:

Re: [Mesa-dev] [PATCH v2 01/10] tgsi: add MEMBAR opcode to handle memoryBarrier* GLSL intrinsics

2016-01-19 Thread Roland Scheidegger
I am actually wondering how well that would work for d3d11. d3d11 just has AllMemoryBarrier, DeviceMemoryBarrier plus GroupMemoryBarrier - and for each of them also a "WithGroupSync" version. Hmm. Roland Am 19.01.2016 um 03:30 schrieb Ilia Mirkin: > Signed-off-by: Ilia Mirkin > Reviewed-by: Mare

[Mesa-dev] [RFC 08/63] mesa/formatquery: Remove tracking of number of elements in the response

2016-01-19 Thread Eduardo Lima Mitev
Currently, the number of integers returned in the response to GetInternalFormativ is being tracked by a 'count' variable. This is so only the modified elements from the temporary buffer are copied into the original user buffer. However, with the introduction of ARB_internalformat_query2, keeping t

[Mesa-dev] [RFC 40/63] mesa/formatquery: Added COLOR_ENCODING query.

2016-01-19 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] [RFC 60/63] mesa/formatquery: Add (GET_)TEXTURE_IMAGE_FORMAT pnames

2016-01-19 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 0f63259..2551476 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -652,6 +652,21

[Mesa-dev] [RFC 59/63] mesa/formatquery: Add READ_PIXELS_TYPE pname

2016-01-19 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] [RFC 58/63] mesa/formatquery: Add READ_PIXELS_FORMAT pname

2016-01-19 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 1b98b82..fc8c10f 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -596,9 +59

[Mesa-dev] [RFC 62/63] i965/formatquery: Add support for INTERNALFORMAT_PREFERRED query

2016-01-19 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] [RFC 56/63] mesa/formatquery: added FILTER pname support

2016-01-19 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] [RFC 61/63] mesa/formatquery: Add (GET_)TEXTURE_IMAGE_TYPE pnames

2016-01-19 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 2551476..158b908 100644 --- a/src/mesa/main/fo

[Mesa-dev] [RFC 63/63] i965: Enable the ARB_internalformat_query2 extension

2016-01-19 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] [RFC 57/63] mesa/formatquery: Add support for READ_PIXELS query

2016-01-19 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] [RFC 50/63] mesa/formatquery: Added CLEAR_BUFFER query

2016-01-19 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] [RFC 55/63] mesa/texparam: make public target_allows_setting_sampler_parameters

2016-01-19 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] [RFC 54/63] mesa/formatquery: Added framebuffer renderability related queries

2016-01-19 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] [RFC 41/63] mesa/formatquery: Added SRGB_{READ, WRITE} queries

2016-01-19 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] [RFC 51/63] mesa/textureview: Make _lookup_view_class public

2016-01-19 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] [RFC 46/63] mesa/shaderimage: Added func to get the GL_IMAGE_CLASS from the format

2016-01-19 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] [RFC 45/63] mesa/formatquery: Added SHADER_IMAGE_{LOAD, STORE, ATOMIC} queries

2016-01-19 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] [RFC 53/63] mesa/formatquery: Added texture gather/shadow related queries

2016-01-19 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] [RFC 42/63] mesa/formatquery: Added SRGB_DECODE_ARB query

2016-01-19 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] [RFC 39/63] mesa/formatquery: Added mipmap related queries

2016-01-19 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] [RFC 44/63] mesa/shaderimage: Make is_image_format_supported public

2016-01-19 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] [RFC 47/63] mesa/formatquery: Added queries related to image textures

2016-01-19 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] [RFC 43/63] mesa/formatquery: Added queries related to texture sampling in shaders

2016-01-19 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] [RFC 52/63] mesa/formatquery: Added texture view related queries

2016-01-19 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] [RFC 48/63] mesa/formatquery: Added simultaneous texture and depth/stencil queries

2016-01-19 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] [RFC 49/63] mesa/formatquery: Added compressed texture related queries

2016-01-19 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] [RFC 36/63] mesa/formatquery: Added {COLOR, DEPTH, STENCIL}_RENDERABLE queries

2016-01-19 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 acf907e..f0ea210 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquer

[Mesa-dev] [RFC 34/63] mesa/formatquery: support for MAX_COMBINED_DIMENSIONS

2016-01-19 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] [RFC 38/63] mesa/genmipmap: Added a function to validate the internalformat

2016-01-19 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] [RFC 32/63] main/formatquery: support for MAX_{WIDTH/HEIGHT/DEPTH/LAYERS}

2016-01-19 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] [RFC 37/63] mesa/genmipmap: Added a function to check if the target is valid

2016-01-19 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] [RFC 35/63] mesa/formatquery: Added {COLOR, DEPTH, STENCIL}_COMPONENTS queries

2016-01-19 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 cf9290f..acf907e 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/fo

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

2016-01-19 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] [RFC 33/63] mesa/teximage: add _mesa_is_cube_map_texture utility method

2016-01-19 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] [RFC 31/63] mesa/formatquery: support for IMAGE_FORMAT_COMPATIBILITY_TYPE

2016-01-19 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] [RFC 26/63] mesa/main: Extend _mesa_base_format_has_channel to accept new pnames

2016-01-19 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] [RFC 28/63] mesa/formatquery: Added INTERNALFORMAT_{X}_{SIZE, TYPE} queries

2016-01-19 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] [RFC 24/63] mesa/formatquery: Added INTERNALFORMAT_PREFERRED pname

2016-01-19 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 da65624..1a3bdbd 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -580,6 +580,10 @@ _mesa

[Mesa-dev] [RFC 29/63] mesa/formatquery: initial implementation for GetInternalformati64v

2016-01-19 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] [RFC 27/63] mesa/main: Extend _mesa_get_format_bits to accept new pnames

2016-01-19 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] [RFC 25/63] mesa/main: Make legal_get_tex_level_parameter_target public

2016-01-19 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] [RFC 16/63] mesa: Add dispatch and extension XML for GL_ARB_internalformat_query2

2016-01-19 Thread Eduardo Lima Mitev
From: Alejandro Piñeiro Equivalent to commit bda540 (that added GL_ARB_internalformat_query) --- src/mapi/glapi/gen/ARB_internalformat_query2.xml | 119 +++ src/mapi/glapi/gen/gl_API.xml| 2 +- src/mesa/main/tests/dispatch_sanity.cpp | 4 + 3

[Mesa-dev] [RFC 18/63] mesa/teximage: make public is_renderable_texture_format

2016-01-19 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] [RFC 05/63] i965/formatquery: Respond queries SAMPLES and NUM_SAMPLE_COUNTS

2016-01-19 Thread Eduardo Lima Mitev
This effectively disables old QuerySamplesForFormat driver hook, since it is never called by Mesa anymore. --- src/mesa/drivers/dri/i965/brw_context.c | 1 - src/mesa/drivers/dri/i965/brw_context.h | 2 -- src/mesa/drivers/dri/i965/brw_formatquery.c | 14 +- 3 files changed,

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

2016-01-19 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] [RFC 20/63] mesa/main: not fill mesa_error on _mesa_legal_texture_base_format_for_target

2016-01-19 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

[Mesa-dev] [RFC 23/63] mesa/formatquery: Added the INTERNALFORMAT_SUPPORTED query

2016-01-19 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 11bf133..da65624 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -575,

[Mesa-dev] [RFC 14/63] mesa/formatquery: Added a func to check if the is supported

2016-01-19 Thread Eduardo Lima Mitev
From: Antia Puentes From the ARB_internalformat_query2 spec: "If the particular and combination do not make sense, or if a particular type of is not supported by the implementation the "unsupported" answer should be given. This is not an error." This function checks if the is sup

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

2016-01-19 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] [RFC 06/63] st/format: Replace QuerySamplesForFormat by new QueryInternalFormat hook

2016-01-19 Thread Eduardo Lima Mitev
The previous code for SAMPLES and NUM_SAMPLE_COUNTS is reused as a private function. --- src/mesa/state_tracker/st_cb_texture.c | 2 +- src/mesa/state_tracker/st_format.c | 38 -- src/mesa/state_tracker/st_format.h | 8 +++ 3 files changed, 40 inserti

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

2016-01-19 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

[Mesa-dev] [RFC 11/63] mesa/main: Add extension tracking bit for ARB_internalformat_query2

2016-01-19 Thread Eduardo Lima Mitev
From: Antia Puentes --- src/mesa/main/extensions_table.h | 1 + src/mesa/main/mtypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index aeccb01..0d3e635 100644 --- a/src/mesa/main/extensions_table.h +++ b/sr

  1   2   >