[Mesa-dev] [PATCH v2 23/29] mesa: Remove (signed) integer pack and span functions.

2014-12-01 Thread Iago Toral Quiroga
These are no longer used now that we moved to _mesa_format_convert. --- src/mesa/main/pack.c | 225 --- src/mesa/main/pack.h | 12 --- 2 files changed, 237 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index a79dd04..6a32820

[Mesa-dev] [PATCH v2 25/29] mesa: Remove _mesa_pack_rgba_span_float and tmp_pack.h

2014-12-01 Thread Iago Toral Quiroga
_mesa_pack_rgba_span_float was the last of the color span functions and we have replaced all calls to it with calls to _mesa_format_convert, so we can remove it together with tmp_pack.h which was used to generate the pack functions for multiple types that were used from the various color span funct

[Mesa-dev] [PATCH v2 16/23] mesa: Add _mesa_pack_uint_rgba_row() format conversion function

2014-12-01 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez We will use this later on to handle uint conversion scenarios in a master convert function. v2: - Modify pack_uint_*() function generation to use c.datatype() and f.datatype(). - Remove UINT_TO_FLOAT() macro usage from pack_uint*() - Remove "if not f.is_normaliz

[Mesa-dev] [PATCH v2 08/29] mesa/pack: use _mesa_format_from_format_and_type in _mesa_pack_rgba_span_from_*

2014-12-01 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez We had previously added the needed mesa formats, so we can simplify the code further. Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/pack.c | 282 +-- 1 file changed, 26 insertions(+), 256 deletions(-)

[Mesa-dev] [PATCH v2 21/23] mesa/pack: use autogenerated format_pack functions

2014-12-01 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Take advantage of new mesa formats and new format_pack functions to reduce source code in _mesa_pack_rgba_span_from_ints() and _mesa_pack_rgba_span_from_uints(). Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/pack.c | 663 +++-

[Mesa-dev] [PATCH v2 10/29] mesa: Add RGBA to Luminance conversion helpers

2014-12-01 Thread Iago Toral Quiroga
For glReadPixels with a Luminance destination format we compute luminance values from RGBA as L=R+G+B. This, however, requires ad-hoc implementation, since pack/unpack functions or _mesa_swizzle_and_convert won't do this (and thus, neither will _mesa_format_convert). This patch adds helpers to do t

[Mesa-dev] [PATCH v2 13/29] mesa: use _mesa_format_convert to implement glReadPixels.

2014-12-01 Thread Iago Toral Quiroga
--- src/mesa/main/readpix.c | 321 +++- 1 file changed, 179 insertions(+), 142 deletions(-) diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index b09cf54..31c0453 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -39,6

[Mesa-dev] [PATCH v2 28/29] mesa: Remove _mesa_rebase_rgba_uint and _mesa_rebase_rgba_float

2014-12-01 Thread Iago Toral Quiroga
These are no longer used anywhere now that we have _mesa_format_convert. --- src/mesa/main/pack.c | 126 --- src/mesa/main/pack.h | 7 --- 2 files changed, 133 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index cb0956c..4f

[Mesa-dev] [PATCH v2 22/29] mesa: Remove _mesa_unpack_color_span_ubyte

2014-12-01 Thread Iago Toral Quiroga
This is no longer used anywhere after moving to _mesa_format_convert. --- src/mesa/main/pack.c | 256 --- src/mesa/main/pack.h | 9 -- 2 files changed, 265 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 1f6da70..a79dd0

[Mesa-dev] [PATCH v2 12/29] mesa: Use _mesa_format_convert to implement texstore_rgba.

2014-12-01 Thread Iago Toral Quiroga
Notice that _mesa_format_convert does not handle byte-swapping scenarios, GL_COLOR_INDEX or MESA_FORMAT_YCBCR(_REV), so these must be handled separately. Also, remove all the code that goes unused after using _mesa_format_convert. --- src/mesa/main/texstore.c | 684 +--

[Mesa-dev] [PATCH v2 18/29] mesa: Replace _mesa_unpack_bitmap with _mesa_unpack_image()

2014-12-01 Thread Iago Toral Quiroga
From: Eduardo Lima Mitev _mesa_unpack_bitmap() was introduced by commit 02b801c to handle the case when data is stored in PBO by display lists, in the context of this bug: Incorrect pixels read back if draw bitmap texture through Display list https://bugs.freedesktop.org/show_bug.cgi?id=10370 S

[Mesa-dev] [PATCH v2 15/29] mesa: Use _mesa_format_convert to implement get_tex_rgba_compressed.

2014-12-01 Thread Iago Toral Quiroga
--- src/mesa/main/texgetimage.c | 73 + 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 024fb4d..f17bb6f 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetim

[Mesa-dev] [PATCH v2 12/23] mesa: Add a _mesa_is_format_color_format helper

