Re: [Mesa-dev] [PATCH v4 00/22] auto-generate pack/unpack functions

2015-01-07 Thread Iago Toral
On Thu, 2015-01-08 at 08:20 +0100, 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-v4 > > Link

[Mesa-dev] [PATCH v4 05/28] mesa: Add helper to convert a GL format and type to a mesa (array) format.

2015-01-07 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) v3: - Adapted to the new implementation of mesa_array_format as a plain uint32_t bitfield. Reviewed-by: Jason Ekstrand --- src/mesa/main/glformats.

[Mesa-dev] [PATCH v4 02/28] mesa: Expose compute_component_mapping as _mesa_compute_component_mapping

2015-01-07 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 v4 09/28] mesa: Add helpers to extract GL_COLOR_INDEX to RGBA float/ubyte

2015-01-07 Thread Iago Toral Quiroga
We only use _mesa_make_temp_ubyte_image in texstore.c to convert GL_COLOR_INDEX to RGBA, but this helper does more stuff than this. All uses of this helper can be replaced with calls to _mesa_format_convert except for this GL_COLOR_INDEX conversion. This patch extracts the GL_COLOR_INDEX to RGBA l

[Mesa-dev] [PATCH v4 11/28] mesa: use _mesa_format_convert to implement glReadPixels.

2015-01-07 Thread Iago Toral Quiroga
--- src/mesa/main/readpix.c | 326 +++- 1 file changed, 184 insertions(+), 142 deletions(-) diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index b09cf54..c589ca4 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -39,6

[Mesa-dev] [PATCH v4 07/28] mesa: Add _mesa_swap2_copy and _mesa_swap4_copy

2015-01-07 Thread Iago Toral Quiroga
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 implement byte-swapping in pixel uploads, since in this c

[Mesa-dev] [PATCH v4 18/28] mesa: Remove _mesa_unpack_color_span_uint

2015-01-07 Thread Iago Toral Quiroga
This is no longer used. Reviewed-by: Jason Ekstrand --- src/mesa/main/pack.c | 646 --- src/mesa/main/pack.h | 6 - 2 files changed, 652 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 90c7af9..d0c0c45 100644 --- a/sr

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

2015-01-07 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 v4 13/28] mesa: Use _mesa_format_convert to implement get_tex_rgba_compressed.

2015-01-07 Thread Iago Toral Quiroga
Reviewed-by: Jason Ekstrand --- 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 7b11cb4..ad42782 100644 --- a/src/mesa/main/texgetimage.c

[Mesa-dev] [PATCH v4 24/28] mesa: Remove _mesa_pack_rgba_span_float and tmp_pack.h

2015-01-07 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 v4 10/28] mesa: Use _mesa_format_convert to implement texstore_rgba.

2015-01-07 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. Reviewed-by: Jason Ekstrand --- src/mesa/main/texstore.c | 683 +

[Mesa-dev] [PATCH v4 15/28] st/mesa: Use _mesa_format_convert to implement st_GetTexImage.

2015-01-07 Thread Iago Toral Quiroga
Instead of using _mesa_pack_rgba_span_float. This should allow us to remove that function in a later patch. Reviewed-by: Jason Ekstrand --- src/mesa/state_tracker/st_cb_texture.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_t

[Mesa-dev] [PATCH v4 03/28] mesa: Add a rebase_swizzle parameter to _mesa_format_convert

2015-01-07 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 v4 27/28] mesa: Remove _mesa_rebase_rgba_uint and _mesa_rebase_rgba_float

2015-01-07 Thread Iago Toral Quiroga
These are no longer used anywhere now that we have _mesa_format_convert. Reviewed-by: Jason Ekstrand --- 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

[Mesa-dev] [PATCH v4 14/28] swrast: Use _mesa_format_convert to implement draw_rgba_pixels.

2015-01-07 Thread Iago Toral Quiroga
This is the only place that uses _mesa_unpack_color_span_float so after this we should be able to remove that function. Reviewed-by: Jason Ekstrand --- src/mesa/swrast/s_drawpix.c | 38 ++ 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH v4 16/28] mesa: Let _mesa_swizzle_and_convert take array format types instead of GL types

2015-01-07 Thread Iago Toral Quiroga
In the future we would like to have a format conversion library that is independent of GL so we can share it with Gallium. This is a step in that direction. --- src/mesa/main/format_utils.c | 242 --- src/mesa/main/format_utils.h | 8 +- 2 files changed, 1

