On Tue, 2014-12-09 at 15:01 +0100, Roland Scheidegger wrote:
> This ought to be st/mesa: not gallium: in the shortlog. Otherwise makes
> sense.
>
> Roland
Fixed locally. Thanks!
Iago
> Am 09.12.2014 um 13:07 schrieb Iago Toral Quiroga:
> > Instead of using _mesa_pack_rgba_span_float. This shoul
On 09.12.2014 20:39, Marek Olšák wrote:
>
> @@ -155,4 +155,7 @@ void si_begin_new_cs(struct si_context *ctx)
> r600_postflush_resume_features(&ctx->b);
>
> ctx->b.initial_gfx_cs_size = ctx->b.rings.gfx.cs->cdw;
> + ctx->last_base_vertex = SI_BASE_VERTEX_UNKNOWN;
> + ctx->last
It seems to have been forgotten during viewports array implementation time.
---
src/glsl/builtin_variables.cpp | 4
src/glsl/glsl_parser_extras.cpp | 3 +++
src/glsl/glsl_parser_extras.h | 3 +++
3 files changed, 10 insertions(+)
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/buil
On Wednesday, December 10, 2014 03:53:57 PM Michel Dänzer wrote:
> On 09.12.2014 21:06, Iago Toral Quiroga wrote:
> > 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
On 09.12.2014 21:06, Iago Toral Quiroga wrote:
> 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 unorm_to_float() to avoid doing the division
On 12/08/2014 01:45 PM, Ian Romanick wrote:
> On 12/02/2014 12:10 AM, Valentin Corfu wrote:
>> With this check we can avoid segmentation fault when invalid value used
>> during eglCreateContext.
>>
>> Cc: mesa-sta...@lists.freedesktop.org
>> Cc: mesa-dev@lists.freedesktop.org
>> Signed-off-by: Val
On Tue, Dec 9, 2014 at 12:44 AM, Roland Scheidegger wrote:
> Am 09.12.2014 um 02:31 schrieb Dave Airlie:
>> From: Dave Airlie
>>
>> Since d8da6deceadf5e48201d848b7061dad17a5b7cac where the
>> state tracker started using UCMP on cayman a number of tests
>> regressed.
>>
>> this seems to be r600g i
On Wed, 10 Dec 2014 04:55:21 +0100, Dave Airlie wrote:
From: Dave Airlie
On evergreen there are 4 regs, on r600/700 there is only one.
Don't initialise regs and trash someone elses state.
Not sure this fixes anything, but hey one less stupid.
Signed-off-by: Dave Airlie
---
src/gallium/dr
From: Dave Airlie
On evergreen there are 4 regs, on r600/700 there is only one.
Don't initialise regs and trash someone elses state.
Not sure this fixes anything, but hey one less stupid.
Signed-off-by: Dave Airlie
---
src/gallium/drivers/r600/r600_state.c | 7 ++-
1 file changed, 2 inse
On Tue, Dec 09, 2014 at 04:03:00PM -0800, Ben Widawsky wrote:
> Quoting the workaround already there:
> "This field must be set to VALIGN_4 for all tiled Y Render Target surfaces."
>
> This patch simply asserts we return Y tiled, instead of X or Y. It has no
> effect
> on the code since the only
From: Roland Scheidegger
This stage only worked for traditional old-school flatshading, it did ignore
constant interpolated values and only handled colors, the code probably
predates using of constant interpolated values in gallium. So fix this - the
clip stage apparently did this a long time ago
From: Roland Scheidegger
Because all topologies are reduced to basic primitives (i.e. no strips, fans)
and the vertices involved are all copied, there's no need for any elaborate
decisions where to insert the prim id. The logic employed was correct for
first provoking vertex, but didn't account a
From: Roland Scheidegger
The previous language was a bit misleading, since it sounded like
w was interpolated then the reciprocal calculated which isn't what
should be happening.
---
src/gallium/docs/source/tgsi.rst | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/ga
From: Dave Airlie
According to NDA docs:
FMASK surfaces are addressed identically a surface with num_samples bits per
element, and
log2(num_samples) samples. For example, an FMASK for an 8-sample surface would
be addressed
identically to a color surface with 8 bits per element and 3 samples.
S
On Wed, 10 Dec 2014 02:25:23 +0100, Dave Airlie wrote:
From: Dave Airlie
r600, rv610 and rv630 all have a bug in their GPR indexing
and how the hw inserts access to PV.
If the base index for the src is the same as the dst gpr
in a previous group, then it will use PV instead of using
the inde
From: Dave Airlie
r600, rv610 and rv630 all have a bug in their GPR indexing
and how the hw inserts access to PV.
If the base index for the src is the same as the dst gpr
in a previous group, then it will use PV instead of using
the indexed gpr correctly.
The workaround is to insert a NOP when
On , Matt Turner wrote:
On Tue, Dec 9, 2014 at 1:21 PM, Alexander von Gluck
wrote:
* Can be redefined on some platforms through u_debug.h
I think this is now the fourth copy of this message I've received?
___
mesa-dev mailing list
mesa-dev@lists.fre
On Tue, Dec 9, 2014 at 1:21 PM, Alexander von Gluck
wrote:
> * Can be redefined on some platforms through u_debug.h
I think this is now the fourth copy of this message I've received?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.
On Tue, Dec 09, 2014 at 04:14:14PM -0800, Matt Turner wrote:
> On Tue, Dec 9, 2014 at 4:02 PM, Ben Widawsky
> wrote:
> > Let's assume that this IVB specific feature exists on BYT too, since it's
> > very
> > much like IVB
>
> To clarify, the feature does *not* exist on Haswell and newer?
>
> Yo
On Tue, Dec 9, 2014 at 4:02 PM, Ben Widawsky
wrote:
> Let's assume that this IVB specific feature exists on BYT too, since it's very
> much like IVB
To clarify, the feature does *not* exist on Haswell and newer?
Your commit summary abruptly
___
mesa-de
On Thu, Oct 02, 2014 at 07:44:57PM +0200, Luc Verhaegen wrote:
> Hi,
>
> At FOSDEM on the 31st of january and the 1st of February 2015, there
> will be another graphics DevRoom. URL: https://fosdem.org/2015/
> Slots will be handed out on a first come, first serve basis. The best
> slots will go
* 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
--- a/src/gallium/auxili
On Tue, Dec 09, 2014 at 05:42:42PM -0600, Aaron Watry wrote:
> Signed-off-by: Aaron Watry
Reviewed-by: Tom Stellard
> ---
> src/gallium/state_trackers/clover/llvm/invocation.cpp | 4
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp
>
The most recent docs I can find say this workaround is needed for Sandybridge
only. It says GEN6+ support linear, X, and Y, while GEN6 must be X or Y.
commit c189840b21e176d87cbb382e64e848061b8c7b06
Author: Kenneth Graunke
Date: Tue Aug 13 15:03:12 2013 -0700
i965: Force X-tiling for 128 b
Quoting the workaround already there:
"This field must be set to VALIGN_4 for all tiled Y Render Target surfaces."
This patch simply asserts we return Y tiled, instead of X or Y. It has no effect
on the code since the only caller already does the right thing. However, I think
it makes the workarou
Let's assume that this IVB specific feature exists on BYT too, since it's very
much like IVB
Signed-off-by: Ben Widawsky
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
b/src/mesa
As far as I can tell, this restriction is always needed.
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index efe63b5..25bf37b 10064
Am 09.12.2014 um 12:28 schrieb Marek Olšák:
> From: Marek Olšák
>
> ---
> 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/tg
Signed-off-by: Aaron Watry
---
src/gallium/state_trackers/clover/llvm/invocation.cpp | 4
1 file changed, 4 insertions(+)
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp
b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index cda447d..5265d10 100644
--- a/src/galli
Okay... forgive my ignorance about this topic.
It's my understanding that the ability to use explicit fences in Present
exists to support GPUs like those from NVIDIA that have multiple
rendering rings. On those GPUs, some mechanism is needed to synchronize
across the rings so that rendering is fi
From: Dave Airlie
r600, rv610 and rv630 all have a bug in their GPR indexing
and how the hw inserts access to PV.
If the base index for the src is the same as the dst gpr
in a previous group, then it will use PV instead of using
the indexed gpr correctly.
The workaround is to insert a NOP when
* Use print macro to fix warning on 64-bit systems
---
src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp
b/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp
inde
From: Adrien Destugues
* Allow using symlinks to add-ons when developing.
---
src/hgl/GLRendererRoster.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hgl/GLRendererRoster.cpp b/src/hgl/GLRendererRoster.cpp
index d29f7ec..9e5d847 100644
--- a/src/hgl/GLRendererRos
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 wonde
* 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
--- a/src/gallium/auxil
* 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
--- a/src/gallium/aux
* 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
--- a/src/gallium/auxil
On Tue, Dec 09, 2014 at 05:03:50PM +0900, Michel Dänzer wrote:
> From: Michel Dänzer
>
> 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
On Tue, Dec 9, 2014 at 6:28 AM, Marek Olšák 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
> +++ b/src/gallium/auxiliary/util/u_simple_shade
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 wrote:
> On Tue, De
On Tue, Dec 9, 2014 at 10:22 AM, Marek Olšák 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 isn't writt
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
O
Series LGTM. Reviewed-by: Brian Paul
On 12/09/2014 04:28 AM, Marek Olšák wrote:
From: Marek Olšák
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
On Tue, Dec 9, 2014 at 10:05 AM, Marek Olšák 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 distances.
Ah
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:
unsigned
On Tue, Dec 9, 2014 at 6:39 AM, Marek Olšák wrote:
> From: Marek Olšák
>
> ---
> 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
> +---
"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 wrote:
> From: Marek Olšák
>
> ---
> src/gallium/drivers/radeonsi/si_hw_context.c| 1 +
> src/gallium/drivers/radeonsi/si_pipe.h | 4
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
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
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
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
+++
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
+++ b/src/m
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 07c64de..c4
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 +--
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 +++---
sr
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
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 4e297ea..db8a3e
Reviewed-by: Ian Romanick
---
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
@@ -414,7 +414,6 @@ draw_rgba
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
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 b/src/mes
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
---
src/mesa/main/teximage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
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
---
src/mesa/main/pack_tmp.h | 75 +++-
1 file changed, 74 insertions(+), 1 deletion(-)
diff --git a/s
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
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
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
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
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(-)
From: Samuel Iglesias Gonsalvez
These are no longer used.
Signed-off-by: Samuel Iglesias Gonsalvez
---
src/mesa/main/format_pack.h | 4 --
src/mesa/main/format_pack.py | 121 ---
2 files changed, 125 deletions(-)
diff --git a/src/mesa/main/format_pac
---
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
@@ -39,6
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
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 db8a3e0..44bee7d
_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
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
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, 1
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
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
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"
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
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: http://lists.freedesktop.org/arch
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
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
---
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
+++ b/src/mesa/main/texgetim
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
---
src/mesa/swrast/s_texfetch_tmp.h | 1359 --
1 file changed, 122 inserti
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 ++
_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
From: Samuel Iglesias Gonsalvez
v2:
- Add clamping for non-normalized integer formats in pack_ubyte*()
Signed-off-by: Samuel Iglesias Gonsalvez
---
src/mesa/main/format_pack.py | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/format_pack.py b/src/mesa/ma
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 unorm_to_float() to avoid doing the division when
x == -MAX_INT(src_bits)
Reviewed-by: Ian Romanick
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
b/src/mesa/state_tra
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
Signed-off-by: Samuel Iglesias Gonsalvez
---
configure.ac
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 +
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 +++
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
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
---
src/mesa/main
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
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
---
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
+++ b/src/mesa/main/texget
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
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 10
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 +++-
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/
1 - 100 of 134 matches
Mail list logo