2014-12-01 Thread Iago Toral Quiroga
From: Jason Ekstrand --- src/mesa/main/formats.c | 19 +++ src/mesa/main/formats.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index 05b6aea..8eb1838 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c

[Mesa-dev] [PATCH v2 07/29] mesa: Add helper to convert a GL format and type to a mesa (array) format.

2014-12-01 Thread Iago Toral Quiroga
v2 after review by Jason Ekstrand: - Move _mesa_format_from_format_and_type to glformats - Return a mesa_format for GL_UNSIGNED_INT_8_8_8_8(_REV) --- src/mesa/main/formats.c | 18 +++- src/mesa/main/formats.h | 7 ++ src/mesa/main/glformats.c | 259 ++

[Mesa-dev] [PATCH v2 15/23] configure: require python mako module

2014-12-01 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez It is now a hard dependency because of the autogeneration of format pack and unpack functions. Update the documentation to reflect this change. Signed-off-by: Samuel Iglesias Gonsalvez --- configure.ac | 2 ++ docs/install.html

[Mesa-dev] [PATCH v2 01/29] mesa: Add an implementation of a master convert function.

2014-12-01 Thread Iago Toral Quiroga
From: Jason Ekstrand v2 by Iago Toral : - When testing if we can directly pack we should use the src format to check if we are packing from an RGBA format. The original code used the dst format for the ubyte case by mistake. - Fixed incorrect number of bits for dst, it was computed using the

[Mesa-dev] [PATCH v2 23/23] mesa/pack: refactor _mesa_pack_rgba_span_float()

2014-12-01 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Use autogenerated format pack functions and take advantage of some macros to reduce source code, facilitating its maintenance. Unfortunately, dstType == GL_UNSIGNED_SHORT cannot simplified like the others, so keep it as it is. Signed-off-by: Samuel Iglesias Gonsa

[Mesa-dev] [PATCH v2 03/29] mesa: Expose compute_component_mapping as _mesa_compute_component_mapping

2014-12-01 Thread Iago Toral Quiroga
This is necessary to handle conversions between array types where the driver does not support the dst format requested by the client and chooses a different format instead. We will need this in _mesa_format_convert, so move it to format_utils.c, prefix it with '_mesa_' and make it available to oth

[Mesa-dev] [PATCH v2 20/29] mesa: Remove _mesa_make_temp_ubyte_image

2014-12-01 Thread Iago Toral Quiroga
Now that we have _mesa_format_convert we don't need this. texstore_rgba will use the GL_COLOR_INDEX to RGBA conversion helpers instead and compressed formats that used _mesa_make_temp_ubyte_image to create an ubyte RGBA temporary image can call _mesa_texstore with a RGBA/ubyte dst to achieve the s

[Mesa-dev] [PATCH v2 05/29] mesa: Add a helper _mesa_compute_rgba2base2rgba_component_mapping

2014-12-01 Thread Iago Toral Quiroga
This will come in handy when callers of _mesa_format_convert need to compute the rebase swizzle parameter to use. --- src/mesa/main/format_utils.c | 55 src/mesa/main/format_utils.h | 3 +++ 2 files changed, 58 insertions(+) diff --git a/src/mesa/main

[Mesa-dev] [PATCH v2 04/29] mesa: Add a rebase_swizzle parameter to _mesa_format_convert