[Mesa-dev] [PATCH v4 26/28] mesa: Remove _mesa_pack_int_rgba_row() and auxiliary functions

2015-01-07 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez These are no longer used. Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jason Ekstrand --- src/mesa/main/format_pack.h | 4 -- src/mesa/main/format_pack.py | 121 --- 2 files changed, 125 deletions(-) diff --g

[Mesa-dev] [PATCH v4 21/28] mesa: Remove _mesa_unpack_color_span_ubyte

2015-01-07 Thread Iago Toral Quiroga
This is no longer used anywhere after moving to _mesa_format_convert. Reviewed-by: Jason Ekstrand --- 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/mai

[Mesa-dev] [PATCH v4 25/28] mesa: Remove _mesa_(un)pack_index_span

2015-01-07 Thread Iago Toral Quiroga
These are not used anywhere. Reviewed-by: Jason Ekstrand --- 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 679ff93..e59ea59 100644

[Mesa-dev] [PATCH v4 04/28] mesa: Add a helper _mesa_compute_rgba2base2rgba_component_mapping

2015-01-07 Thread Iago Toral Quiroga
This will come in handy when callers of _mesa_format_convert need to compute the rebase swizzle parameter to use. Reviewed-by: Jason Ekstrand --- src/mesa/main/format_utils.c | 55 src/mesa/main/format_utils.h | 3 +++ 2 files changed, 58 insertions(

[Mesa-dev] [PATCH v4 06/28] mesa/pack: use _mesa_format_from_format_and_type in _mesa_pack_rgba_span_from_*

2015-01-07 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 Reviewed-by: Jason Ekstrand --- src/mesa/main/pack.c | 282 +-- 1 file changed, 26 ins

[Mesa-dev] [PATCH v4 12/22] mesa: Add a _mesa_is_format_color_format helper

2015-01-07 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 b10b628..6eb80fb 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c

[Mesa-dev] [PATCH v4 17/28] mesa: Replace _mesa_unpack_bitmap with _mesa_unpack_image()

2015-01-07 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 v4 22/28] mesa: Remove (signed) integer pack and span functions.

2015-01-07 Thread Iago Toral Quiroga
These are no longer used now that we moved to _mesa_format_convert. Reviewed-by: Jason Ekstrand --- 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

[Mesa-dev] [PATCH v4 20/28] mesa: Remove _mesa_make_temp_float_image

2015-01-07 Thread Iago Toral Quiroga
Now that we have _mesa_format_convert we don't need this. This was only used to create temporary RGBA float images in the process of storing some compressed formats. These can call _mesa_texstore with a RGBA/float dst to achieve the same goal. Reviewed-by: Jason Ekstrand --- src/mesa/main/texco

[Mesa-dev] [PATCH v4 08/28] mesa: Add RGBA to Luminance conversion helpers

2015-01-07 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 v4 19/28] mesa: Remove _mesa_make_temp_ubyte_image

2015-01-07 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 v4 28/28] mesa: restrict use of GL_ABGR_EXT format to allowed data types

2015-01-07 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV data types are not explicitly allowed to work with GL_ABGR_EXT format neither in GL nor GL_EXT_abgr specs. Removed the corresponding mesa formats a

[Mesa-dev] [PATCH v4 12/28] mesa: use _mesa_format_convert to implement get_tex_rgba_uncompressed.

2015-01-07 Thread Iago Toral Quiroga
Reviewed-by: Jason Ekstrand --- 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..7b11cb4 100644 --- a/src/mesa/main/texgetimage

[Mesa-dev] [PATCH v4 23/28] mesa: Remove _mesa_unpack_color_span_float

2015-01-07 Thread Iago Toral Quiroga
And various helper functions that went unused after removing it. Reviewed-by: Jason Ekstrand --- 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/pa

[Mesa-dev] [PATCH v4 17/22] mesa/format_pack: Add _mesa_pack_int_rgba_row()

2015-01-07 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez This will be used to unify code in pack.c. v2: - Modify pack_int_*() function generator to use c.datatype() and f.datatype() Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/format_pack.h | 3 ++ src/mesa/main/format_pack.py | 121 +++

[Mesa-dev] [PATCH v4 19/22] mesa: use format conversion functions in swrast

