Pierre-Eric Pelloux-Prayer
3253594268
vbo/dlist: rework buffer sizes
...
Use 20Mb as the default bo size and use the same limit when
allocating the CPU buffers in realloc_storage.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
031cb085cd
vbo/dlist: remove unused functions
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
5e281a053a
vbo/dlist: add documentation
...
Add a bit of documentation to describe the logic of vbo_save_api.
while at it improve the packing of vbo_save_context.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
dd55d9f2b3
vbo/dlist: remove vbo_save_context::vert_count
...
The same property can be deduced directly from the vertex_store,
so remove this one to avoid sync problems between the two and
simplify the code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
2671b9c90f
vbo/dlist: remove vbo_save_copied_vtx
...
The copy_vertices() function is rarely called and removing
this decreases vbo_save_context's size by 20kb.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
0b8dcdec9d
vbo/dlist: fix max_index_count value
...
We just need an upper bound anyway.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
fc2030b8f3
vbo/dlist: rework out of memory
...
We don't need to store/init a GLvertexformat (3kb) only to handle the
out of memory situation.
Instead, we can call _mesa_noop_vtxfmt_init when needed.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
831f5d1fe0
vbo/dlist: don't force list compilation if out of vertex space
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
94a2063987
vbo/dlist: limit allocation sizes
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
ea99d1c748
vbo/dlist: remove vbo_save_context::max_vert
...
max_vert is easy to deduce from vertex_store so remove it to simplify
the code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
93867fad55
vbo/dlist: realloc vertex stores
...
Same logic that for the primitives: since we're using an intermediate
RAM storage, we don't need to artificially split lists when the buffer
is full.
Instead, we can simply realloc-ate it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
776445468b
vbo/dlist: remove vbo_save_context::buffer_map
...
buffer_map pointed to the first vertex in the store for the current list.
With the previous commit, the first vertex is always at index 0, so we
can drop buffer_map.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
6a63a4a14f
vbo/dlist: reset vertex_store::used in reset_counters
...
This means that each list will start writing its vertices at index 0.
The previous mode (append) was useful in the past when the vertices
were written directly to a mapped-buffer object.
Now that there's an intermediate storage in RAM, the added complexity
of the append-mode has no value so drop it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
3ab1ddd5c1
vbo/dlist: remove vbo_save_context::buffer_ptr
...
buffer_ptr is always "buffer_in_ram + used" so compute it when needed
and drop it from the struct to avoid out-of-sync errors.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
b511b65123
vbo/dlist: don't force list compilation if out of prim space
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
69615d92a0
vbo/dlist: realloc prims array instead of free/malloc
...
Now that we don't have links to the prim_store->prims pointers, we
can replace the free/malloc by a realloc version to grow the prim
storage as needed by a list.
This will be used in the next commit to avoid splitting lists in
multiple vbo_save_vertex_list instances because the prim_store was full.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
22f666622a
vbo/dlist: use prim_store directly
...
prim_store won't be shared anymore between multiple list, so use it
directly instead of proxies.
This simplifies the code and avoid to keep them in sync.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
2c6e8bab1b
vbo/dlist: don't store prim_store
...
This is not used anywhere, so we can drop it from vbo_save_context.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
f5aa98579a
vbo/dlist: remove vbo_save_vertex_store::bufferobj
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
f9d12bf50e
vbo/dlist: use a single buffer object
...
Instead of using 2 bo, 1 for the indices, one for the vertices store
everything in the same buffer.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
edd7733826
vbo/dlist: use buffer_in_ram_size
...
The next commit will refactor buffer upload so we need to decouple
the size from the CPU buffer holding the vertices from the size of
the GPU buffer where we're uploading them.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
b0853d0ada
vbo/dlist: move VAO update at the end
...
No functional changes but this is needed for future commits.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
c01851bcf6
vbo/dlist: apply start_offset after indices construction
...
This will make our life easier for the next commit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:16 +02:00
Pierre-Eric Pelloux-Prayer
3d3b73813d
vbo/dlist: simplify add_vertex function
...
Use the correct pointer directly instead of adding/removing the same
offset.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646 >
2021-09-09 16:42:15 +02:00
Connor Abbott
8e188f8f2e
freedreno/a6xx: Fix VS primid with tess + GS.
...
Analogous to the previous commit.
Fixes: 8115cde3ba ("tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12768 >
2021-09-09 11:17:53 +00:00
Connor Abbott
f254686b13
tu: Fix VS primid with tess + GS
...
If tess is enabled, then VS chains to the HS and we have to use the HS
value for the PrimID sysval. This is still true if GS is also enabled,
so we need to use the HS instead of the GS if both are enabled. In
particular if the HS or DS uses gl_PrimitiveID but the GS doesn't then
we still need to setup the register.
This fixes a bunch of dEQP-VK.tessellation.invariance.primitive_set.*
cases on a650, although it seems they managed to still pass on a630 with
the broken PrimID handling.
Fixes: 8115cde3ba ("tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12768 >
2021-09-09 11:17:53 +00:00
Rhys Perry
c1f724b2b9
nir: fix serialization of loop/if control
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Fixes: e76ae39ae2 ("nir: add support for user defined select control")
Fixes: b56451f82c ("nir: add support for user defined loop control")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12778 >
2021-09-09 10:32:30 +00:00
Rohan Garg
30f457e119
ci: Use FDO_DISTRIBUTION_TAG where possible
...
This allows for de duplicating some variables.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12750 >
2021-09-09 11:49:42 +02:00
Qiang Yu
d33eeb2634
radeonsi: enable nir option pack_varying_options
...
flat interpolation type is not enabled because we need to set
SPI_PS_INPUT_CNTL_x.FLAT_SHADE=1
which is per vec4.
16 bit varying also need to set
SPI_PS_INPUT_CNTL_x.FP16_INTERP_MODE
but varying packing only support 32 bit, so we don't need to
worry about this for now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537 >
2021-09-09 06:00:58 +00:00
Qiang Yu
7054c1b7fd
nir/linker: pack varyings with different interpolation qualifier
...
Driver like radeonsi load varying in a scalar manner, so prefer to pack
varying with different interpolation qualifier into same slot to save
space.
But driver like panfrost/bifrost can load varying in vector manner,
so prefer to pack varying with same interpolation qualifier.
Driver can add interpolation qualifiers which are able to be
packed into same varying slot to pack_varying_options nir option.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537 >
2021-09-09 06:00:58 +00:00
Qiang Yu
5a24aed1ac
nir/lower_io_to_vector: check centroid & sample when merge variable
...
These qualifiers should be respected for different varying load code
generation.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537 >
2021-09-09 06:00:58 +00:00
Qiang Yu
1fd3cf990e
mesa: fix glthread deadlock when EGL multi thread shared context
...
This fixes dEQP EGL tests when glthread is enabled:
dEQP-EGL.functional.sharing.gles2.multithread.random.images.copyteximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random.images.texsubimage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_server_sync.images.teximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_server_sync.images.texsubimage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.images.copyteximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.images.texsubimage2d.*
Deadlock happens when:
Thread A: call EGL context functions which will involve _mesa_glthread_finish(), like
eglMakeCurrent() and eglDestroyContext(). It will hold the EGLDisplay.Mutex and wait
on glthread job queue empty (util_queue_fence_wait(&last->fence)). glthread job thread
executes batch holding gl_context.Shared.TexMutex (glthread_unmarshal_batch()).
Thread B: call EGLImage import functions like EGLImageTargetTexture2DOES() which will
hold gl_context.Shared.TexMutex (egl_image_target_texture()) then validate EGLImage
and hold EGLDisplay.Mutex (dri2_lookup_egl_image()).
This fixes the deadlock by moving the EGLImage validation out of gl_context.Shared.TexMutex
lock area.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
be4f5f1c92
mesa: add ValidateEGLImage driver callback
...
Check EGLImage imported.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
4145532671
gallium/api: add validate_egl_image interface
...
For being used by mesa state tracker.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
d45d749e8b
gallium/dri: add dri_screen egl image validate hooks
...
For being used by EGLImage import in the following commits.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
27d91fec04
gbm/dri: implement image lookup extension version 2
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Qiang Yu
dcf38724c7
egl/dri2: seperate EGLImage validate and lookup
...
Version 2 of DRIImageLookupExtension add two interface for EGLImage
validate and lookup. This is for resolving deak lock in the following
commits.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336 >
2021-09-09 01:42:39 +00:00
Eric Engestrom
5d74c33aaa
docs: update calendar and link releases notes for 21.1.8
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12780 >
2021-09-08 22:38:13 +01:00
Eric Engestrom
996e50a60a
docs: add release notes for 21.1.8
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12780 >
2021-09-08 22:37:44 +01:00
Jesse Natalie
44b9e11ddb
gl.h: Remove dllimport
...
__declspec(dllimport) isn't needed for linking to functions, extern
is sufficient. The preprocessor define used to determine when to
set it (_DLL) was incorrect, since that preprocessor define is set
anytime you're linking against dynamic CRT as opposed to static CRT.
Reviewed-by: Bill Kristiansen <billkris@Microsoft.com >
Reviewed-by: Marek Olák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12776 >
2021-09-08 18:42:57 +00:00
Mike Blumenkrantz
5ab27ad01e
aux/trace: dump more pipe_vertex_element members
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12754 >
2021-09-08 18:16:22 +00:00
Mike Blumenkrantz
b4cbc47b3c
mesa/st: use uint for instance_divisor instead of int
...
this is confusing
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12755 >
2021-09-08 17:54:08 +00:00
Chia-I Wu
e38c58c808
venus: raise the ring buffer size to 64KB
...
When the renderer supports largeRing, raise the ring buffer size to 64KB
and raise the direct submit threshold to 4KB. The numbers are randomly
picked.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
79b8498c05
venus: update venus-protocol headers
...
There are some decoder changes. But we mainly want to gain largeRing
support.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
c9eedba75d
venus: make ring buffer size configurable
...
Until we can assume large ring support.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
eb88c8e1d4
venus: rework vn_instance_submission
...
The goal is to remove local_cs_data. To that end, vn_ring_submit is
modified to take a cs than a pointer.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
862244ccc6
venus: add and use VN_CS_ENCODER_INITIALIZER
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
0641a230a0
venus: init experimental features before the ring
...
We can no longer use
vn_call_vkGetVenusExperimentalFeatureData100000MESA which requires the
ring to be initialized.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
e5a005dd0c
venus: support reply shmem without ring
...
Let vn_instance_get_reply_shmem_locked use the renderer if it is called
before the ring is initialized.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00
Chia-I Wu
68eb682a23
venus: add vn_renderer_submit_simple_sync
...
It submits a command stream to the renderer and waits.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568 >
2021-09-08 16:38:24 +00:00