[Mesa-dev] [PATCH] radeonsi: Don't modify PA_SC_RASTER_CONFIG register value if rb_mask == 0

2014-12-09 Thread Michel Dänzer
From: Michel Dänzer michel.daen...@amd.com E.g. this could happen on older kernels which don't support the RADEON_INFO_SI_BACKEND_ENABLED_MASK query yet. The code in si_write_harvested_raster_configs() doesn't deal with this correctly and would probably mangle the value badly. Cc: 10.4 10.3

[Mesa-dev] [Bug 79629] [Dri3 bisected] piglit glx_GLX_ARB_create_context_current_with_no_framebuffer fail

2014-12-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79629 Bug 79629 depends on bug 81551, which changed state. Bug 81551 Summary: [dri3] Mesa does not support explicit fencing https://bugs.freedesktop.org/show_bug.cgi?id=81551 What|Removed |Added

Re: [Mesa-dev] [PATCH V4] mesa: use build flag to ensure stack is realigned on x86

2014-12-09 Thread Matt Turner
Thanks for sticking with it, Timothy! Looks good to me. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965/gen4-5: Cope with immutable-format texture revalidation

2014-12-09 Thread Kenneth Graunke
On Monday, December 08, 2014 08:37:00 PM Chris Forbes wrote: This is unfortunately sometimes necessary due to rebasing levels when rendering into them. 16 piglits crash - pass, when building mesa with debug enabled. Signed-off-by: Chris Forbes chr...@ijw.co.nz ---

Re: [Mesa-dev] [PATCH] r600g/sb: implement r600 gpr index workaround.

2014-12-09 Thread Dave Airlie
On 9 December 2014 at 16:56, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com r600, rv610 and rv630 all have a bug in their GPR indexing and how the hw inserts access to PV. Also, This fixes 120 piglit regressions on rv635 since SB was introduced. Dave.

Re: [Mesa-dev] [PATCH] drirc: set allow_glsl_extension_directive_midshader for Dead Island.

2014-12-09 Thread Sven Arvidsson
On Mon, 2014-12-08 at 13:49 -0800, Ian Romanick wrote: Has the game vendor been notified of their bug? This won't work on any OpenGL ES 2.x or 3.x implementation (there *is* a conformance test), and AMD has said they're going to make their driver be conformant too. Hi, It has been reported

[Mesa-dev] [PATCH] glsl: don't allow invariant qualifiers for interface blocks

2014-12-09 Thread Eduardo Lima Mitev
From: Samuel Iglesias Gonsalvez sigles...@igalia.com GLSL 1.50 and GLSL 4.40 specs, they both say the same in Interface Blocks section: If no optional qualifier is used in a member-declaration, the qualification of the member includes all in, out, patch, uniform, or buffer as determined by

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

2014-12-09 Thread Samuel Iglesias Gonsálvez
We have not got any feedback from this patch yet. Can somebody review it? Notice that there is a regression in piglit which is explained in the commit log. Sam On Monday, December 01, 2014 02:04:50 PM Eduardo Lima Mitev wrote: From: Samuel Iglesias Gonsalvez sigles...@igalia.com GLSL ES

Re: [Mesa-dev] [PATCH] radeonsi: Don't modify PA_SC_RASTER_CONFIG register value if rb_mask == 0

2014-12-09 Thread Marek Olšák
Reviewed-by: Marek Olšák marek.ol...@amd.com On Tue, Dec 9, 2014 at 9:03 AM, Michel Dänzer mic...@daenzer.net wrote: From: Michel Dänzer michel.daen...@amd.com E.g. this could happen on older kernels which don't support the RADEON_INFO_SI_BACKEND_ENABLED_MASK query yet. The code in

[Mesa-dev] [PATCH 1/5] gallium/util: add a helper util_create_shader_from_text, cleanup some code

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com It's exposed, because I plan to use it elsewhere later. --- src/gallium/auxiliary/util/u_simple_shaders.c | 103 -- src/gallium/auxiliary/util/u_simple_shaders.h | 3 + 2 files changed, 49 insertions(+), 57 deletions(-) diff --git

