Jose Maria Casanova Crespo
4ea4147935
gallium/dri: Add P030 format
...
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19639 >
2022-11-21 09:08:44 +00:00
Yonggang Luo
94886a2975
util: Move src/gallium/include/pipe/p_format.h to src/util/format/u_formats.h
...
Because p_format.h shared between vulkan drivers and opengl drivers
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19629 >
2022-11-19 03:38:19 +00:00
Yonggang Luo
6832a9433d
util: convert usage of uint to unsigned in u_format.h
...
Because uint comes from pipe/p_compiler.h, and that depends will be removed in future
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19676 >
2022-11-19 01:37:46 +00:00
Yonggang Luo
b728bed567
util: use void * instead of byte * for util_copy_rect in u_format.h
...
As ubyte comes from p_compiler.h, so do not use it,
and the code calles util_copy_rect may use args with type uint8_t*, ubyte* or unsigned char*,
so use the type void* that consistence with memcpy
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19676 >
2022-11-19 01:37:46 +00:00
Yonggang Luo
557120b593
util: Include the needed util/detect*.h headers in multiple files
...
This is discovered either by manually or -W-no-def option
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674 >
2022-11-15 20:35:55 +00:00
Yonggang Luo
1accc0df64
tree-wide: Convert all usage of PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* by use grep
...
This should be the last commit, and should be take care that can only in comment block or
version
Exclude files:
src/util/detect_*.h
From:
PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
DETECT_$1_$2
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674 >
2022-11-15 20:35:55 +00:00
Yonggang Luo
1817659bb6
tree-wide: Convert all usage of #ifdef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH|CC)_* by use grep
...
From:
#ifdef[\s]+PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
#if DETECT_$1_$2
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674 >
2022-11-15 20:35:55 +00:00
Yonggang Luo
80fac8637b
tree-wide: Convert all usage of defined(PIPE_(OS|ARCH|CC)_*) to DETECT_(OS|ARCH|CC)_* by use grep
...
From:
defined[\s]*\([\s]*PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)[\s]*\)
To:
DETECT_$1_$2
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674 >
2022-11-15 20:35:55 +00:00
Yonggang Luo
845222dbae
util: Rename src/gallium/include/pipe/p_config.h to src/util/detect_arch.h
...
Even though the defines in p_config.h are stared with PIPE_, they are indeed
are generic detecting mechanics, we will rename them to DETECT_* in latter MR
We rename src/gallium/include/pipe/p_config.h src/util/detect_arch.h because
the detect code in src/gallium/include/pipe/p_config.h are most about
processor architecture detecting.
The file util/detect.h is added to replace functional of src/gallium/include/pipe/p_config.h
So we replace of #include "pipe/p_config.h" with #include "util/detect.h"
The file util/detect_cc.h is added as a placeholder for moving compiler related macro defines
from p_config.h into it in following commits
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674 >
2022-11-15 20:35:55 +00:00
Yonggang Luo
5d794e8e3d
util: Replace usage of boolean with c11 bool in src/util/format/* and src/util/tests/format/*
...
This is done by find and replace:
boolean -> bool
TRUE -> true
FALSE -> false
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19649 >
2022-11-11 06:48:46 +00:00
Yonggang Luo
beea3548ce
util: Move texcompress template files into util/format
...
Because these files are accessed in util/format/u_format_*.c
To make sure util are self contained we need move these files
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19547 >
2022-11-10 05:35:41 +00:00
Yonggang Luo
a37e3b7199
util: #include "c11/threads.h" instead of #include "util/u_cpu_detect.h" u_format.c
...
As it does not access any symbols in util/u_cpu_detect.h but accessed symbols in "c11/threads.h"
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19266 >
2022-10-25 11:06:05 +00:00
James Zhu
9055ab9de3
util/format: add util format y8_400_unorm
...
Signed-off-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18914 >
2022-10-07 15:14:39 +00:00
Kai Wasserbäch
e52d3d5f1c
fix: util/format: unused variable ‘desc’ [-Wunused-variable]
...
Only used in debug builds.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org >
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18643 >
2022-09-19 22:02:16 +00:00
Erik Faye-Lund
a6ed406d9f
util/format: implement rgtc -> r8 / r8g8 unpack
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Tested-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18248 >
2022-09-15 08:16:01 +00:00
Erik Faye-Lund
dfbcd94041
util/format: allow unpacking less than a block from rgtc
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Tested-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18248 >
2022-09-15 08:16:01 +00:00
Erik Faye-Lund
6e1c3e98cd
util/format: fix broken indentation
...
This file had a mixture of tabs and spaces for indent.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Tested-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18248 >
2022-09-15 08:16:01 +00:00
Erik Faye-Lund
a321d157c6
util: allow unpacking less than a block from dxt
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18180 >
2022-09-06 12:55:02 +00:00
Rhys Perry
dfbb4b384a
util/format,vulkan/format: update p_format for Vulkan vertex buffers
...
We need to move some earlier (so they are <= 255 like the comment says)
and add a few 64-bit ones.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17894 >
2022-08-30 19:02:11 +00:00
Erik Faye-Lund
253b521b6e
mesa/main: remove always-true define
...
We don't include this header anwhere where BPTC_BLOCK_DECODE isn't
already true, so let's remove it.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Soroush Kashani <soroush.kashani@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18012 >
2022-08-30 08:36:47 +00:00
Yonggang Luo
075b72ea06
util: Fixes invalid assumption that return non null by function util_format_fetch_rgba_func
...
Fixes: e342081c ("util/format: Assert that formats are valid")
Closes #7020
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024 >
2022-08-12 18:06:36 +00:00
Mike Blumenkrantz
a5b2725894
util/format: handle SRGB in util_format_luminance_to_red()
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687 >
2022-08-12 14:24:52 +00:00
Marek Olšák
788dce46a3
radeonsi: add a randomized blit test
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17864 >
2022-08-03 00:57:16 +00:00
Marek Olšák
2208ff7a5b
util/format: add util_format_rgbx_to_rgba helper
...
Image stores don't like RGBX on AMD. This is required by compute blits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17864 >
2022-08-03 00:57:16 +00:00
Konstantin Seurer
c48497593a
util/format: Remove format desc null checks
...
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490 >
2022-07-21 12:48:01 +00:00
Konstantin Seurer
e342081c37
util/format: Assert that formats are valid
...
It should be the responsibility of the driver to make sure, that "format" is a valid pipe_format.
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490 >
2022-07-21 12:48:01 +00:00
Konstantin Seurer
2b02ac2779
util/format: Use an explicit length for the descs
...
The script that generates the format tables does not set every pipe_format.
In practice, the length of the format tables is equal to PIPE_FORMAT_COUNT.
I just added the explicit size to future-proof it.
(If the largest valid format is not part of the format tables,
there will be a mismatch between the array length and PIPE_FORMAT_COUNT)
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490 >
2022-07-21 12:48:01 +00:00
Mike Blumenkrantz
ba09a00a5c
format_utils: properly parenthesize macro params
...
this otherwise breaks evaluation of the parameters on arm64
cc: mesa-stable
fixes #6496
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16860 >
2022-06-04 13:15:57 +00:00
Erik Faye-Lund
9ec514ded7
util: add missing c99_compat.h includes
...
These headers use the "restrict" keyword, so they need to include
c99_compat.h in case they get included from C++.
Right now, we include c99_compat.h in many needless places, which saves
us. But we're about to stop doing that.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812 >
2022-06-02 13:09:15 +00:00
Sil Vilerino
b2b907f052
util/u_format: Drop assert that has valid/well-defined behavior
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286 >
2022-05-17 21:02:24 +00:00
Marek Olšák
2d4067a6fb
util: change util_format_snorm8_to_sint8 -> snorm_to_sint for radeonsi
...
Convert all SNORM formats to SINT.
This fixes SNORM blits for radeonsi.
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16132 >
2022-04-28 12:44:13 +00:00
Marek Olšák
09d6ebac7e
util: add pipe formats R10G10B10X2_SINT, B10G10R10X2_SINT, G16R16_SINT
...
needed by radeonsi
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16132 >
2022-04-28 12:44:13 +00:00
Dave Airlie
783cab811d
util/format: add new z24/s8 packing helper to pack z32/s8.
...
If zink runs on top of a vulkan impl with no 24-bit float support
it needs support to pack into 24-bit for GL.
To avoid having to make a temp copy, add a new helper to convert
and pack.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15516 >
2022-03-26 01:22:15 +00:00
Yonggang Luo
d9c3601e29
util: trim trailing space for files src/util/**/*
...
Using the following bash script doing that
```
cd src/util
find . -type f -print0 | xargs -0 -n1 sed -i 's/[ \t]*$//'
```
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15093 >
2022-03-21 17:57:15 +00:00
Emma Anholt
2e6810a06a
util/format: Add G8_B8R8_420_UNORM to match Vulkan.
...
turnip was playing fast and loose with the name, using the R8_G8B8 format
name but actually setting the descriptors up to read G8_B8R8 like Vulkan
(sensibly) wants. This caused trouble when trying to make freedreno and
turnip share code. By having both orderings as format names, we can share
the descriptor code and also confuse readers less.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13443 >
2021-11-11 00:10:57 +00:00
Emma Anholt
271b6cb981
util: Rename PIPE_FORMAT_G8_B8_R8_420_UNORM.
...
The only user, turnip, was actually treating it as this layout, matching
vulkan's specification of how the planes map to RGB values. (Y=G means
that Cb=B and Cr=R).
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13443 >
2021-11-11 00:10:57 +00:00
Matt Turner
e0a74c7cad
util/format: Add PIPE_FORMAT_Y8_UNORM as an "other" layout format
...
freedreno has a different layout for tiled Y8 planes from normal R8
textures, so we need to be able to talk about them separately.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6792 >
2021-10-22 11:25:30 +00:00
Emma Anholt
68f8bbb37e
util: Move freedreno's snorm-to-unorm to util/, adding remaining cases.
...
I want it in turnip too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13379 >
2021-10-21 08:46:31 +00:00
Emma Anholt
e47b4ba629
util/format: Add an RGB planar format for YV12, like we have for NV12.
...
Turnip will use this for mapping the to the corresponding hardware format,
and we could also extend mesa/st to avoid adding extra samplers for
external image sampling of YV12 on freedreno.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046 >
2021-10-05 20:09:17 +00:00
Adrian Bunk
7155676618
util/format: NEON is not available with the soft-float ABI
...
Fixes: 80923e8d58 ("util/format: Add some NEON intrinsics-based u_format_unpack.")
Reviewed-by: Emma Anholt <emma@anholt.net >
Tested-by: Ross Burton <ross.burton@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12569 >
2021-09-01 15:18:02 +00:00
Eric Engestrom
f1eae2f8bb
python: drop python2 support
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Jose Fonseca <jfonseca@vmware.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674 >
2021-08-14 21:44:32 +00:00
Axel Davy
6a0e703512
util: Fix translate from block compressed to rgba
...
Since
2b5178ee util: Switch the non-block formats to unpacking rgba rows instead of rects,
compressed formats define unpack_rgba_8unorm_rect instead
of unpack_rgba_8unorm.
Fixes the u_format_translate check to take this into account.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5201
Fixes: 2b5178ee ("util: Switch the non-block formats to unpacking rgba rows instead of rects")
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12315 >
2021-08-12 20:30:42 +00:00
Ian Romanick
72259a870f
util: Add and use functions to calculate min and max int for a size
...
Many places need to know the maximum or minimum possible value for a
given size integer... so everyone just open-codes their favorite
version. There is some potential to hit either undefined or
implementation-defined behavior, so having one version that Just Works
seems beneficial.
v2: Fix copy-and-pasted bug (INT64_MAX instead of INT64_MIN) in
u_intmin. Noticed by CI. Lol. Rename functions
`s/u_(uint|int)(min|max)/u_\1N_\2/g`. Suggested by Jason. Add some
unit tests that would have caught the copy-and-paste bug before wasting
CI time. Change the implementation of u_intN_min to use the same
pattern as stdint.h. This avoids the integer division. Noticed by
Jason.
v3: Add changes to convert_clear_color
(src/gallium/drivers/iris/iris_clear.c). Suggested by Nanley.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12177 >
2021-08-03 12:55:02 -07:00
Marek Olšák
4a713c568b
gallium: add multi-component 64-bit UINT formats for raw double vertex attribs
...
This is the distinction between formats:
- PIPE_FORMAT_R64_FLOAT is the legacy "convert-to-float" vertex format.
- PIPE_FORMAT_R64_UINT is the raw double format.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11370 >
2021-08-02 19:58:28 +00:00
Sergii Melikhov
8251bd216e
util/format: Change the pointer offset.
...
Changed the pointer offset to 2 to account for the second structure variable.
Fixes: 90f98b56f8 ("mesa: Deduplicate _mesa_pack_uint_z_row().")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4685
Signed-off-by: Sergii Melikhov <sergii.v.melikhov@globallogic.com >
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11060 >
2021-06-03 04:44:24 +00:00
Eric Anholt
7403463508
u_format: Use the computed BE channels/swizzles for bitmask formats.
...
No more error-prone encoding of swizzles in the .csv for non-planar
formats!
No change to generated u_format_table.c
Acked-by: Adam Jackson <ajax@redhat.com >
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10505 >
2021-06-03 00:12:39 +00:00
Eric Anholt
1c1997267f
u_format: Sanity check that BE swizzles are appropriately mapped from LE.
...
Once you read enough of them, there's an obvious pattern that we can just
write a little code for instead of making every dev write it out each time.
Acked-by: Adam Jackson <ajax@redhat.com >
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10505 >
2021-06-03 00:12:39 +00:00
Eric Anholt
36569b9f8c
u_format: Sanity check the BE channels for all bitmask formats.
...
Just check against the CSV (which has its codegen now tested with
u_format_test in CI) for now, so we know that our computed channels are
correct.
Acked-by: Adam Jackson <ajax@redhat.com >
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10505 >
2021-06-03 00:12:39 +00:00
Eric Anholt
9d77cecf88
u_format: Fix the BE channel ordering for R5G5B5A1_UINT.
...
It notably didn't fit the pattern of RGB5_A1_UNORM, and violated the
general pattern for bitmask format BE channels (channels are ordered
right-to-left in the BE columns in the CSV due to the parser walking them
in that order for historical reasons).
Acked-by: Adam Jackson <ajax@redhat.com >
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10505 >
2021-06-03 00:12:39 +00:00
Eric Anholt
4dac360d5a
u_format: Define tests for r3g3b2 formats and fix BE swizzles for them.
...
These tests passed for LE, and the BE channel ordering specified obviously
didn't fit the pattern of the other BE formats (channels are listed
right-to-left in the BE columns for historical reasons).
Note that we can't write pure-integer format tests in u_format_tests.c
currently.
Acked-by: Adam Jackson <ajax@redhat.com >
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10505 >
2021-06-03 00:12:39 +00:00