Alyssa Rosenzweig
8c0cb56fd9
panfrost: Enable YTR where allowed
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:20 -04:00
Alyssa Rosenzweig
acb8dcfebd
panfrost: Choose AFBC when available
...
There are lots of reasons we might fallback on u-interleaved tiling, but
when we can use AFBC, it's a big win.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:20 -04:00
Alyssa Rosenzweig
c54d45dd90
panfrost: Import staging routines from freedreno
...
For software access to AFBC textures.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:20 -04:00
Alyssa Rosenzweig
348d374d01
panfrost: Respect modifiers in resource management
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:20 -04:00
Alyssa Rosenzweig
56f9cc9948
panfrost: Account for modifiers when creating BO
...
If specified, use the modifier directly. If unspecified, pick our own
modifier.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:20 -04:00
Alyssa Rosenzweig
965537df2a
panfrost: Use modifier instead of layout throughout
...
Instead of converting back and forth we should stick with fourcc codes
as the canonical layout definition. Furthermore modifiers allow all the
variants of AFBC to be encoded canonically, whereas the previous enum
does not (info about YTR is encoded out of band, for instance).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:20 -04:00
Alyssa Rosenzweig
6fed69cde2
panfrost: Introduce create_with_modifier helper
...
As a stepping stone to full modifier support.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:20 -04:00
Alyssa Rosenzweig
32bd588fed
panfrost: Remove hint-based AFBC heuristic
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:20 -04:00
Alyssa Rosenzweig
340017ec47
panfrost: Set initialized more conservatively
...
In case Gallium doesn't ask for direct but we give a direct mapping
anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@keemail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159 >
2020-08-12 09:59:19 -04:00
Mike Blumenkrantz
37872edf6f
zink: print error when getprocaddr fails for extension functions
...
make this more visible on errors
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6271 >
2020-08-12 13:19:23 +00:00
Jason Ekstrand
3d7d76c152
iris: Add support for MESA_SHADER_KERNEL in the disk cache
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Jason Ekstrand
65eeb06a7f
iris: Upload kernel inputs with system values
...
Clover doesn't upload a cbuf0 but instead provides the kernel inputs as
part of the pipe_grid. The most obvious thing to do is to upload them
along with system values.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Jason Ekstrand
f5e7be386f
iris: Copy dest size from the original intrinsic in setup_uniforms
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Jason Ekstrand
43429efc61
iris/disk_cache: Stop assuming stage == cache_id
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Jason Ekstrand
6dfe41c54e
iris: Add a kernel_input_size field for compiled shaders
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Jason Ekstrand
e39326e617
iris: Use blob_write_uint32 for num_system_values
...
We read it with blob_read_uint32; we should write it as uint32 as well.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Jason Ekstrand
8d62735b47
iris: Add support for serialized NIR
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Jason Ekstrand
baa4cf9b8e
iris: Implement set_global_binding
...
All this has to do is track which globals are bound and make sure the
batch references them every time. We use A64 messages to access them so
there are no binding table entries to manage.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Jason Ekstrand
17280a8ef1
iris: no-op implement set_compute_resources
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280 >
2020-08-12 10:11:06 +00:00
Christian Gmeiner
044b238507
etnaviv: completely turn off MSAA
...
MSAA worked before etnaviv landed in upstream mesa but got
broken over time. Disable MSAA completely until it is fixed again.
Fixes problems/crashes with applications that want to make use of MSAA.
Cc: <mesa-stable@lists.freedesktop.org >
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5608 >
2020-08-11 09:19:57 +00:00
Rob Clark
7aa74ab792
freedreno/ir3: add tracking for # of instructions per category
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6243 >
2020-08-11 01:12:18 +00:00
Mauro Rossi
b9e58be347
android: panfrost: Move pandecode into lib/
...
Fixes the following building errors:
target C: libpanfrost_decode <= external/mesa/src/panfrost/pandecode/common.c
...
clang: error: no such file or directory: 'external/mesa/src/panfrost/pandecode/common.c'
clang: error: no input files
Fixes: d62a6e7c5 ("panfrost: Move pandecode into lib/")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261 >
2020-08-10 21:35:31 +02:00
Mauro Rossi
de352f58c3
android: panfrost: Rename encoder/ to lib/
...
Fixes the following building errors:
target C: libpanfrost_encoder <= external/mesa/src/panfrost/encoder/pan_attributes.c
...
clang: error: no such file or directory: 'external/mesa/src/panfrost/encoder/pan_attributes.c'
clang: error: no input files
target C: libpanfrost_encoder <= external/mesa/src/panfrost/encoder/pan_afbc.c
...
clang: error: no such file or directory: 'external/mesa/src/panfrost/encoder/pan_afbc.c'
clang: error: no input files
Fixes: 1c62b5528 ("panfrost: Rename encoder/ to lib/")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261 >
2020-08-10 21:35:31 +02:00
Thong Thai
0f8ef37f65
radeon/vcn: fix jpeg decode for navi10
...
Fixes an issue where the JPEG decode would timeout when decoding certain JPEG files.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6249 >
2020-08-10 16:39:48 +00:00
Marcin Ślusarz
2fbab5a1b3
intel/perf: fix performance counters availability after glFinish
...
Currently Linux kernel gathers performance counters at fixed
intervals (~5-10ms), so if application uses AMD_performance_monitor
extension and immediately after glFinish() asks GL driver for HW
performance counter values it might not get any data (values == 0).
Fix this by moving the "read counters from kernel" code from
"is query ready" to "get counter values" callback with a loop around
it. Unfortunately it means that the "read counters from kernel"
code can spin for up to 10ms.
Ideally kernel should gather performance counters whenever we ask
it for counter values, but for now we have deal with what we have.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788 >
2020-08-10 13:41:29 +00:00
Louis Li
f7e7cf637e
radeon/radeon_vce: fix out of target bitrate in CBR mode (H.264)
...
StoneyRidge may not comply to required target bitrate
when generating H.264 stream in CBR mode.
Signed-off-by: Louis Li <Ching-shih.Li@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4384 >
2020-08-10 01:39:18 +00:00
Gert Wollny
4975b3ec55
r600: Enable compute shaders for NIR code path
...
There are still regessions compared to TGSI, but there are also many
fixes.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:36 +00:00
Gert Wollny
834a61df4e
r600/sfn: Force a minimum of 4 GPRs, it seems to fix atomics
...
This fixes spec@arb_compute_shader@execution@atomic-counter on
HD 5450
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:36 +00:00
Gert Wollny
3e3068a76a
r600/sfn: handle querying SSBO size
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:35 +00:00
Gert Wollny
ac87cc2205
r600/sfn: Correct ssbo instruction handling
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:35 +00:00
Gert Wollny
11a861c78a
r600/sfn: correct allocating and emitting of atomics
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:34 +00:00
Gert Wollny
702619c412
r600/sfn: Add a mapping table for atomics
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:34 +00:00
Gert Wollny
56dedf052f
r600/sfn: add r600 specific lowering pass for atomics and use it
...
v2: rebase to use global variable lists
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:34 +00:00
Gert Wollny
df2acf8e26
r600/sfn: Sort uniforms by binding and offset
...
This is required to get atomics right.
v2: rebase to use global variable lists
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:33 +00:00
Gert Wollny
a828f6c513
r600: Set PIPE_CAP_NIR_ATOMICS_AS_DEREF to true
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025 >
2020-08-09 13:45:33 +00:00
Joshua Ashton
b238d17a02
zink: Fix 32-bit compilation
...
`sizeof(void*) != sizeof(VkShaderModule)` on x86 hence this fails with `-Werror=int-conversion`
Fixes: 0f059d550b "zink: split up creating zink_shader objects and VkShaderModule objects"
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6239 >
2020-08-08 12:46:51 +01:00
Rob Clark
ab92c11780
freedreno/ir3: don't install ir3_compiler cmdline tool
...
It is mostly just useful to us.. and it is big since it links in nir and
most of the rest of gallium.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6234 >
2020-08-07 23:20:38 +00:00
Marek Olšák
0cdd411b6d
radeonsi: various fixes for gfx10.3
...
The magic numbers fix sample shading.
The bypass flag is optional.
Fixes: a23802bcb9 - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:22 -04:00
Marek Olšák
e2e700f605
radeonsi: remove the NGG hack decreasing LDS usage to deal with overflows
...
The LDS size can't overflow anymore, so we can use the correct max LDS size.
Fixes: a23802bcb9 - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:22 -04:00
Marek Olšák
97456e847e
radeonsi: add a common function for getting the size of gs_ngg_scratch
...
The next commit will use it.
Fixes: a23802bcb9 - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:22 -04:00
Marek Olšák
68b3e92fef
radeonsi: don't count unusable vertices to the NGG LDS size
...
Now we get optimal LDS usage.
Fixes: a23802bcb9 - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:22 -04:00
Marek Olšák
64c741ffb7
radeonsi: fix applying the NGG minimum vertex count requirement
...
The code applied the restriction too late, which could overflow LDS size,
which started happening more often after the minimum vertex count was
increased for Sienna.
Incorporate the clamping into the previous code for rounding up the counts.
Now the LDS size can never overflow, but it may use vector lanes less
efficiently (max_gsprims can be decreased more), which will be addressed
in the next commit.
Fixes: 4ecc39e1aa ("radeonsi/gfx10: NGG geometry shader PM4 and upload")
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:21 -04:00
Marek Olšák
7a468fc0f6
radeonsi: increase minimum NGG vertex count requirement per workgroup on gfx 10.3
...
Fixes: a23802bcb9 - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:21 -04:00
Marek Olšák
633d2aa915
radeonsi: use the same units for esgs_ring_size and ngg_emit_size
...
for consistency
Fixes: a23802bcb9 - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:21 -04:00
Marek Olšák
b6fb09fd84
radeonsi: use correct wave size in gfx10_ngg_calculate_subgroup_info
...
Fixes: 88efb63caf ("radeonsi/gfx10: implement Wave32")
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:21 -04:00
Marek Olšák
61c671c97e
Revert "radeonsi: honor a user-specified pitch on gfx10.3"
...
This reverts commit c4b5fd9ab0 .
It breaks mipmapping. This is only meant to be used by OpenCL, which allows
setting a user pitch for linear images. In all other cases, don't support
a custom pitch.
Fixes: c4b5fd9ab0 "radeonsi: honor a user-specified pitch on gfx10.3"
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137 >
2020-08-07 11:22:21 -04:00
Marek Olšák
9333a8570d
radeonsi: enable ETC2 hw acceleration on Raven2
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6213 >
2020-08-07 11:04:05 -04:00
Antonio Caggiano
1185b3f32d
zink: pre-hash gfx-pipeline-state
...
Store a hash in `zink_gfx_pipeline_state` to keep track of state
changes and avoid to recompute it when the state has not changed.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6061 >
2020-08-07 15:57:59 +02:00
Mike Blumenkrantz
7be12df5e6
zink: rename zink_gfx_program::stages to 'modules'
...
we've been confusing 'stages' and 'shaders' over and over for a long time,
so maybe having a totally different name will help here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970 >
2020-08-07 12:36:59 +00:00
Mike Blumenkrantz
6196f2aa93
zink: always compile shaders in pipeline order
...
in order to accurately perform slot/location mapping that's consistent across
stages, we need to go through the stages in order so that we can pass each successive
slot map allocation along to the next compiled stage
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970 >
2020-08-07 12:36:59 +00:00