[Mesa-dev] [PATCH 4/5] tgsi: add clip and cull distance writemasks into tgsi_shader_info

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 4 src/gallium/auxiliary/tgsi/tgsi_scan.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index b6c88af..9d155c9 100644

[Mesa-dev] [PATCH 2/5] cso: put cso_release_all into cso_destroy_context

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/auxiliary/cso_cache/cso_context.c | 20 +--- src/gallium/auxiliary/cso_cache/cso_context.h | 4 src/gallium/auxiliary/util/u_tests.c | 1 - src/gallium/state_trackers/nine/device9.c | 1 -

[Mesa-dev] [PATCH 5/5] tgsi: add tgsi_shader_info::writes_clipvertex

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 3 +++ src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 9d155c9..649c327 100644

[Mesa-dev] [PATCH 3/5] tgsi: add tgsi_shader_info::writes_psize

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 3 +++ src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index a23bb40..b6c88af 100644

[Mesa-dev] [PATCH 06/18] radeonsi: generate derived and draw-related registers directly in the CS

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com The big function is split into 3 smaller functions. --- src/gallium/drivers/radeonsi/si_pipe.h | 3 +- src/gallium/drivers/radeonsi/si_state.h | 1 - src/gallium/drivers/radeonsi/si_state_draw.c | 147 ++- 3 files

[Mesa-dev] [PATCH 04/18] radeonsi: remove useless variable si_context::pm4_dirty_cdwords

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_hw_context.c | 4 +--- src/gallium/drivers/radeonsi/si_pipe.h | 4 src/gallium/drivers/radeonsi/si_state_draw.c | 4 3 files changed, 1 insertion(+), 11 deletions(-) diff --git

[Mesa-dev] [PATCH 08/18] radeonsi: get info about VS outputs from tgsi_shader_info

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_shader.c | 27 src/gallium/drivers/radeonsi/si_shader.h | 11 +- src/gallium/drivers/radeonsi/si_state_draw.c | 31 +--- 3 files changed, 34 insertions(+),

[Mesa-dev] [PATCH 02/18] radeonsi: emit draw packets directly into the CS

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_pipe.h | 2 +- src/gallium/drivers/radeonsi/si_state.h | 1 - src/gallium/drivers/radeonsi/si_state_draw.c | 160 --- 3 files changed, 95 insertions(+), 68 deletions(-) diff --git

[Mesa-dev] [PATCH 09/18] radeonsi: emit clip registers only if VS or rasterizer is changed

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_hw_context.c| 1 + src/gallium/drivers/radeonsi/si_pipe.h | 4 ++- src/gallium/drivers/radeonsi/si_state.c | 33 + src/gallium/drivers/radeonsi/si_state_draw.c| 31

[Mesa-dev] [PATCH 12/18] radeonsi: emit GS_OUT_PRIM_TYPE only if it changes

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_hw_context.c | 1 + src/gallium/drivers/radeonsi/si_pipe.h | 1 + src/gallium/drivers/radeonsi/si_state_draw.c | 5 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 11/18] radeonsi: emit primitive restart only if it changes

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_hw_context.c | 2 ++ src/gallium/drivers/radeonsi/si_pipe.h | 9 ++--- src/gallium/drivers/radeonsi/si_state_draw.c | 16 ++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git

[Mesa-dev] [PATCH 01/18] radeonsi: add emit util functions for SH registers

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeon/r600_cs.h | 14 ++ src/gallium/drivers/radeon/r600d_common.h | 5 - 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_cs.h

[Mesa-dev] [PATCH 13/18] radeonsi: remove setting of VGT_DISPATCH_DRAW_INDEX

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com It's used only if VGT_SHADER_STAGES_EN.DISPATCH_DRAW_EN is 1, which we don't set. --- src/gallium/drivers/radeonsi/si_state_draw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c

[Mesa-dev] [PATCH 03/18] radeonsi: remove unused draw packet functions

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_commands.c | 75 -- src/gallium/drivers/radeonsi/si_state.h| 12 - 2 files changed, 87 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_commands.c