2015-01-07 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez This commit adds a macro to facilitate the task of using format conversions functions but keeps the same API. Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jason Ekstrand --- src/mesa/swrast/s_texfetch_tmp.h | 1359 --

[Mesa-dev] [PATCH v4 10/22] main: Add a concept of an array format

2015-01-07 Thread Iago Toral Quiroga
From: Jason Ekstrand An array format is a 32-bit integer format identifier that can represent any format that can be represented as an array of standard GL datatypes. Whie the MESA_FORMAT enums provide several of these, they don't account for all of them. v2 by Iago Toral Quiroga : - Implement

[Mesa-dev] [PATCH v4 20/22] mesa/pack: use autogenerated format_pack functions

2015-01-07 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 Reviewed-by: Jason Ekstrand --- src/mesa/main/pack.c | 663

[Mesa-dev] [PATCH v4 04/22] mesa: Fix A1R5G5B5 packing/unpacking

2015-01-07 Thread Iago Toral Quiroga
From: Jason Ekstrand As with B5G6R5, these have been left broken with comments saying they are. Signed-off-by: Jason Ekstrand Reviewed-by: Ian Romanick --- src/mesa/main/format_pack.c | 8 +--- src/mesa/main/format_unpack.c| 11 --- src/mesa/main/formats.c | 3

[Mesa-dev] [PATCH v4 00/28] Use a master format convert function

2015-01-07 Thread Iago Toral Quiroga
This is the second of two series that aim to address: https://bugs.freedesktop.org/show_bug.cgi?id=84566 This series requires the previous series that implements auto-generation of the pack/unpack functions. A branch with both series is available here: https://github.com/Igalia/mesa/tree/itoral-fo

[Mesa-dev] [PATCH v4 09/22] swrast: Remove unused variable.

2015-01-07 Thread Iago Toral Quiroga
Reviewed-by: Ian Romanick Reviewed-by: Jason Ekstrand --- src/mesa/swrast/s_drawpix.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index f7926e4..227faa2 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c

[Mesa-dev] [PATCH v4 06/22] mesa: Fix incorrect assertion in init_teximage_fields_ms

2015-01-07 Thread Iago Toral Quiroga
_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 test on nouveau, since that test calls _mesa_base_tex_format with GL_R16

[Mesa-dev] [PATCH v4 11/22] mesa: Let _mesa_get_format_base_format also handle mesa_array_format.

2015-01-07 Thread Iago Toral Quiroga
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 base format of an array format directly by looking at its swizzle inf

[Mesa-dev] [PATCH v4 01/22] mesa: Fix clamping to -1.0 in snorm_to_float

2015-01-07 Thread Iago Toral Quiroga
From: Jason Ekstrand This patch fixes the return of a wrong value when x is lower than -MAX_INT(src_bits) as the result would not be between [-1.0 1.0]. v2 by Samuel Iglesias : - Modify snorm_to_float() to avoid doing the division when x == -MAX_INT(src_bits) Reviewed-by: Ian Romanick

[Mesa-dev] [PATCH v4 22/22] mesa/pack: refactor _mesa_pack_rgba_span_float()

2015-01-07 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 v4 16/22] mesa: Add _mesa_pack_uint_rgba_row() format conversion function

2015-01-07 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 v4 18/22] mesa/formats: add new mesa formats and their pack/unpack functions.

2015-01-07 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez This will be used to refactor code in pack.c and support conversion to/from these types in a master convert function that will be added later. v2: - Fix autogeneration of MESA_FORMAT_A2R10G10B10_UNORM pack/unpack functions Signed-off-by: Samuel Iglesias Gonsal

[Mesa-dev] [PATCH v4 03/22] mesa/colormac: Remove an unused macro

2015-01-07 Thread Iago Toral Quiroga
From: Jason Ekstrand The PACK_565_REV macro is no longer used. It was also extremely confusing because it's actually a byteswapped 565 not reversed 565. Signed-off-by: Jason Ekstrand Reviewed-by: Ian Romanick --- src/mesa/main/colormac.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/

[Mesa-dev] [PATCH v4 02/22] mesa: Fix packing/unpacking of MESA_FORMAT_R5G6B5_UNORM