2014-12-01 Thread Iago Toral Quiroga
The new parameter allows callers to provide a rebase swizzle that the function needs to use to match the requirements of the base internal format involved. This is necessary when the source or destination internal formats (depending on whether we are doing the conversion for a pixel download or a p

[Mesa-dev] [PATCH v2 14/29] mesa: use _mesa_format_convert to implement get_tex_rgba_uncompressed.

2014-12-01 Thread Iago Toral Quiroga
--- src/mesa/main/texgetimage.c | 250 +++- 1 file changed, 133 insertions(+), 117 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index cb5f793..024fb4d 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texget

[Mesa-dev] [PATCH v2 26/29] mesa: Remove _mesa_(un)pack_index_span

2014-12-01 Thread Iago Toral Quiroga
These are not used anywhere. --- src/mesa/main/pack.c | 219 --- src/mesa/main/pack.h | 15 2 files changed, 234 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index b46a6fb..cb0956c 100644 --- a/src/mesa/main/pack.c +++

[Mesa-dev] [PATCH v2 24/29] mesa: Remove _mesa_unpack_color_span_float

2014-12-01 Thread Iago Toral Quiroga
And various helper functions that went unused after removing it. --- src/mesa/main/pack.c | 1033 -- src/mesa/main/pack.h |9 - 2 files changed, 1042 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 6a32820..6baa36e 10

Re: [Mesa-dev] sampler types in tgsi

2014-12-01 Thread Roland Scheidegger
IIRC there were some brief plans to actually deprecate the tex opcodes at some point and just use the sample ones, which would clean up tgsi a bit (having both isn't terribly nice, you can't actually mix them in the same shader etc.). But I think that idea was quickly dropped and not really seriou

Re: [Mesa-dev] sampler types in tgsi

2014-12-01 Thread Marek Olšák
I've got no problem with that if somebody wants to do it. Marek On Mon, Dec 1, 2014 at 1:18 PM, Roland Scheidegger wrote: > IIRC there were some brief plans to actually deprecate the tex opcodes > at some point and just use the sample ones, which would clean up tgsi a > bit (having both isn't t

[Mesa-dev] [PATCH] i965: Make validate_reg tables constant

2014-12-01 Thread Juha-Pekka Heikkila
Declare local tables constant. Also added extra '32' at end of "width_for_reg" to be future proof, cvt function which give indexes to access here could already give index to reach place number five now containing '32'. Signed-off-by: Juha-Pekka Heikkila --- src/mesa/drivers/dri/i965/brw_eu_emit.

[Mesa-dev] [PATCH 03/10] mesa: Returns zero samples when querying GL_NUM_SAMPLE_COUNTS when internal format is integer

2014-12-01 Thread Eduardo Lima Mitev
In GLES3, multisampling is not supported for signed and unsigned integer internal formats. See https://www.khronos.org/opengles/sdk/docs/man3/docbook4/xhtml/glGetInternalformativ.xml. Fixes 19 dEQP tests under 'dEQP-GLES3.functional.state_query.internal_format.*'. --- src/mesa/main/formatquery.c

[Mesa-dev] [PATCH 05/10] glsl: Don't allow gl_FragData[i], with i>0 in GLES shaders

2014-12-01 Thread Eduardo Lima Mitev
The OpenGL ES Shading Language specification describes the values that may be output by a fragment shader. These are gl_FragColor and gl_FragData[0]. Multiple render targets are not supported in GLES. Fixes dEQP test: * dEQP-GLES3.functional.shaders.fragdata.invalid_assign_to_1 --- src/glsl/ast

[Mesa-dev] [PATCH 01/10] mesa: Considers GL_DEPTH_STENCIL_ATTACHMENT a valid argument for FBO invalidation under GLES3

2014-12-01 Thread Eduardo Lima Mitev
In OpenGL and OpenGL-Es 3+, GL_DEPTH_STENCIL_ATTACHMENT is a valid attachment point for the family of functions that invalidate a framebuffer object (e.g, glInvalidateFramebuffer, glInvalidateSubFramebuffer, etc). Currently, a GL_INVALID_ENUM error is emitted for this attachment point. Fixes 21

[Mesa-dev] [PATCH 02/10] mesa: Enables GL_RGB and GL_RGBA unsized internal formats for OpenGL ES 3.0

2014-12-01 Thread Eduardo Lima Mitev
GL_RGB and GL_RGBA are valid internal formats on a GLES3 profile. See "Table 1. Unsized Internal Formats" at https://www.khronos.org/opengles/sdk/docs/man3/html/glTexImage2D.xhtml. Fixes 2 dEQP tests: - dEQP-GLES3.functional.state_query.internal_format.rgb_samples - dEQP-GLES3.functional.state_que

[Mesa-dev] [PATCH 08/10] glsl: A shader cannot redefine or overload built-in functions in GLSL ES 3.00

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez Create a new search function to look for matching built-in functions by name and use it for built-in function redefinition or overload in GLSL ES 3.00. GLSL ES 3.0 spec, chapter 6.1 "Function Definitions", page 71 "A shader cannot redefine or overload built-in fu

[Mesa-dev] [PATCH 06/10] glsl: invariant qualifier is not valid for shader inputs in GLSL ES 3.00

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez GLSL ES 3.00 spec, chapter 4.6.1 "The Invariant Qualifier", Only variables output from a shader can be candidates for invariance. This includes user-defined output variables and the built-in output variables. As only outputs can be declared as invarian

[Mesa-dev] [PATCH 00/10] Various fixes for dEQP failing tests

2014-12-01 Thread Eduardo Lima Mitev
This set of (unrelated) patches fixes over 230 tests from the dEQP test suite [1]. While the tests failures were gathered on i965 (gen8) against 10.3.3, there are several driver and version agnostic fixes. There is one piglit regression brought by patch 10 , specifically in test: bin/glslparser

[Mesa-dev] [PATCH 04/10] mesa: Recompute LegalTypesMask if the GL API has changed

2014-12-01 Thread Eduardo Lima Mitev
From: Iago Toral Quiroga The current code computes ctx->Array.LegalTypesMask just once, however, computing this needs to consider ctx->API so we need to make sure that the API for that context has not changed if we intend to reuse the result. The context API can change, at least, if we go throug

[Mesa-dev] [PATCH 07/10] glsl: don't allow invariant qualifiers for interface blocks in GLSL ES

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez From GLSL ES 3.0, chapter 4.3.7 "Interface Blocks", page 38: "GLSL ES 3.0 does not support interface blocks for shader inputs or outputs." and from GLSL ES 3.0, chapter 4.6.1 "The invariant qualifier", page 52. "Only variables output from a shader can be candida

[Mesa-dev] [PATCH 10/10] glsl: fail when a shader's input var has not an equivalent out var in previous

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez GLSL ES 3.00 spec, 4.3.10 (Linking of Vertex Outputs and Fragment Inputs), page 45 says the following: "The type of vertex outputs and fragment input with the same name must match, otherwise the link command will fail. The precision does not need to match. Only th

[Mesa-dev] [PATCH 09/10] main/glsles: return two minor digits for SHADING_LANGUAGE_VERSION

2014-12-01 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez For OpenGL ES 3.0 spec, the minor number for SHADING_LANGUAGE_VERSION is always two digits, matching the OpenGL ES Shading Language Specification release number. For example, this query might return the string "3.00". This patch fixes the following dEQP test:

Re: [Mesa-dev] [PATCH] ir_to_mesa: Don't optimize clamp into saturate when target is GL_VERTEX_PROGRAM_ARB

2014-12-01 Thread Abdiel Janulgue
On 11/29/2014 12:10 PM, Kenneth Graunke wrote: > On Thursday, November 27, 2014 10:45:00 AM Abdiel Janulgue wrote: >> Add the the same restriction as in the previous try_emit_sat when trying >> to optimize clamp. Fixes an infinite loop in swrast where the lowering >> pass unpacks saturate into cl

[Mesa-dev] [PATCH v2 1/7] ir_to_mesa: Only lower saturate to clamp when EmitNoSat is set

2014-12-01 Thread Abdiel Janulgue
Fixes an infinite loop in swrast where the lowering pass unpacks saturate into clamp but the opt_algebraic pass tries to do the opposite. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83463 Signed-off-by: Abdiel Janulgue --- src/mesa/main/mtypes.h | 1 + src/mesa/program/ir_to

[Mesa-dev] [PATCH v2 4/7] dri/radeon: Don't emit saturate for vertex shaders

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/r200/r200_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 931f437..8533123 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b

[Mesa-dev] [PATCH v2 6/7] i915: Don't emit saturate for vertex shaders

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/i915/i915_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 42ea54e..847105a 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b

[Mesa-dev] [PATCH v2 3/7] swrast: Don't emit saturate for vertex shaders

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/swrast/swrast.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index e8a2c12..5bd8a9b 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/driver

[Mesa-dev] [PATCH v2 2/7] glsl: Don't optimize min/max into saturate when EmitNoSat is set

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/glsl/opt_algebraic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp index 430f5cb..89fc0de 100644 --- a/src/glsl/opt_algebraic.cpp +++ b/src/glsl/opt_algebraic.cpp @@ -679,7 +67

[Mesa-dev] [PATCH v2 5/7] st/mesa: For vertex shaders, don't emit saturate when SM 3.0 is unsupported

2014-12-01 Thread Abdiel Janulgue
There is a bug in the current lowering pass implementation where we lower saturate to clamp only for vertex shaders on drivers supporting SM 3.0. The correct behavior is to actually lower to clamp only when we don't support saturate which happens on drivers that don't support SM 3.0 Signed-off-b

[Mesa-dev] [PATCH v2 7/7] i965: Don't emit saturate for vertex shaders

2014-12-01 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/i965/brw_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 8b0f391..660e856 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src

[Mesa-dev] [PATCH] mesa: removed reference to unused header

2014-12-01 Thread Albert Freeman
Removed reference to unused header file to reduce src/mesa/main dependency on src/mesa/drivers. Signed-off-by: Albert Freeman --- I do not have commit access! No regressions with piglit (tests/quick.py). src/mesa/main/enable.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mesa/main

Re: [Mesa-dev] [Patch v2] Mesa: Add support for GL_OES_texture_*float* extensions.

2014-12-01 Thread Brian Paul
Thanks for the updates. A few more nitpicks... On 11/27/2014 11:56 AM, Kalyan Kondapally wrote: This patch adds support for following GLES2 Texture Float extensions: 1)GL_OES_texture_float, 2)GL_OES_texture_half_float, 3)GL_OES_texture_float_linear, 4)GL_OES_texture_half_float_linear. Support