[Mesa-dev] [PATCH 05/18] radeonsi: si_conv_pipe_prim shouldn't fail

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com An assertion should suffice. --- src/gallium/drivers/radeonsi/si_state_draw.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c

[Mesa-dev] [PATCH 14/18] radeonsi: emit DRAW_PREAMBLE only if it changes

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_hw_context.c | 2 ++ src/gallium/drivers/radeonsi/si_pipe.h | 2 ++ src/gallium/drivers/radeonsi/si_state_draw.c | 21 + 3 files changed, 17 insertions(+), 8 deletions(-) diff --git

[Mesa-dev] [PATCH 18/18] radeonsi: take into account NULL colorbuffers when computing CB_TARGET_MASK

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_state.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 1bb1f69..097c31c 100644 ---

[Mesa-dev] [PATCH 10/18] radeonsi: emit base vertex and start instance only if they change

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_hw_context.c | 3 +++ src/gallium/drivers/radeonsi/si_pipe.h | 10 ++ src/gallium/drivers/radeonsi/si_state_draw.c | 24 +--- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH 16/18] radeonsi: fix SPI state dependency on sprite_coord_enable

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_state.c | 1 - src/gallium/drivers/radeonsi/si_state_shaders.c | 5 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c

[Mesa-dev] [PATCH 15/18] radeonsi: fix line stippling and provoking vertex state for GS primitives

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com I'm not sure if GS hw outputs line lists or line strips. --- src/gallium/drivers/radeonsi/si_state_draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c

[Mesa-dev] [PATCH 17/18] radeonsi: only emit line stippling and provoking vertex state when it changes

2014-12-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_hw_context.c| 1 + src/gallium/drivers/radeonsi/si_pipe.h | 1 + src/gallium/drivers/radeonsi/si_state.c | 1 + src/gallium/drivers/radeonsi/si_state_draw.c| 5 +

[Mesa-dev] [PATCH 00/18] RadeonSI draw_vbo cleanups, lowering overhead

2014-12-09 Thread Marek Olšák
The performance of the open source game Torcs is improved by approximately 22%. That app is very unoptimized and CPU-bound. Other apps are likely to see smaller improvement or no improvement at all if they're GPU-bound. Marek ___ mesa-dev mailing list

[Mesa-dev] [PATCH v3 24/24] main: remove unused float_to_uint() function

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/format_utils.c | 9 - 1 file changed, 9 deletions(-) diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c index dc63e1f..201231e

[Mesa-dev] [PATCH v3 03/24] mesa/colormac: Remove an unused macro

2014-12-09 Thread Iago Toral Quiroga
From: Jason Ekstrand jason.ekstr...@intel.com 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 jason.ekstr...@intel.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com ---

[Mesa-dev] [PATCH v3 21/24] mesa/pack: use autogenerated format_pack functions

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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 sigles...@igalia.com ---

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

2014-12-09 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

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

2014-12-09 Thread Iago Toral Quiroga
From: Jason Ekstrand jason.ekstr...@intel.com v2 by Iago Toral ito...@igalia.com: - 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

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

2014-12-09 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..7b11cb4 100644 --- a/src/mesa/main/texgetimage.c +++

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

2014-12-09 Thread Iago Toral Quiroga
From: Eduardo Lima Mitev el...@igalia.com _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

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

2014-12-09 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 44bee7d..8640973

[Mesa-dev] [PATCH v3 08/28] mesa: Add _mesa_swap2_copy and _mesa_swap4_copy

2014-12-09 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

[Mesa-dev] [PATCH v3 14/28] mesa: Use _mesa_format_convert to implement get_tex_rgba_compressed.

2014-12-09 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 7b11cb4..ad42782 100644 --- a/src/mesa/main/texgetimage.c +++

[Mesa-dev] [PATCH v3 20/24] mesa: use format conversion functions in swrast

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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 sigles...@igalia.com --- src/mesa/swrast/s_texfetch_tmp.h | 1359

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

2014-12-09 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. --- src/mesa/main/glformats.c | 278

[Mesa-dev] [PATCH v3 06/24] mesa: Fix incorrect assertion in init_teximage_fields_ms

