Iago Toral Quiroga
adcfd9bc2f
broadcom/compiler: rename static helpers involved with robust buffer access
...
To make it explicit that they involve buffers, since we will be adding
robust image access shortly.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18820 >
2022-09-27 09:08:29 +00:00
Iago Toral Quiroga
5e5eaa3f1a
broadcom/compiler: rename v3d_nir_lower_robust_buffer_access.c
...
We are going to add code to handle image robustness shortly, so
better rename this to v3d_nir_lower_robust_access.c
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18820 >
2022-09-27 09:08:29 +00:00
Erik Faye-Lund
c816081eea
docs: fixup broken rst syntax
...
Seems I messed this up when converting things, and nobody noticed until
now!
Fixes: d4397c0048 ("docs: use envvar role for envvars")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18641 >
2022-09-27 08:59:23 +00:00
Yonggang Luo
9cbfe9a8ba
ci/docs: Stick to specific version of python packages
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18833 >
2022-09-27 08:22:23 +00:00
Erik Faye-Lund
21107a244a
mesa/main: don't copy signed rgtc via float
...
There's no good reason to copy via float instead of snorm, so let's take
that shortcut.
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18565 >
2022-09-27 07:10:02 +00:00
Erik Faye-Lund
163e7496a9
mesa/main: fix broken indent
...
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18565 >
2022-09-27 07:10:02 +00:00
Timothy Arceri
40c32dfbb1
nir/loop_analyze: remove cost of redundant selects
...
If we know that a select will be eliminated once the loop is
unrolled than we don't need to count the instruction towards the
cost of the loop.
This change helps 2 loops unroll in an xcom enemy unknown shader
that is loaded full of these redundant selects.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18587 >
2022-09-27 00:31:47 +00:00
Timothy Arceri
13d0ae593b
nir/loop_analyze: delay instruction cost calculation
...
Here we move the calculation of the instruction cost of the loop
after we have processed other information such as finding the
induction variables. This is useful because we can use this further
information to find instructions that will be eliminated if the
loop was to unroll and therefore give them a cost of 0.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18587 >
2022-09-27 00:31:47 +00:00
Karol Herbst
8b9a5adf8b
rusticl/mem: return errors for OOB accesses
...
There is a little bit more to do, but this at least resolves crashes due
to OOB accesses and/or assertions.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7346
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18806 >
2022-09-26 23:59:13 +00:00
Marek Olšák
e6ecd22140
mesa: make glPopMatrix a no-op if the matrix hasn't changed
...
This happens a lot with viewperf because glMultMatrixf contains identity
matrices.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
0b00a158ad
mesa: use memcmp instead of floating-point comparisons in glMultMatrixf
...
This is faster.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
01c481335a
glthread: skip glMultMatrixf if it's identity
...
This is common with viewperf and it helps.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
2fa864b38a
glthread,hud: draw per-frame values and expose the number of batches per frame
...
This is better because we see the statistics for 1 frame instead of 1 second.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
62501fbf7b
glthread: use 8-bit GLenum for prim modes where it results in better packing
...
This is OK because all modes > 14 are invalid.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
cd30f044ae
glthread: use GLenum16 for enums, but clamp it to 0xffff to get correct errors
...
0xffff is an invalid enum.
This was initially implemented without clamping and then reverted because
of the concern that we would randomly get correct enums and not report
errors if we just dropped the high bits.
This packs calls better in glthread_batch.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
b7ba29cbf6
mesa: rename GL dispatch initialization functions to make the intent clear
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
f44ada0eb6
mesa: remove deprecated comments
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
34356c009c
api_hw_select_init_h.py: simplify the code
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
3c621f8a2a
glapi: rename 'vtxfmt' to 'beginend' to make it clear
...
These are really just the functions that execute between Begin/End.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
684dae9e64
mesa: initialize OutsideBeginEnd directly instead of through Exec
...
Exec is just a mutable pointer to one of the dispatch tables.
OutsideBeginEnd is what we are actually initializing here. This makes
the original intention clear.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
1c803b7080
mesa: remove unused function _mesa_get_dispatch
...
just use CurrentClientDispatch directly
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
4425236a20
mesa: don't restore the dispatch at the end of glCallList
...
No places use the glapi dispatch. All places use ctx directly.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
c75b152f08
vbo: don't call _glapi_set_dispatch for GL_COMPILE_AND_EXECUTE loopback
...
It uses Exec directly, so this didn't do anything.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
b4de8c834e
mesa: reorder and pack gl_buffer_object
...
The frequently-accessed fields are at the beginning, hoping
we only need to load 1 cache line to get them all.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
26a2502a3b
mesa: remove unused gl_buffer_object::Data and Written
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
37421a24ad
mesa: restructure bind_buffer_object for better performance
...
The CPU time spent in _mesa_BindBuffer_no_error decresed from 11.4% to 9.2%.
I explain in the code what is happening here because it's not obvious.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
6a1ede73f5
mesa: inline _mesa_handle_bind_buffer_gen and correct things
...
Changes:
- the function is inlined, which will help the next commit to improve perf
- use no_error inside the function
- if the function returns true, the buffer is non-NULL, so remove NULL
checking in callers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
93c9be2b97
mesa: inline _mesa_reference_buffer_object
...
The last parameter is always a constant expression, so this simplifies it.
This is also required by later commits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
1885608184
mesa: trivial simplifications in _mesa_reference_buffer_object_
...
The else statement conditions were tautological.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
17b7212930
mesa: clean up st_indirect_draw_vbo interface and callers
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
303f867e32
mesa: remove unused code using _mesa_prim
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
59af6be199
mesa: remove _mesa_draw_gallium_fallback by adapting st_feedback_draw_vbo
...
This makes st_feedback_draw_vbo implement the DrawGallium.
That's the last users of the fallback functions.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Marek Olšák
c056affa25
mesa: replace ALLOC_PRIMS with persistently-allocated context arrays
...
This is cleaner.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828 >
2022-09-26 22:58:16 +00:00
Friedrich Vock
8666b1ffbf
radv: Build acceleration structures using BVH IR
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
1c0ab3ba67
radv: Create pipelines for conversion meta shaders
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
45a66ab30b
radv: Add conversion shader for leaf nodes
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
682dc5c28e
radv: Add conversion shader for internal nodes
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
3e6033394e
radv: Add BVH IR types
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
ca8061c2a7
radv: Split CmdBuildAccelerationStructuresKHR into different functions
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Friedrich Vock
c039a132d6
radv: Rename internal node shader to lbvh_internal
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769 >
2022-09-26 22:25:22 +00:00
Mike Blumenkrantz
41eed5b463
zink: only emit runtime array for ssbos if present
...
it's impossible to accurately determine whether an op will use the base,
sized array or the unsized array due to dynamic indexing, and thus it's
impossible to not violate spec by emitting both arrays at offset=0 so they
can overlap
so instead, just emit the runtime array and blast all bounds checking in
vk drivers into the void
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
93696693b2
zink: remove color_write_missing driver workaround
...
this is no longer used
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
ceb34a2145
zink: allow reordered clear_buffer calls
...
rare to hit, but no point in not promoting them when possible
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
084f3b6664
zink: avoid overflow when clamping bufferviews
...
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
55d6847d22
zink: name bo variables using bitsize
...
debugging++
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
697078c9f4
zink: fix handling for ssbos that are just runtime arrays
...
this used to correctly calculate runtime array size as zero, but since the
switch to glsl_get_explicit_size(), zero can no longer be returned
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
60db522ed8
zink: fix sparse queue creation
...
to use an explicit sparse queue, it has to actually be created along with
the device
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
53004e57d6
zink: always unset var->data.explicit_xfb_buffer
...
ensure that this isn't accidentally triggering for non-xfb shaders
Fixes: 6d40db84c9 ("zink: handle direct xfb output from output variables")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
903aba413d
zink: free vertex_state_cache on shutdown
...
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00
Mike Blumenkrantz
1bd0d30a53
zink: fix some batch tracking leaks
...
not leaking over time, just leaking on shutdown
Fixes: 83c76b8efb ("zink: rework batch tracking for resources")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784 >
2022-09-26 21:58:58 +00:00