2015-01-07 Thread Iago Toral Quiroga
From: Jason Ekstrand Aparently, the packing/unpacking functions for these formats have differed from the format description in formats.h. Instead of fixing this, people simply left a comment saying it was broken. Let's actually fix it for real. Signed-off-by: Jason Ekstrand v2 by Samuel Igle

[Mesa-dev] [PATCH v4 13/22] configure: require python mako module

2015-01-07 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. v2: - Inline python script in m4 file and use PYTHON2 v3: - Remove semicolons and quotes and change coding style - Ad

[Mesa-dev] [PATCH v4 07/22] mesa/format_utils: Prefix and expose the conversion helper functions

2015-01-07 Thread Iago Toral Quiroga
From: Jason Ekstrand Signed-off-by: Jason Ekstrand v2 by Samuel Iglesias : - Fix compilation errors Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Ian Romanick --- src/mesa/main/format_utils.c | 215 +++ src/mesa/main/format_utils.h | 105 +

[Mesa-dev] [PATCH v4 00/22] auto-generate pack/unpack functions

2015-01-07 Thread Iago Toral Quiroga
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-v4 Links to previous versions of the series: v3: http://lists.freedesktop.org/arch

[Mesa-dev] [PATCH v4 08/22] mesa: Fix _mesa_swizzle_and_convert integer conversions to clamp properly

2015-01-07 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Fix various conversion paths that involved integer data types of different sizes (uint16_t to uint8_t, int16_t to uint8_t, etc) that were not being clamped properly. Also, one of the paths was incorrectly assigning the value 12, instead of 1, to the constant "one"

[Mesa-dev] [PATCH v4 21/22] mesa/main/pack_tmp.h: Add float conversion support

2015-01-07 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez We will use this in a later patch to refactor _mesa_pack_rgba_span_float. Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jason Ekstrand --- src/mesa/main/pack_tmp.h | 75 +++- 1 file changed, 74 insertions(+),

[Mesa-dev] [PATCH v4 05/22] mesa: Fix get_texbuffer_format().

2015-01-07 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez We were returning incorrect mesa formats for GL_LUMINANCE_ALPHA16I_EXT and GL_LUMINANCE_ALPHA32I_EXT. Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Ian Romanick Reviewed-by: Jason Ekstrand --- src/mesa/main/teximage.c | 4 ++-- 1 file changed, 2 insert

Re: [Mesa-dev] [PATCH v2] i965/skl: Always use a header for SIMD4x2 sampler messages

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

[Mesa-dev] [PATCH v2] i965/skl: Always use a header for SIMD4x2 sampler messages

2015-01-07 Thread Kristian Høgsberg
SKL+ overloads the SIMD4x2 SIMD mode to mean either SIMD8D or SIMD4x2 depending on bit 22 in the message header. If the bit is 0 or there is no header we get SIMD8D. We always wand SIMD4x2 in vec4 and for fs pull constants, so use a message header in those cases and set bit 22 there. Signed-off-

Re: [Mesa-dev] [PATCH 1/2] i965/skl: Always use a header for SIMD4x2 sampler messages

2015-01-07 Thread Kristian Høgsberg
On Tue, Dec 30, 2014 at 9:38 PM, Matt Turner wrote: > On Tue, Dec 30, 2014 at 9:24 PM, Kristian Høgsberg wrote: >> SKL+ overloads the SIMD4x2 SIMD mode to mean either SIMD8D or SIMD4x2 >> depending on bit 22 in the message header. If the bit is 0 or there is >> no header we get SIMD8D. We alway

Re: [Mesa-dev] [PATCH 0/3] i965: Use intel_try_pbo_upload for sub updates and 3D textures

2015-01-07 Thread Jason Ekstrand
On Mon, Dec 22, 2014 at 7:52 PM, Kenneth Graunke wrote: > On Monday, December 22, 2014 07:43:11 PM Kristian Høgsberg wrote: > > On Mon, Dec 22, 2014 at 3:20 PM, Chris Forbes wrote: > > > Are there some performance numbers to go with this? > > > > Once of the synmark test cases (terrain) hits thi

[Mesa-dev] [PATCH 3/3] Mesa: Advertise GL_OES_texture_*float* extensions support with i965.

2015-01-07 Thread Kalyan Kondapally
This patch advertises support for GL_OES_texture_*float* extensions when using i965 drivers. Signed-off-by: Kevin Rogovin Signed-off-by: Kalyan Kondapally --- src/mesa/drivers/dri/i965/intel_extensions.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_ex

