Samuel Pitoiset
943ef0edbd
radv: avoid prefixing few VkXXX structures by struct
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14115 >
2021-12-07 20:23:48 +00:00
Lionel Landwerlin
a3886fa471
util/u_vector: prevent C++ warning on cast from void* to something else
...
v2: fix windows build
v3: duplicate foreach macro for C/C++
v4: Extract casting macro
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (v3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13997 >
2021-12-07 19:41:06 +00:00
Dave Airlie
55b396e743
mesa/crocus/iris/blorp: drop minify macro in favour of u_minify
...
This macro is duplicated, clean it up.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14103 >
2021-12-07 19:04:01 +00:00
Adam Jackson
d9f0991744
mesa: Make _mesa_generate_mipmap_level static
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
3731d21c68
mesa: Remove unused execmem code
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
68b7fabbe2
mesa/program: Dead code cleanup
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
087f196a08
mesa/vbo: Always use buffer objects for storage
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
b4ae8ee43e
mesa: Remove unused _vbo_current_binding
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
d88398413a
mesa: Remove unused _es_{,Get}TexGenfv
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
3f35fd71c3
mesa: Remove unused _es_RenderbufferStorageEXT
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
5b8eeaac3a
mesa: Remove unused _es_color4ub
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
5d09812c2f
mesa: Remove unused _mesa_compressed_image_address
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
74c29e1bf7
mesa: Remove unused _mesa_apply_ci_transfer_ops
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
1455d1cd30
mesa: Remove unused _check_*TexGen*OES
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
98ef86b3af
mesa: Remove unused _mesa_DrawTexx{,v}
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
8f92e81718
mesa: Remove unused _mesa_get_render_format
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Adam Jackson
8aa776ab1f
mesa: Remove unused _mesa_all_buffers_are_unmapped
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098 >
2021-12-07 18:21:52 +00:00
Samuel Pitoiset
31ad50d989
radv: fix dynamic rendering with VRS
...
The structure type was wrong. This fixes a bunch failures in
dEQP-VK.fragment_shading_rate.dynamic_rendering.*.
Fixes: 7f3aba37d2
("radv: Support Begin/EndRendering.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14106 >
2021-12-07 17:30:47 +00:00
Samuel Pitoiset
92d84f189c
radv: constify radv_vs_input_state() in more places
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13857 >
2021-12-07 14:27:29 +00:00
Samuel Pitoiset
b83caef6d2
radv: constify radv_vertex_binding in CmdSetVertexInputEXT()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13857 >
2021-12-07 14:27:29 +00:00
Samuel Pitoiset
45f181c482
radv: move a comment at the right place in CmdBindVertexBuffers2EXT()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13857 >
2021-12-07 14:27:29 +00:00
Danylo Piliaiev
e63ffc2f04
freedreno,tu: Limit the amount of instructions preloaded into icache
...
Inferring from blob's cmdstream the size of shader instruction
cache for:
- a630 is 64
- a650 is 128
- a660 is 128
On a650 and a660 gpu could hang if we exceed the limit. Though
it is not reproducible with computerator or a single amber
test. Also while blob limits the size to 128 - Turnip still
hangs with it but does not hang with the limit of 127.
On a630 there seem to be no hang when limit is exceeded.
Fixes the hang of compute shader in Alien Isolation on a650/a660.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14044 >
2021-12-07 13:48:35 +00:00
Dave Airlie
da24bb17a8
mesa/st: move external objects to direct calls
...
This moves the memory and semaphore objects to direct calls
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073 >
2021-12-07 13:03:53 +00:00
Dave Airlie
830e2038fc
mesa/st: move transformfeedback to direct calls
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073 >
2021-12-07 13:03:53 +00:00
Dave Airlie
12f8475ff9
mesa/st: move barriers to direct call
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073 >
2021-12-07 13:03:53 +00:00
Dave Airlie
8fe4ff2fda
mesa/st: direct call sync object functions
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073 >
2021-12-07 13:03:53 +00:00
Dave Airlie
bd9adf3919
mesa/dd/st: direct wire queries/timestamp/condrender.
...
These were all interrelated, avoid the indirect calls here,
and call directly between main and state tracker
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073 >
2021-12-07 13:03:53 +00:00
Dave Airlie
0d8610b099
mesa/dd/st: move get strings pointer out of dd.h
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073 >
2021-12-07 13:03:53 +00:00
Dave Airlie
b03db92720
meson: make mesa/tests/glx depend on gallium
...
If I start direct linking the state tracker to mesa, the tests fail
to build because they don't have gallium linked.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073 >
2021-12-07 13:03:53 +00:00
Dave Airlie
9bb375b0be
intel/compiler: drop glsl options from brw_compiler
...
Only the nir options are used now, since i965 was dropped,
the glsl options come from the state tracker
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14102 >
2021-12-07 08:52:36 +00:00
Emma Anholt
de33205f88
nir/algebraic: Move all the individual transforms to a common table.
...
Cuts 28% of the remaining relocations in libvulkan_intel.so, shrinks
binary size by 290kb.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:09:00 +00:00
Emma Anholt
a29b54f014
nir/algebraic: Mark the automaton's filter tables as const.
...
Moves it to .rodata instead of .data.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:09:00 +00:00
Emma Anholt
45a8d11b6e
nir/algebraic: Pack various bitfields in the nir_search_value_union.
...
This gets our union's size down to 22 bytes (now smaller than any of the
union's types were before we made the union!). Cuts another 48kb off of
the drivers.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:09:00 +00:00
Emma Anholt
53f49b7066
nir/algebraic: Move relocations for variable conds to a table.
...
This helps concentrate the dirty pages from the relocations, reduces how
many relocations there are, and reduces the size of each variable assuming
variables mostly don't have conditions or the conditions are mostly
reused). Reduces libvulkan_intel.so size by 49kb.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:09:00 +00:00
Emma Anholt
8485a78977
nir/algebraic: Move relocations for expression conds to a table.
...
This helps concentrate the dirty pages from the relocations, reduces how
many relocations there are, and reduces the size of each expression
(assuming expressions mostly don't have conditions or the conditions are
mostly reused). Reduces libvulkan_intel.so size by 8.7kb.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:09:00 +00:00
Emma Anholt
7635379dc7
nir/algebraic: Remove array-of-cond code
...
You can't have an array of them after removing many-comm-expr, there's no
space in the struct.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:09:00 +00:00
Emma Anholt
5d82c61a30
nir/algebraic: Replace relocations for nir_search values with a table.
...
Even with packing all 3 types into a 40-byte union (nir_search_constant
being 24 bytes and nir_search_expression having formerly been 32), and
having a single array of them, this cuts 1.7MB from each of
libvulkan_intel.so and libgallium_dri.so.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:09:00 +00:00
Emma Anholt
e7d8717375
nir/algebraic: Drop the check for cache == None.
...
The cache is always set.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:08:59 +00:00
Emma Anholt
a263474d3b
nir/algebraic: Move some generated-code algebraic opt args into a struct.
...
I'm going to be adding some more tables to reduce relocations in the
generated code, so move the current tables to a struct for arg-passing
sanity.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987 >
2021-12-07 07:08:59 +00:00
Emma Anholt
4b5692fa71
nouveau/nir: Use the address reg for indirect scratch access.
...
Fixes the dEQP regressions in dEQP-GLES2.functional.shaders.indexing.*.
TGSI used the address reg for these offsets too.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14083 >
2021-12-07 06:57:27 +00:00
Timothy Arceri
ca16c271fa
mesa: make struct in gl_program a union and remove FIXME
...
Now that the classic drivers that were mixing the use of these asm
and glsl shader fields are gone we can finally use a union here.
This basically reverts commit 9d99dc4bc1
but also moves a
read of IsPositionInvariant inside an arb asm only code block
for safety.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14059 >
2021-12-07 05:24:47 +00:00
Qiang Yu
df6ff88fd0
loader/dri3: support glx pbuffer swap
...
Double buffered pbuffer need to update the front buffer,
otherwise we always get wrong value when glReadPixels().
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00
Qiang Yu
e0311746cd
loader/dri3: stop doing anything in swap buffer for some drawable
...
We are sure to have a back buffer in swap buffer now.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Singed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00
Qiang Yu
d67d1dddbe
loader/dri3: rename dri3_fake_front_buffer
...
Sometimes this is the real front buffer depends on the place
called. Since it's the same LOADER_DRI3_FRONT_ID slot, just
name it dri3_front_buffer.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00
Qiang Yu
c7d5e91b6b
loader/dri3: replace is_pixmap with drawable type
...
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00
Qiang Yu
d19013a199
loader/dri3: setup present event with drawable type info
...
If we already know the drawable type, setup event in a simpler way.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00
Qiang Yu
6508e5b4a1
loader/dri3: pack window present event setup into a function
...
For simplicity and latter commits.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00
Qiang Yu
9faa2892b9
loader/dri3: remove unused present capability query
...
The query result is not used anywhere.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00
Qiang Yu
13bf30583c
loader/dri3: add drawable type set by GLX and EGL
...
Drawable type include more information which can be used
to distinguish pixmap and pbuffer which both treated as
pixmap before.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00
Qiang Yu
887f5a6320
glx: add drawable type argument when create drawable
...
For distinguish different behavior of pixmap and pbuffer
in latter commits.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750 >
2021-12-07 03:26:13 +00:00