Re: [Mesa-dev] [PATCH 01/13] mesa/meta: Don't free meta if it was never initialized

2014-12-01 Thread Brian Paul
On 11/28/2014 04:25 AM, Juha-Pekka Heikkila wrote: Signed-off-by: Juha-Pekka Heikkila --- src/mesa/drivers/common/meta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 87532c1..fab360d 100644 --- a/src/mesa/drivers/

Re: [Mesa-dev] [PATCH 03/13] mesa/main: Don't go freeing texture data which was never allocated

2014-12-01 Thread Brian Paul
On 11/28/2014 04:25 AM, Juha-Pekka Heikkila wrote: Signed-off-by: Juha-Pekka Heikkila --- src/mesa/main/texstate.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index e0f0852..7f29208 100644 --- a/src/mesa

Re: [Mesa-dev] [PATCH 13/13] mesa/main: Verify context creation on progress

2014-12-01 Thread Brian Paul
On 11/28/2014 04:25 AM, Juha-Pekka Heikkila wrote: Stop context creation if something failed. If something errored during context creation we'd segfault. Now will clean up and return error. Signed-off-by: Juha-Pekka Heikkila --- src/mesa/main/shared.c | 66

Re: [Mesa-dev] [PATCH 05/10] glsl: Don't allow gl_FragData[i], with i>0 in GLES shaders