2014-12-09 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

[Mesa-dev] [PATCH v3 17/24] mesa: Add non-normalized formats support for ubyte packing functions

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com v2: - Add clamping for non-normalized integer formats in pack_ubyte*() Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/format_pack.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH v3 01/24] mesa/format_utils: Fix a bug in unorm_to_float helper function

2014-12-09 Thread Iago Toral Quiroga
From: Jason Ekstrand jason.ekstr...@intel.com 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 sigles...@igalia.com: - Modify unorm_to_float() to avoid doing the division when x ==

[Mesa-dev] [PATCH v3 16/28] gallium: Use _mesa_format_convert to implement st_GetTexImage.

2014-12-09 Thread Iago Toral Quiroga
Instead of using _mesa_pack_rgba_span_float. This should allow us to remove that function in a later patch. --- 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_texture.c

[Mesa-dev] [PATCH v3 04/24] mesa: Fix A1R5G5B5 packing/unpacking

2014-12-09 Thread Iago Toral Quiroga
From: Jason Ekstrand jason.ekstr...@intel.com As with B5G6R5, these have been left broken with comments saying they are. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/format_pack.c | 8 +---

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

2014-12-09 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:

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

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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,

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

2014-12-09 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

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

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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

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

2014-12-09 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

[Mesa-dev] [PATCH v3 10/28] mesa: Add helpers to extract GL_COLOR_INDEX to RGBA float/ubyte

2014-12-09 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

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

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com We had previously added the needed mesa formats, so we can simplify the code further. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/pack.c | 282 +-- 1 file

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

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com These are no longer used. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/format_pack.h | 4 -- src/mesa/main/format_pack.py | 121 --- 2 files changed, 125

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

2014-12-09 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..1124aa7 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@

[Mesa-dev] [PATCH v3 28/28] mesa: restrict use of GL_ABGR_EXT format to allowed data types

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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

[Mesa-dev] [PATCH v3 22/28] mesa: Remove (signed) integer pack and span functions.

2014-12-09 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

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

2014-12-09 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

[Mesa-dev] [PATCH v3 13/24] configure: require python mako module

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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 Signed-off-by: Samuel Iglesias Gonsalvez

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

2014-12-09 Thread Iago Toral Quiroga
From: Jason Ekstrand jason.ekstr...@intel.com Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com v2 by Samuel Iglesias sigles...@igalia.com: - Fix compilation errors Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com ---

[Mesa-dev] [PATCH v3 18/24] mesa/format_pack: Add _mesa_pack_int_rgba_row()

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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 sigles...@igalia.com --- src/mesa/main/format_pack.h | 3 ++

[Mesa-dev] [PATCH v3 12/24] mesa: Add a _mesa_is_format_color_format helper

2014-12-09 Thread Iago Toral Quiroga
From: Jason Ekstrand jason.ekstr...@intel.com --- 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 +++

[Mesa-dev] [PATCH v3 02/24] mesa: Fix packing/unpacking of MESA_FORMAT_R5G6B5_UNORM

2014-12-09 Thread Iago Toral Quiroga
From: Jason Ekstrand jason.ekstr...@intel.com 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

[Mesa-dev] [PATCH v3 00/24] auto-generate pack/unpack functions

2014-12-09 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-v3 Links to previous versions of the series: v2:

[Mesa-dev] [PATCH v3 19/24] mesa/formats: add new mesa formats and their pack/unpack functions.

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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:

[Mesa-dev] [PATCH v3 19/28] mesa: Remove _mesa_make_temp_ubyte_image

2014-12-09 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

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

2014-12-09 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 | 262 --- src/mesa/main/format_utils.h | 8 +- 2 files changed,

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

2014-12-09 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. --- src/mesa/swrast/s_drawpix.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/src/mesa/swrast/s_drawpix.c

[Mesa-dev] [PATCH v3 05/24] mesa: Fix get_texbuffer_format().

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com We were returning incorrect mesa formats for GL_LUMINANCE_ALPHA16I_EXT and GL_LUMINANCE_ALPHA32I_EXT. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com ---

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

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com We will use this in a later patch to refactor _mesa_pack_rgba_span_float. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/pack_tmp.h | 75 +++- 1 file changed, 74