Re: [Mesa-dev] [PATCH v2] i965: Allow intel_try_pbo_upload for 3D and array textures

2015-01-07 Thread Jason Ekstrand
On Mon, Dec 22, 2014 at 4:32 PM, Neil Roberts wrote: > I just realised I made regular cube map textures stop working via the > blit path with this patch. Here is a v2 which just adds > GL_TEXTURE_CUBE_MAP to the switch in intel_try_pbo_upload. I've tested > that it still works with a hacky tweak

[Mesa-dev] [PATCH 1/3] Mesa: Add support for GL_OES_texture_*float* extensions.

2015-01-07 Thread Kalyan Kondapally
This patch series 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. This patch adds basic infrastructure and needed boolean flags to advertise support for these extensio

[Mesa-dev] [PATCH 2/3] Mesa: Add support for HALF_FLOAT_OES type.

2015-01-07 Thread Kalyan Kondapally
This patch adds needed support for accepting HALF_FLOAT_OES as valid type for TexImage*D and TexSubImage*D when Texture FLoat extensions are supported. Signed-off-by: Kevin Rogovin Signed-off-by: Kalyan Kondapally --- src/mesa/main/glformats.c | 46 ++

Re: [Mesa-dev] [PATCH 2/3] i965: Allow GL_UNPACK_SKIP_ROWS/PIXELS in intel_try_pbo_upload

2015-01-07 Thread Jason Ekstrand
Patches 1 and 2 are Reviewed-by: Jason Ekstrand On Mon, Dec 22, 2014 at 3:08 PM, Neil Roberts wrote: > This should just be a simple case of adding the skip values to the src > offset > so we can trivially implement it. > --- > src/mesa/drivers/dri/i965/intel_tex_image.c | 7 ++- > 1 file

Re: [Mesa-dev] [PATCH] radeon: fix r600/7 fmask pitch

2015-01-07 Thread Dave Airlie
On 8 January 2015 at 11:25, Alex Deucher wrote: > On Wed, Jan 7, 2015 at 8:19 PM, Dave Airlie wrote: >> Okay I've been doing some further FMASK studies empirically, dumping >> the fmask after rendering to an MSAA surface, >> >> it appears on r600 at 8xMSAA, every 8x8 tile requires 128 bytes of >>

Re: [Mesa-dev] [PATCH 52/53] st/nine: Change comment related to vertex shader inputs not matching declaration

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:37 AM, Axel Davy wrote: > Signed-off-by: Axel Davy > --- > src/gallium/state_trackers/nine/nine_state.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/src/gallium/state_trackers/nine/nine_state.c > b/src/gallium/state_trackers/nine

Re: [Mesa-dev] [PATCH 51/53] st/nine: Explicit nine requirements

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:37 AM, Axel Davy wrote: > This patch raises nine requirements and disables nine for old > hw that don't match them. > > It would be possible to make a lot of things work with these hw, > though not everything, but it needs special care for them in the > code, and since th

Re: [Mesa-dev] [PATCH 48/53] st/nine: Add variables containing the size of the constant buffers

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > Signed-off-by: Axel Davy > Cc: "10.4" > --- > src/gallium/state_trackers/nine/device9.c | 10 ++ > src/gallium/state_trackers/nine/device9.h | 2 ++ > src/gallium/state_trackers/nine/stateblock9.c | 4 ++-- > 3 files changed,

Re: [Mesa-dev] [PATCH 44/53] st/nine: Implement ps3 advanced input definition feature

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > ps3 allows definitions of the inputs like: > DCL_TEXCOORD0 v0.xy; Could this be .xw? I assume not... but if it can, that's not handled in this change. > DCL_NORMAL2 v0.z; > DCL_NORMAL3 v0.w; > > Nine wouldn't have handled this situation properl

[Mesa-dev] [Bug 77449] Tracker bug for all bugs related to Steam titles

2015-01-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Bug 77449 depends on bug 80584, which changed state. Bug 80584 Summary: XCOM: Enemy Unknown incorrect hair rendering https://bugs.freedesktop.org/show_bug.cgi?id=80584 What|Removed |Added ---

Re: [Mesa-dev] [PATCH v2 118/133] nir: Rework the way samplers are lowered

