Louis-Francis Ratté-Boulianne
c1429a3120
panfrost: Split out internal of panfrost_launch_grid
...
For an upcoming feature (AFBC packing), we're gonna run internal
compute shaders on resources. This commit just split the internal
of `panfrost_launch_grid` so we can run the shader on a given
batch.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012 >
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
91514e7091
panfrost: Make panfrost_resource_create_with_modifier public
...
It allows creating a resource when we already know which modifier
we're gonna use.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012 >
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
542c44ffde
panfrost: Add panfrost_batch_write_bo
...
Needed when writing to a BO from a compute shader when the BO isn't
assigned to a resource yet.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012 >
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
113d88f94d
panfrost: Precalculate stride and nr of blocks for AFBC layouts
...
For AFBC packing, we will need to have the stride of the resource
in terms of superblocks and the total number of blocks. It is
easier to pre-calculate once when initializing the resource layout.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012 >
2023-10-25 14:25:31 +00:00
Louis-Francis Ratté-Boulianne
9f3a79a6a3
panfrost: Add method to get size of AFBC subblocks
...
Each AFBC superblock is subdivised into subblocks that are
compressed individually. For all formats that we currently support,
the subblocks are 4x4 pixels.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012 >
2023-10-25 14:25:30 +00:00
Louis-Francis Ratté-Boulianne
39efd7c245
panfrost: Add methods to determine slice and body alignment
...
Those methods are needed to have the same alignment everywhere
without hard-coding the values
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012 >
2023-10-25 14:25:30 +00:00
Louis-Francis Ratté-Boulianne
6012bde0fc
panfrost: Fix error in comment
...
"linear" -> "tiled"
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012 >
2023-10-25 14:25:30 +00:00
Tapani Pälli
c7e522a9f3
egl: fix leaking drmDevicePtr in _eglFindDevice
...
Fixes: 3a9e1014e1 ("egl: Rename _eglAddDevice() to _eglFindDevice()")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25524 >
2023-10-25 12:37:30 +00:00
Lionel Landwerlin
3de5da7a5d
anv: fixup 32bit build of internal shaders
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 11b4c23d19 ("anv: add ring buffer mode to generated draw optimization")
Fixes: db335d9b73 ("anv: factor out host/gpu internal shaders interfaces")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10037
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25870 >
2023-10-25 11:47:40 +00:00
Christian Gmeiner
471942e06b
etnaviv: Don't leak disk_cache
...
Fixes: 77af1ca690 ("etnaviv: add disk cache")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25877 >
2023-10-25 09:46:37 +00:00
Tapani Pälli
d52c39a6cd
intel/dev: expand existing fix for all gfx12 with small EU count
...
Commit 7db1b94e07 added a fix for ADL-N but this issue has been
reproduced also on RPL-S and is likely common with all gfx12 variants
with a small EU count.
cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25861 >
2023-10-25 05:15:47 +00:00
Caio Oliveira
67450674c0
compiler/types: Move comments and reorganize declarations
...
Move comments from C++ member functions to the C functions. In
some cases just delete comments or consolidate them together.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
dfcca13800
compiler/types: Remove warnings about potential fallthrough
...
None of those cases are expected to fallthrough, but should be unreachable.
Just break them so they get to the unreachable entry at the end.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
9e32cc3d0b
compiler/types: Rename glsl_types.cpp to glsl_types.c
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
c45276c665
compiler/types: Annotate extern "C" only once in glsl_types.cpp
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
cecdc686e4
compiler/types: Remove usages of C++ members in glsl_types.cpp
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
94bdf351dc
compiler/types: Use C instead of C++ constants for builtin types
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
07ee4bd69f
compiler/types: Add remaining type extraction functions and use them in C++
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
ada6183d60
compiler/types: Add glsl_simple_explicit_type() and simplify glsl_simple_type()
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
e17adf51db
compiler/types: Implement glsl_type::field_type() in terms of existing functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
9e514b89a0
compiler/types: Add glsl_get_explicit_*() functions and use them in C++
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
d2a804a25b
compiler/types: Add glsl_get_std430_array_stride() and use it in C++
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
7b42fe62a1
compiler/types: Add glsl_type_uniform_locations() and use it in C++
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
e98ba3b53f
compiler/types: Add glsl_type_compare_no_precision() and use it in C++
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
3ce4d5e033
compiler/types: Add glsl_get_mul_type() and use it in C++
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
795bf4244c
compiler/types: Add more glsl_contains_*() functions and use them in C++
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
2d4a250d21
rusticl: Add bindings for glsl_vector_type()
...
This is going to become inline functions, so add the corresponding
Rust bindings for it first.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
68f80e6fc1
compiler/types: Move remaining code from nir_types to glsl_types
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
b2407d7859
compiler/types: Flip wrapping of numeric type conversion functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
8bebd40d5c
compiler/types: Flip wrapping of remaining small data getters
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
922fe24739
compiler/types: Flip wrapping of remaining non-trivial type getters
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
a5e6e5b6d3
compiler/types: Flip wrapping of get row/column type helpers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
beaac525e8
compiler/types: Flip wrapping of various get instance functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
5c91cf9288
compiler/types: Flip wrapping of texture/sampler/image get instance functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
87b3812f10
compiler/types: Flip wrapping of get_instance()
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
2117158619
compiler/types: Flip wrapping of record_compare
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
e486384540
compiler/types: Flip wrapping of layout related functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
a4cfeea850
compiler/types: Flip wrapping of interface related functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
ad092fcab5
compiler/types: Flip wrapping of struct related functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
421a04f5ba
compiler/types: Flip wrapping of size related functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
418e3be14c
compiler/types: Flip wrapping of CL related functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:12 +00:00
Caio Oliveira
d78110d356
compiler/types: Flip wrapping of cmat related functions
...
Also add a missing `struct` related to cmat.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:11 +00:00
Caio Oliveira
67210f90ad
compiler/types: Flip wrapping of array related functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:11 +00:00
Caio Oliveira
3bf500af7b
compiler/types: Flip wrapping of "type contains?" predicate functions
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25129 >
2023-10-25 01:51:11 +00:00
David Rosca
9b4fccf4b3
radeonsi/vcn: Add encode support for H264 B-frames
...
Tested with ffmpeg and gstreamer vah264enc.
References to B-frames (b_depth/b-pyramid) not supported.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25565 >
2023-10-25 01:03:58 +00:00
David Rosca
3c5d82142d
frontends/va: Fix parsing packed headers without emulation bytes
...
Don't try to handle emulation bytes and only parse first NAL unit
if the packed header has no emulation bytes.
This fixes parsing packed headers from gstreamer.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25565 >
2023-10-25 01:03:58 +00:00
David Rosca
081f972eba
util/vl: Fix vl_rbsp parser with bitstreams without emulation bytes
...
This is used for parsing VA packed headers and those can be without
emulation prevention bytes.
Add emulation_bytes argument to vl_rbsp_init and skip all emulation
bytes handling when set.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25565 >
2023-10-25 01:03:58 +00:00
David Rosca
9e82c5d864
frontends/va: Parse H264 SPS for max_num_reorder_frames
...
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25565 >
2023-10-25 01:03:58 +00:00
Chia-I Wu
b653669fc5
anv: add gen9 astc workaround
...
gen9 does not handle denorms in void extent blocks correctly. We need
to flush them to zero.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25800 >
2023-10-25 00:06:04 +00:00
Chia-I Wu
c42b1a5a74
anv: prep for gen9 astc workaround
...
We will reuse astc emu for gen9 astc workaround. This commit contains
minor cleanups and has no functional change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25800 >
2023-10-25 00:06:04 +00:00