[Mesa-dev] [PATCH v3 09/24] swrast: Remove unused variable.

2014-12-09 Thread Iago Toral Quiroga
Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- 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 v3 21/28] mesa: Remove _mesa_unpack_color_span_ubyte

2014-12-09 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

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

2014-12-09 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

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

2014-12-09 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

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

2014-12-09 Thread Iago Toral Quiroga
From: Jason Ekstrand jason.ekstr...@intel.com 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

[Mesa-dev] [PATCH v3 11/28] mesa: Use _mesa_format_convert to implement texstore_rgba.

2014-12-09 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 v3 20/28] mesa: Remove _mesa_make_temp_float_image

2014-12-09 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. --- src/mesa/main/texcompress_bptc.c | 20 +++---

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

2014-12-09 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 7e6f99c..07c64de 100644 --- a/src/mesa/main/pack.c

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

2014-12-09 Thread Iago Toral Quiroga
This is no longer used. --- 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 5d752f5..4e297ea 100644 --- a/src/mesa/main/pack.c +++

[Mesa-dev] [PATCH v3 27/28] mesa: Remove _mesa_rebase_rgba_uint and _mesa_rebase_rgba_float

2014-12-09 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

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

2014-12-09 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com 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:

Re: [Mesa-dev] [PATCH v3 00/24] auto-generate pack/unpack functions

2014-12-09 Thread Iago Toral
On Tue, 2014-12-09 at 13:06 +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-v3 As with the

Re: [Mesa-dev] [PATCH v3 16/28] gallium: Use _mesa_format_convert to implement st_GetTexImage.

2014-12-09 Thread Roland Scheidegger
This ought to be st/mesa: not gallium: in the shortlog. Otherwise makes sense. Roland Am 09.12.2014 um 13:07 schrieb Iago Toral Quiroga: Instead of using _mesa_pack_rgba_span_float. This should allow us to remove that function in a later patch. --- src/mesa/state_tracker/st_cb_texture.c |

Re: [Mesa-dev] [PATCH 09/18] radeonsi: emit clip registers only if VS or rasterizer is changed

2014-12-09 Thread Marek Olšák
sctx-clip_regs.dirty = true; should also be added into si_bind_gs_shader. Consider it done. Marek On Tue, Dec 9, 2014 at 12:39 PM, Marek Olšák mar...@gmail.com wrote: From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_hw_context.c| 1 +

Re: [Mesa-dev] [PATCH 08/18] radeonsi: get info about VS outputs from tgsi_shader_info

2014-12-09 Thread Ilia Mirkin
On Tue, Dec 9, 2014 at 6:39 AM, Marek Olšák mar...@gmail.com wrote: From: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/radeonsi/si_shader.c | 27 src/gallium/drivers/radeonsi/si_shader.h | 11 +-

Re: [Mesa-dev] [PATCH 08/18] radeonsi: get info about VS outputs from tgsi_shader_info

2014-12-09 Thread Marek Olšák
If clip distances are used, there can be 8 of them. Otherwise, if user clip planes are used, there can only be 6 of them. If clip vertex is used, there can still only be 6 clip planes - even though they are lowered to clip distances. So first the writemask for clip distances is computed:

Re: [Mesa-dev] [PATCH 08/18] radeonsi: get info about VS outputs from tgsi_shader_info

2014-12-09 Thread Ilia Mirkin
On Tue, Dec 9, 2014 at 10:05 AM, Marek Olšák mar...@gmail.com wrote: If clip distances are used, there can be 8 of them. Otherwise, if user clip planes are used, there can only be 6 of them. If clip vertex is used, there can still only be 6 clip planes - even though they are lowered to clip

Re: [Mesa-dev] [PATCH 1/5] gallium/util: add a helper util_create_shader_from_text, cleanup some code