2014-12-01 Thread Matteo Bruni
2014-12-01 14:04 GMT+01:00 Eduardo Lima Mitev : > The OpenGL ES Shading Language specification describes the > values that may be output by a fragment shader. These are > gl_FragColor and gl_FragData[0]. Multiple render targets > are not supported in GLES. > > Fixes dEQP test: > * dEQP-GLES3.func

Re: [Mesa-dev] [PATCH v2 09/29] mesa: Add _mesa_swap2_copy and _mesa_swap4_copy

2014-12-01 Thread Brian Paul
On 12/01/2014 04:05 AM, Iago Toral Quiroga wrote: We have _mesa_swap{2,4} but these do in-place byte-swapping only. The new functions receive an extra parameter so we can swap bytes on a source input array and store the results in a (possibly different) destination array. This is useful to imple

Re: [Mesa-dev] [PATCH 04/10] mesa: Recompute LegalTypesMask if the GL API has changed

2014-12-01 Thread Brian Paul
On 12/01/2014 06:04 AM, Eduardo Lima Mitev wrote: From: Iago Toral Quiroga The current code computes ctx->Array.LegalTypesMask just once, however, computing this needs to consider ctx->API so we need to make sure that the API for that context has not changed if we intend to reuse the result. T

Re: [Mesa-dev] [PATCH 09/10] main/glsles: return two minor digits for SHADING_LANGUAGE_VERSION

2014-12-01 Thread Brian Paul
I'd change the subject to "main: return two minor digits for ES shading language version" On 12/01/2014 06:04 AM, Eduardo Lima Mitev wrote: From: Samuel Iglesias Gonsalvez For OpenGL ES 3.0 spec, the minor number for SHADING_LANGUAGE_VERSION is always two digits, matching the OpenGL ES Shadi

Re: [Mesa-dev] [PATCH 00/10] Various fixes for dEQP failing tests

2014-12-01 Thread Brian Paul
On 12/01/2014 06:04 AM, Eduardo Lima Mitev wrote: This set of (unrelated) patches fixes over 230 tests from the dEQP test suite [1]. While the tests failures were gathered on i965 (gen8) against 10.3.3, there are several driver and version agnostic fixes. There is one piglit regression brought

Re: [Mesa-dev] [Patch v2] Mesa: Add support for GL_OES_texture_*float* extensions.