2015-01-07 Thread Jason Ekstrand
That was supposed to be 119/133 On Wed, Jan 7, 2015 at 6:03 PM, Jason Ekstrand wrote: > Reviewed-by: Chris Forbes > > v2 Jason Ekstrand : > - Use the nir_tex_src_sampler_offset source type instead of the >sampler_indirect thing that I cooked up before. > --- > src/glsl/nir/nir_lower_sampl

[Mesa-dev] [PATCH v2 118/133] nir/tex_instr: Rename the indirect source type

2015-01-07 Thread Jason Ekstrand
In particular, we rename nir_tex_src_sampler_index to _sampler_offset and add a sampler_array_size field to nir_tex_instr. This way we can pass the size of sampler arrays through to backends even after removing the variable information and, with it, the type. --- src/glsl/nir/nir.c | 4 +++

[Mesa-dev] [PATCH v2 118.5/133] nir/tex_instr_create: Initialize all 4 sources

2015-01-07 Thread Jason Ekstrand
This helps a lot with things like lowering passes that may need to add sources. --- src/glsl/nir/nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index 9b99c9e..c8d354d 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -458

[Mesa-dev] [PATCH v2 118/133] nir: Rework the way samplers are lowered

2015-01-07 Thread Jason Ekstrand
Reviewed-by: Chris Forbes v2 Jason Ekstrand : - Use the nir_tex_src_sampler_offset source type instead of the sampler_indirect thing that I cooked up before. --- src/glsl/nir/nir_lower_samplers.cpp | 153 ++-- 1 file changed, 78 insertions(+), 75 deletions(-)

[Mesa-dev] [PATCH v2 120/133] i965/fs_nir: Add support for indirect texture

2015-01-07 Thread Jason Ekstrand
Reviewed-by: Chris Forbes v2 Jason Ekstrand : - Use the nir_tex_src_sampler_offset source type instead of the sampler_indirect thing that I cooked up before. --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --

Re: [Mesa-dev] [PATCH 11/53] st/nine: Return D3DERR_INVALIDCALL when trying to create a texture of bad format

2015-01-07 Thread Axel Davy
On Wed, 7 Jan 2015, Ilia Mirkin wrote: On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: Reviewed-by: David Heidelberg Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/cubetexture9.c | 8 src/gallium/state_trackers/nine/texture9.c | 9 - src/gallium/st

Re: [Mesa-dev] [PATCH] radeon: fix r600/7 fmask pitch

2015-01-07 Thread Alex Deucher
On Wed, Jan 7, 2015 at 8:19 PM, Dave Airlie wrote: > Okay I've been doing some further FMASK studies empirically, dumping > the fmask after rendering to an MSAA surface, > > it appears on r600 at 8xMSAA, every 8x8 tile requires 128 bytes of > storage, that is used depending on the value in the CMA

Re: [Mesa-dev] [PATCH] radeon: fix r600/7 fmask pitch

2015-01-07 Thread Dave Airlie
Okay I've been doing some further FMASK studies empirically, dumping the fmask after rendering to an MSAA surface, it appears on r600 at 8xMSAA, every 8x8 tile requires 128 bytes of storage, that is used depending on the value in the CMASK. So it appears at 8xMSAA for every 4-bit entry in the CMA

Re: [Mesa-dev] [PATCH 34/53] st/nine: Implement TEXCOORD special behaviours

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > texcoord for ps < 1_4 should clamp between 0 and 1 the values. > > texcrd (texcoord ps 1_4) does not clamp and can be used with > two modifiers _dw and _dz that means the channels are divided > by w or z. > Implement those in shared code, since t

Re: [Mesa-dev] [PATCH 31/53] st/nine: Clamp ps 1.X constants

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > This is wine (and windows) behaviour. > > Signed-off-by: Axel Davy > > Cc: "10.4" > --- > src/gallium/state_trackers/nine/nine_shader.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/src/gallium/state_trackers/nine/nine_shader

Re: [Mesa-dev] [PATCH 29/53] st/nine: Fix CND implementation

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > Signed-off-by: Axel Davy > Signed-off-by: Tiziano Bacocco > > Cc: "10.4" > --- > src/gallium/state_trackers/nine/nine_shader.c | 16 +++- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/src/gallium/state_tracker

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 Jason Ekstrand changed: What|Removed |Added CC|ja...@jlekstrand.net| -- You are receiving this mail becaus