2014-12-09 Thread Brian Paul
Series LGTM. Reviewed-by: Brian Paul bri...@vmware.com On 12/09/2014 04:28 AM, Marek Olšák wrote: From: Marek Olšák marek.ol...@amd.com It's exposed, because I plan to use it elsewhere later. --- src/gallium/auxiliary/util/u_simple_shaders.c | 103 --

Re: [Mesa-dev] [PATCH 08/18] radeonsi: get info about VS outputs from tgsi_shader_info

2014-12-09 Thread Marek Olšák
It looks like clip planes are deprecated, so you can only use them with the compatibility profile. Sure we could support 8 clip planes if ClipVertex is written, but: - we can only support 6 clip planes if ClipVertex isn't written - pipe_context::set_clip_state can set only 6 clip planes Marek

Re: [Mesa-dev] [PATCH 08/18] radeonsi: get info about VS outputs from tgsi_shader_info

2014-12-09 Thread Ilia Mirkin
On Tue, Dec 9, 2014 at 10:22 AM, Marek Olšák mar...@gmail.com wrote: It looks like clip planes are deprecated, so you can only use them with the compatibility profile. Right. Sure we could support 8 clip planes if ClipVertex is written, but: - we can only support 6 clip planes if ClipVertex

Re: [Mesa-dev] [PATCH 08/18] radeonsi: get info about VS outputs from tgsi_shader_info

2014-12-09 Thread Marek Olšák
Our hw can only do 6 legacy clip planes without ClipVertex. We would have to lower them to clip distances to be able to support 8, which is something I'd rather not do. (there would be more shader work or more shader variants) Marek On Tue, Dec 9, 2014 at 4:29 PM, Ilia Mirkin

Re: [Mesa-dev] [PATCH 1/5] gallium/util: add a helper util_create_shader_from_text, cleanup some code

2014-12-09 Thread Ilia Mirkin
On Tue, Dec 9, 2014 at 6:28 AM, Marek Olšák mar...@gmail.com wrote: diff --git a/src/gallium/auxiliary/util/u_simple_shaders.h b/src/gallium/auxiliary/util/u_simple_shaders.h index dd282e0..12f50f8 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.h +++

Re: [Mesa-dev] [PATCH] radeonsi: Don't modify PA_SC_RASTER_CONFIG register value if rb_mask == 0

2014-12-09 Thread Tom Stellard
On Tue, Dec 09, 2014 at 05:03:50PM +0900, Michel Dänzer wrote: From: Michel Dänzer michel.daen...@amd.com E.g. this could happen on older kernels which don't support the RADEON_INFO_SI_BACKEND_ENABLED_MASK query yet. The code in si_write_harvested_raster_configs() doesn't deal with this

[Mesa-dev] [PATCH] gallium/aux: Avoid redefining MAX

2014-12-09 Thread Alexander von Gluck IV
* Can be redefined on some platforms through u_debug.h --- src/gallium/auxiliary/cso_cache/cso_hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.c b/src/gallium/auxiliary/cso_cache/cso_hash.c index e04d8ed..2a3f361 100644 ---

[Mesa-dev] [PATCH] gallium/aux: Avoid redefining MAX

2014-12-09 Thread Alexander von Gluck IV
* Can be redefined on some platforms through u_debug.h --- src/gallium/auxiliary/cso_cache/cso_hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.c b/src/gallium/auxiliary/cso_cache/cso_hash.c index e04d8ed..2a3f361 100644 ---

[Mesa-dev] [PATCH] gallium/aux: Avoid redefining MAX

2014-12-09 Thread Alexander von Gluck IV
* Can be redefined on some platforms through u_debug.h --- src/gallium/auxiliary/cso_cache/cso_hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.c b/src/gallium/auxiliary/cso_cache/cso_hash.c index e04d8ed..2a3f361 100644 ---

[Mesa-dev] Compiling llvm windows name mangled

2014-12-09 Thread Jason Anderssen
Hi All, I am trying to compile osmesa on linux with llvm for win32. I added the CFLAGS += -DUSE_MGL_NAMESPACE to the environment of the SConstruct, and the build process seems to be ok until the end when it tries to link the opengl32.dll, basically a lot of symbol not defined errors. Was

  1   2   >