2014-12-01 Thread kalyan kondapally
>>I think this would be nicer as: >> if (ctx->API == API_OPENGLES2) { >> ctx->Extensions.OES_texture_fl >> The indentation of the new lines there looks inconsistent. I sent v3 which already has the fixes. On Mon, Dec 1, 2014 at 7:34 AM, Brian Paul wrote: > Thanks for the updates. A fe

Re: [Mesa-dev] [PATCH 2/2] st/nine: Fix vertex declarations for non-standard (usage/index)

2014-12-01 Thread Ilia Mirkin
On Thu, Nov 27, 2014 at 5:13 AM, Axel Davy wrote: > Nine code to match vertex declaration to vs inputs was limiting > the number of possible combinations. > > Some sm3 games have issues with that, because arbitrary (usage/index) > can be used. > > This patch does the following changes to fix the p

[Mesa-dev] [PATCH 1/2] i965: Don't treat IF or WHILE with cmod as writing the flag.

2014-12-01 Thread Matt Turner
--- These are a couple of fixes from a Jenkins run of my flagdce branch. src/mesa/drivers/dri/i965/brw_fs.cpp | 4 +++- src/mesa/drivers/dri/i965/brw_vec4.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/b

[Mesa-dev] [PATCH 2/2] i965/fs: Treat the FB_WRITE as predicated if we're discarding.

2014-12-01 Thread Matt Turner
Pre-Haswell hardware couldn't actually predicate it, but it's easier to pretend as if it's predicated in the visitor since it will generate a MOV from f0.1. --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 4 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- 2 files changed, 5 insert

Re: [Mesa-dev] [PATCH v2 08/23] mesa: Fix _mesa_swizzle_and_convert integer conversions to clamp properly

2014-12-01 Thread Jason Ekstrand
This looks much better. Two comments though. First, I think we need to tweak the float_to_uint function to clamp above. I don't know that it properly handles values larger than MAX_UINT right now. Second, I think we may want a MIN_INT macro for this. In particular, I don't know that this is we

Re: [Mesa-dev] [PATCH v2 06/23] mesa: Fix incorrect assertion in init_teximage_fields_ms

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > _BaseFormat is a GLenum (unsigned int) so testing if its value is > greater than 0 to detect the cases where _mesa_base_tex_format > returns -1 doesn't work. > > Fixing the assertion breaks the arb_texture_view-lifetime-format > piglit t

Re: [Mesa-dev] [PATCH v2 11/23] mesa: Let _mesa_get_format_base_format also handle mesa_array_format.

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > If we need the base format for a mesa_array_format we have to find the > matching mesa_format first. This is expensive because it requires > to loop through all existing mesa formats until we find the right match. > > We can resolve the

Re: [Mesa-dev] [PATCH] i965: Make validate_reg tables constant

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 4:59 AM, Juha-Pekka Heikkila wrote: > Declare local tables constant. Also added extra '32' at end of > "width_for_reg" to be future proof, cvt function which give > indexes to access here could already give index to reach place > number five now containing '32'. I don't see

Re: [Mesa-dev] [PATCH v2 06/23] mesa: Fix incorrect assertion in init_teximage_fields_ms

2014-12-01 Thread Ilia Mirkin
On Mon, Dec 1, 2014 at 6:04 AM, Iago Toral Quiroga wrote: > _BaseFormat is a GLenum (unsigned int) so testing if its value is > greater than 0 to detect the cases where _mesa_base_tex_format > returns -1 doesn't work. > > Fixing the assertion breaks the arb_texture_view-lifetime-format > piglit te

Re: [Mesa-dev] [PATCH 5/5] i965/vs: Set brw_vs_prog_key::clamp_vertex_color to 0 when irrelevant.

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 2:00 AM, Kenneth Graunke wrote: > Vertex color clamping is only relevant if the shader writes to > the built-in gl_[Secondary]{Front,Back}Color varyings. Otherwise, > brw_vs_prog_key::clamp_vertex_color is never used, so we can simply > leave it set to 0. > > This enables u

Re: [Mesa-dev] [PATCH 2/5] i965: Drop use of GL types in program keys.

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 2:00 AM, Kenneth Graunke wrote: > This is really far removed from the API; we should just use C types. > > Signed-off-by: Kenneth Graunke Can we fix the type of the gen6_gather_wa field while we're at it? We can mark the gen6_gather_sampler_wa as PACKED to keep the 1-byte

Re: [Mesa-dev] [PATCH] i965: Remove "disable_derivative_optimization" driconf option.

2014-12-01 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2 7/7] i965: Don't emit saturate for vertex shaders

2014-12-01 Thread Matt Turner
i965's vertex shaders can use saturate. This isn't needed. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2 6/7] i915: Don't emit saturate for vertex shaders

2014-12-01 Thread Matt Turner
I think i915's vertex shaders can use saturate. I don't think this is needed. The code you were modifying (in Gallium) in the original patch doesn't affect this driver. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

Re: [Mesa-dev] [PATCH 01/10] mesa: Considers GL_DEPTH_STENCIL_ATTACHMENT a valid argument for FBO invalidation under GLES3

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 5:04 AM, Eduardo Lima Mitev wrote: > In OpenGL and OpenGL-Es 3+, GL_DEPTH_STENCIL_ATTACHMENT is a valid attachment > point for the family of functions > that invalidate a framebuffer object (e.g, glInvalidateFramebuffer, > glInvalidateSubFramebuffer, etc). > Currently, a G

Re: [Mesa-dev] [PATCH 02/10] mesa: Enables GL_RGB and GL_RGBA unsized internal formats for OpenGL ES 3.0

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 5:04 AM, Eduardo Lima Mitev wrote: > GL_RGB and GL_RGBA are valid internal formats on a GLES3 profile. See > "Table 1. Unsized Internal Formats" at > https://www.khronos.org/opengles/sdk/docs/man3/html/glTexImage2D.xhtml. > > Fixes 2 dEQP tests: > - dEQP-GLES3.functional.sta

Re: [Mesa-dev] [PATCH v2 16/23] mesa: Add _mesa_pack_uint_rgba_row() format conversion function

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > From: Samuel Iglesias Gonsalvez > > We will use this later on to handle uint conversion scenarios in a master > convert function. > > v2: > - Modify pack_uint_*() function generation to use c.datatype() and > f.datatype(). > - Remove