Re: [Mesa-dev] [PATCH 148/133] util/hash_table: Pull the details of the FNV-a1 into helpers

2015-01-07 Thread Eric Anholt
Jason Ekstrand writes: > This way the basics of the FNV-a1 hash can be reused to easily create other > hashing functions. I was slightly worried that the static const int might end up landing in each .o file, but it apparently doesn't. I'd rather keep things lower case, like we do with other ab

Re: [Mesa-dev] [PATCH] gallium: remove set_shader_resources, add set_shader_buffers for untyped buffers

2015-01-07 Thread Marek Olšák
Hardware doesn't work like that actually, but it's flexible enough that it can do anything. However, some solutions work better than others. We also have to take OpenGL into account, which has per-shader slots. RadeonSI shaders don't have any fixed slots for resources and sampler states. Instead,

Re: [Mesa-dev] [PATCH 01/13] radeonsi: reduce the size of si_pm4_state

2015-01-07 Thread Marek Olšák
Sure. I've reverted it. Marek On Wed, Jan 7, 2015 at 9:03 PM, Tom Stellard wrote: > On Mon, Jan 05, 2015 at 12:18:40AM +0100, Marek Olšák wrote: >> From: Marek Olšák >> >> - the relocs array is unused, remove it >> - ndw is at most 115 (init), set 140 as the maximum >> - compute needs 4 buffers

Re: [Mesa-dev] [PATCH 28/53] st/nine: Match REP implementation to LOOP

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 5:33 PM, Axel Davy wrote: > Le 07/01/2015 21:13, Ilia Mirkin a écrit : > >> On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: >>> >>> Previous implementation was fine, >>> just instead of having increasing counter, >>> have a decreasing counter. >>> >>> Signed-off-by: Axel

Re: [Mesa-dev] [PATCH 28/53] st/nine: Match REP implementation to LOOP

2015-01-07 Thread Axel Davy
Le 07/01/2015 21:13, Ilia Mirkin a écrit : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: Previous implementation was fine, just instead of having increasing counter, have a decreasing counter. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 41 ++

Re: [Mesa-dev] [PATCH 16/53] st/nine: Rework of boolean constants

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 5:24 PM, Axel Davy wrote: > On 07/01/2015 18:23, Ilia Mirkin wrote : >> >> On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: >>> >>> Convert them to shader booleans at earlier stage >> >> Why? What's wrong with the conversion as it is now? > > The conversion is fine for boo

Re: [Mesa-dev] [PATCH 24/53] st/nine: Handle RSQ special cases

2015-01-07 Thread Axel Davy
Le 07/01/2015 19:09, Ilia Mirkin a écrit : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: We should use the absolute value of the input as input to ureg_RSQ. Moreover, an input of 0.0 should return FLT_MAX. Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Cc: "10.4" --- src/gal

Re: [Mesa-dev] [PATCH 16/53] st/nine: Rework of boolean constants

2015-01-07 Thread Axel Davy
On 07/01/2015 18:23, Ilia Mirkin wrote : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: Convert them to shader booleans at earlier stage Why? What's wrong with the conversion as it is now? The conversion is fine for booleans, but not for integers. I think it is cleaner to have both boolean

[Mesa-dev] [PATCH 2/4] radeonsi/compute: Use relocs for scratch pointer rather than user sgprs