Re: [Mesa-dev] [PATCH v2 17/23] mesa: Add non-normalized formats support for ubyte packing functions

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > From: Samuel Iglesias Gonsalvez > > Signed-off-by: Samuel Iglesias Gonsalvez > --- > src/mesa/main/format_pack.c.mako | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/main/format_pack.c.mako > b/src

Re: [Mesa-dev] [PATCH v2 00/23] auto-generate pack/unpack functions

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga wrote: > This is the first of two series that aim to address: > https://bugs.freedesktop.org/show_bug.cgi?id=84566 > > A branch with this series is available here: > https://github.com/Igalia/mesa/tree/itoral-autogen-packing-review-v2 > > Link to

Re: [Mesa-dev] [PATCH v2 6/7] i915: Don't emit saturate for vertex shaders

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 10:50 AM, Matt Turner wrote: > I think i915's vertex shaders can use saturate. I don't think this is needed. > > The code you were modifying (in Gallium) in the original patch doesn't > affect this driver. Actually, i915 doesn't do hardware vertex shaders, so I don't know w

Re: [Mesa-dev] [PATCH 1/5] i965: Move program key structures to brw_program.h.

2014-12-01 Thread Chris Forbes
For the series: Reviewed-by: Chris Forbes On Mon, Dec 1, 2014 at 11:00 PM, Kenneth Graunke wrote: > With fs_visitor/fs_generator being reused for SIMD8 VS/GS programs, > we're running into weird #include patterns, where scalar code #includes > brw_vec4.h and such. > > Program keys aren't really

Re: [Mesa-dev] [PATCH 2/5] i965: Drop use of GL types in program keys.

2014-12-01 Thread Kenneth Graunke
On Monday, December 01, 2014 10:46:30 AM Matt Turner wrote: > On Mon, Dec 1, 2014 at 2:00 AM, Kenneth Graunke wrote: > > This is really far removed from the API; we should just use C types. > > > > Signed-off-by: Kenneth Graunke > > Can we fix the type of the gen6_gather_wa field while we're at

Re: [Mesa-dev] [PATCH v2 14/16] i965: Add fs_visitor::run_vs() to generate scalar vertex shader code

2014-12-01 Thread Kristian Høgsberg
On Fri, Nov 14, 2014 at 4:21 PM, Kenneth Graunke wrote: > On Thursday, November 13, 2014 04:28:20 PM Kristian Høgsberg wrote: >> This patch uses the previous refactoring to add a new run_vs() method >> that generates vertex shader code using the scalar visitor and >> optimizer. >> >> Signed-off-by

[Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Neil Roberts
When submitting the vertex buffers the i965 driver will try to recognise when multiple attributes are using the same buffer so that it can submit a single relocation for it and set a different offset in the attribute. Previously however if the application happens to have the attributes in a struct

[Mesa-dev] [PATCH] gallium: add include path to fix building of pipe-loader code

2014-12-01 Thread Brian Paul
The pipe-loader code wasn't finding util/u_atomic.h --- src/gallium/auxiliary/pipe-loader/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe-loader/Makefile.am index 44917f3..cb6035d 100644 --- a/src/gallium/a

[Mesa-dev] [PATCH] mesa: update glext.h to version 20141118

2014-12-01 Thread Brian Paul
--- include/GL/glext.h | 213 + 1 file changed, 181 insertions(+), 32 deletions(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 256ad35..d3cfbb5 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -33,7 +33,7 @@ extern "C"

[Mesa-dev] [PATCH 4/5] mesa: some improvements for print_list()

2014-12-01 Thread Brian Paul
Add a filename parameter to print_list() so that a display list can be printed to a file. --- src/mesa/main/dlist.c | 150 src/mesa/main/dlist.h | 2 +- src/mesa/vbo/vbo_save_api.c | 8 +-- 3 files changed, 87 insertions(+), 73 deletions

[Mesa-dev] [PATCH 2/5] svga: fix comment typo

2014-12-01 Thread Brian Paul
--- src/gallium/drivers/svga/svga_resource_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index c975a19..64fd245 100644 --- a/src/gallium/drivers/svga/svga_resource_t

[Mesa-dev] [PATCH 1/5] mesa: remove unused functions in prog_execute.c

2014-12-01 Thread Brian Paul
--- src/mesa/program/prog_execute.c | 74 - 1 file changed, 74 deletions(-) diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index 650c40f..33c1751 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog_execut

[Mesa-dev] [PATCH 3/5] mesa: inline/remove _mesa_polygon_stipple()

2014-12-01 Thread Brian Paul
Was not called from any other place. --- src/mesa/main/polygon.c | 38 ++ src/mesa/main/polygon.h | 4 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index 76d6019..cdaa244 100644 --- a/sr

[Mesa-dev] [PATCH 5/5] vbo: also print buffer object pointer in vbo_print_vertex_list()

2014-12-01 Thread Brian Paul
--- src/mesa/vbo/vbo_save_api.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 4a6c436..5055c22 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1527,10 +1527,14 @@ vbo_print_

[Mesa-dev] [PATCH] mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()

2014-12-01 Thread Brian Paul
We need parenthesis around the expression which computes the number of blocks per row. Cc: "10.3 10.4" --- src/mesa/main/texstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index f858cef..50aa1fd 100644 --- a/src/mesa

Re: [Mesa-dev] [PATCH 2/5] i965: Drop use of GL types in program keys.

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 12:00 PM, Kenneth Graunke wrote: > On Monday, December 01, 2014 10:46:30 AM Matt Turner wrote: >> On Mon, Dec 1, 2014 at 2:00 AM, Kenneth Graunke >> wrote: >> > This is really far removed from the API; we should just use C types. >> > >> > Signed-off-by: Kenneth Graunke >

[Mesa-dev] [PATCH] i965: Add var->location != -1 assertions.

2014-12-01 Thread Kenneth Graunke
We shouldn't receive variables with invalid locations set - adding these assertions should help catch problems before they cause crashes later. Inspired by similar code in st_glsl_to_tgsi. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 1 + src/mesa/drivers/

[Mesa-dev] [PATCH] i965: Remove tabs from instruction scheduler.

2014-12-01 Thread Matt Turner
--- .../drivers/dri/i965/brw_schedule_instructions.cpp | 196 ++--- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp index f0d941f..b552cf8 100644 --- a

Re: [Mesa-dev] [PATCH] gallium: add include path to fix building of pipe-loader code

2014-12-01 Thread Matt Turner
Dang. I thought I found them all. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()

2014-12-01 Thread Matt Turner
On Mon, Dec 1, 2014 at 12:47 PM, Brian Paul wrote: > We need parenthesis around the expression which computes the number of > blocks per row. > > Cc: "10.3 10.4" > --- > src/mesa/main/texstore.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/main/texstore.c b/s

Re: [Mesa-dev] [PATCH v2 14/16] i965: Add fs_visitor::run_vs() to generate scalar vertex shader code

2014-12-01 Thread Kenneth Graunke
On Monday, December 01, 2014 12:02:01 PM Kristian Høgsberg wrote: > On Fri, Nov 14, 2014 at 4:21 PM, Kenneth Graunke > wrote: > > On Thursday, November 13, 2014 04:28:20 PM Kristian Høgsberg wrote: > >> This patch uses the previous refactoring to add a new run_vs() method > >> that generates vert

Re: [Mesa-dev] [PATCH 4/5] mesa: some improvements for print_list()

2014-12-01 Thread Kenneth Graunke
On Monday, December 01, 2014 01:44:22 PM Brian Paul wrote: > Add a filename parameter to print_list() so that a display list can > be printed to a file. > --- > src/mesa/main/dlist.c | 150 > > src/mesa/main/dlist.h | 2 +- > src/mesa/vbo

Re: [Mesa-dev] [PATCH 4/5] mesa: some improvements for print_list()

2014-12-01 Thread Brian Paul
On 12/01/2014 03:59 PM, Kenneth Graunke wrote: On Monday, December 01, 2014 01:44:22 PM Brian Paul wrote: Add a filename parameter to print_list() so that a display list can be printed to a file. --- src/mesa/main/dlist.c | 150 src/mesa/main

Re: [Mesa-dev] [PATCH 1/1] r600, llvm: Fix mem leak

2014-12-01 Thread Jan Vesely
ping On Mon, 2014-11-03 at 20:29 -0500, Jan Vesely wrote: > Signed-off-by: Jan Vesely > --- > src/gallium/drivers/r600/r600_llvm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium/drivers/r600/r600_llvm.c > b/src/gallium/drivers/r600/r600_llvm.c > index c19693a..5f74bf7 100

Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()

2014-12-01 Thread Brian Paul
On 12/01/2014 03:16 PM, Matt Turner wrote: On Mon, Dec 1, 2014 at 12:47 PM, Brian Paul wrote: We need parenthesis around the expression which computes the number of blocks per row. Cc: "10.3 10.4" --- src/mesa/main/texstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[Mesa-dev] [PATCH 1/2] linker: Wrap access of producer_var with a NULL check

2014-12-01 Thread Ian Romanick
From: Ian Romanick producer_var could be NULL if consumer_var is not NULL and consumer_is_fs is false. This will occur when the procuder is NULL and the consumer is the geometry shader for a program that contains only a geometry shader. This will occur starting with the next patch. Signed-off-

[Mesa-dev] [PATCH 2/2] linker: Assign varying locations geometry shader inputs for SSO

2014-12-01 Thread Ian Romanick
From: Ian Romanick Previously only geometry shader outputs would be assigned locations if the geometry shader was the only stage in the linked program. Signed-off-by: Ian Romanick Cc: pa...@klacansky.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585 --- src/glsl/linker.cpp | 15

  1   2   >