2015-01-07 Thread Tom Stellard
Instead of passing a pointer to the scratch buffer via user sgprs, we now patch the shader with the buffer address using reloc information from the LLVM generated ELF. --- src/gallium/drivers/radeonsi/si_compute.c | 46 --- 1 file changed, 42 insertions(+), 4 deletions(

[Mesa-dev] [PATCH 3/4] radeonsi: Re-enable LLVM IR dumps

2015-01-07 Thread Tom Stellard
This was inadvertently disabled by 761e36b4caab4e8e09a4c2b1409a825902fc7d2c. --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index

Re: [Mesa-dev] [PATCH 15/53] st/nine: Add ATI1 and ATI2 support

2015-01-07 Thread Axel Davy
On 07/01/2015 18:42, Ilia Mirkin wrote : On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: Adds ATI1 and ATI2 support to nine. They map to PIPE_FORMAT_RGTC1_UNORM and PIPE_FORMAT_RGTC2_UNORM, but need special handling. Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Signed-off-by: Xa

[Mesa-dev] [PATCH 4/4] radeonsi: Enable VGPR spilling for all shader types

2015-01-07 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_compute.c | 40 ++ src/gallium/drivers/radeonsi/si_shader.c| 69 - src/gallium/drivers/radeonsi/si_shader.h| 7 ++- src/gallium/drivers/radeonsi/si_state_shaders.c | 36 +++-- 4 files changed, 10

[Mesa-dev] [PATCH 1/4] radeon: Teach radeon_elf_read() how to parse reloc information

2015-01-07 Thread Tom Stellard
--- src/gallium/drivers/radeon/r600_pipe_common.h | 8 + src/gallium/drivers/radeon/radeon_elf_util.c | 44 +-- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common

Re: [Mesa-dev] [PATCH] state_tracker: Fix assertion failures in conditional block movs.

2015-01-07 Thread Jose Fonseca
On 13/12/14 02:24, Eric Anholt wrote: If you had a conditional assignment of an array or struct (say, from the if-lowering pass), we'd try doing swizzle_for_size() on the aggregate type, and it would assertion fail due to vector_elements==0. Instead, extend emit_block_mov() to handle emitting th

Re: [Mesa-dev] [PATCH 3/3] Don't cast the return value of malloc/realloc

2015-01-07 Thread Jose Fonseca
On 08/12/14 19:56, Matt Turner wrote: See commit 2b7a972e for the Coccinelle script. [...] diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 4f5a2d1..6945c2f 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -94,7 +94,7 @@ _mesa_align_malloc(size_t bytes,

Re: [Mesa-dev] [PATCH 28/53] st/nine: Match REP implementation to LOOP

2015-01-07 Thread Ilia Mirkin
On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > Previous implementation was fine, > just instead of having increasing counter, > have a decreasing counter. > > Signed-off-by: Axel Davy > --- > src/gallium/state_trackers/nine/nine_shader.c | 41 > +++ > 1 file changed

Re: [Mesa-dev] [PATCH 01/13] radeonsi: reduce the size of si_pm4_state

2015-01-07 Thread Tom Stellard
On Mon, Jan 05, 2015 at 12:18:40AM +0100, Marek Olšák wrote: > From: Marek Olšák > > - the relocs array is unused, remove it > - ndw is at most 115 (init), set 140 as the maximum > - compute needs 4 buffers per state, graphics only needs 1; set 4 as the > maximum The number of buffers per state

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #16 from Stéphane Travostino --- Is it possible there's a weird interaction with PRIME? @almos, does your system have a muxless setup? My CPU isn't underclocked nor undervolted, and using the performance governor doesn't help in any

[Mesa-dev] [Bug 87886] constant fps drops with Intel and Radeon on Source games

2015-01-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=87886 --- Comment #15 from almos --- I tried l4d2 again with mesa 10.5-dev (git-1829f9c), and still nothing. Kernel is the same as before (3.17.7). Do I need to underclock my CPU to see the lag spikes? -- You are receiving this mail because: You are

[Mesa-dev] [PATCH] radeonsi: Fix crash when destroying si_screen

2015-01-07 Thread Tom Stellard
We need to dispose the cached LLVMTargetMachine before calling r600_destory_common_screen(), because this function frees the si_screen object which invalidates LLVMTargetMachine pointer. https://bugs.freedesktop.org/show_bug.cgi?id=88170 --- src/gallium/drivers/radeonsi/si_pipe.c | 6 -- 1 fi

Re: [Mesa-dev] [PATCH] mesa: Add mesa SHA-1 functions

2015-01-07 Thread Carl Worth
On Wed, Jan 07 2015, Jose Fonseca wrote: > I lost bit track of email over the Christmas period. Just noticed I had > flagged this one for replay. Sorry. No worries. Thanks for following up now. :-) > Do you still need me to test anything on Windows? If so are the patches > in some pull-able gi

[Mesa-dev] [RFC] mesa/st: Avoid passing a NULL buffer to the drivers

2015-01-07 Thread Tobias Klausmann
If we capture transform feedback from n stream in (n-1) buffers we face a NULL buffer, use the buffer (n-1) to capture the output of stream n. This fixes one piglit test with nvc0: arb_gpu_shader5-xfb-streams-without-invocations Signed-off-by: Tobias Klausmann --- src/mesa/state_tracker/st_c

  1   2   >