Commit Graph

167149 Commits

Author SHA1 Message Date
Karmjit Mahil
d67ed3eb24 pvr: Change last_DMA to last_dma
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21331>
2023-02-20 13:34:02 +00:00
Karmjit Mahil
5405277b38 pvr: Put old descriptor set approach behind a hardcoding check
This commit sets up the infrastructure to introduce the new
descriptor set approach while keeping the old paths so the
hard coded apps are still operational. The old paths will be
removed once the compiler can compiler shaders for those apps
and the driver-compiler interface is fully flushed out.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21331>
2023-02-20 13:34:02 +00:00
Karmjit Mahil
b7f8a120bf pvr: Store enum pvr_stage_allocation instead of VkShaderStageFlags
This commit changes the pipeline layout, desc. set layout,
and desc. set layout binding to keep track of shader stage usage
with a mask of enum pvr_stage_allocation instead of
VkShaderStageFlags.

This commit also makes renames the relevant fields to
'shader_stage_mask' to make the naming uniform across stucts.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21331>
2023-02-20 13:34:02 +00:00
Samuel Pitoiset
15f1478eb9 radv/ci: move CI lists for external GPUs in separate folder
A bunch of CI lists are maintained by ourselves with GPUs outside of
Mesa CI. Move them to a separate folder to avoid confusion.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21417>
2023-02-20 13:05:50 +00:00
Samuel Pitoiset
f334704078 radv/ci: disable vkcts-kabini-valve
It's no longer reachable.

Suggested-by: Martin Roukala <martin.roukala@mupuf.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21417>
2023-02-20 13:05:50 +00:00
Alyssa Rosenzweig
dee4784e53 asahi: Fix rendering into mipmapped framebuffers
batch->key.width will be minified, but then the PBE::level field will
incorrectly minify again.

Fixes dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.framebuffer_texture_level

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21400>
2023-02-20 11:47:56 +00:00
Alyssa Rosenzweig
0e0825013d agx: Do more work in agx_preprocess_nir
agx_preprocess_nir runs once per shader, whereas agx_optimize_nir runs once per
variant. That means we want to do as much work as possible in agx_preprocess_nir
to make shader variants as cheap as possible to compiler. So, move our standard
suite of lowering and optimizing to the preprocess loop, leaving just a single
(easy) trip through the optimizer for simple variant processing.

Plus, we can remove variables when preprocessing, since we no longer use
variables anywhere. We remove them to reduce the RAM and disk cache footprint of
shader variants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21104>
2023-02-20 11:34:58 +00:00
Alyssa Rosenzweig
5b92bd99db agx: Don't treat clip distances specially
We've been using the clip lowering, but it's been broken upstream because of
this artefact from the (non-lowered implementation) sneaking in from downstream.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21104>
2023-02-20 11:34:58 +00:00
Asahi Lina
99a6afd1a6 asahi: Only apply FS lowerings to fragment shaders
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21104>
2023-02-20 11:34:58 +00:00
Alyssa Rosenzweig
2adea481f1 asahi: Move agx_preprocess_nir to CSO create
Now we preprocess shaders once at link time, rather than every time we spawn a
variant. This should reduce variant pain.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21104>
2023-02-20 11:34:58 +00:00
Alyssa Rosenzweig
4495f85b08 asahi: Lower clip distances late
This pass works either early or late, so run it late. It creates some
nir_variables as a side effect, which is weird, but it doesn't matter because
the AGX backend doesn't look at variables and the metadata and lowered I/O
intrinsics are all correct.

This is the last step to moving I/O lowering (and hence shader preprocessing) to
CSO create time.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21104>
2023-02-20 11:34:58 +00:00
Eric Engestrom
59c64d90e2 docs/release-calendar: drop the last 22.2.x, it won't happen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21415>
2023-02-20 11:28:30 +00:00
Samuel Pitoiset
04c45b91a4 zink/ci: set RADV_PERFTEST=gpl for RADV jobs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21329>
2023-02-20 11:05:26 +00:00
Samuel Pitoiset
6ec392ab4f zink/ci: skip KHR-GL46.texture_swizzle.functional with RADV
They usually timeout.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21329>
2023-02-20 11:05:26 +00:00
Samuel Pitoiset
cd1f1990a7 ci: uprev vkd3d-proton
This adds test coverage for VK_EXT_image_sliced_view_of_3d.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21384>
2023-02-20 09:17:25 +00:00
Iago Toral Quiroga
1c028a4d5b v3d: support r{g,gba}16f formats for vertex buffers
These are supported, and in fact we are exposing them through
Vulkan. Makes SuperTuxKart significantly faster in GL, I've
observed an FPS increase from ~100% to ~500% depending on the
track.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21361>
2023-02-20 07:45:58 +00:00
Yusuf Khan
689a0c4d4e gallium: create query_memory_info implementation for sw drivers
For ATI_meminfo or NVX_gpu_memory_info on llvmpipe and softpipe.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21373>
2023-02-20 04:26:28 +00:00
Kenneth Graunke
96ba0344db intel: Use common helpers for TCS passthrough shaders
Rob added these new helpers a while back, which freedreno and radeonsi
both share.  We should use them too.  The new helpers use variables and
system value intrinsics, so we can drop the explicit binding table
creation and just use the normal paths.

Because we have to rewrite the system value uploading anyway, we drop
the scrambling of the default tessellation levels on upload, and instead
let the compiler go ahead and remap components like any normal shader.
In theory, this results in more shuffling in the shader.  In practice,
we already do MOVs for message setup.  In the passthrough shaders I
looked at, this resulted in no extra instructions on Icelake (SIMD8
SINGLE_PATCH) and Tigerlake (8_PATCH).  On Haswell, one shader grew by
a single instruction for a pittance of cycles in a stage that isn't a
performance bottleneck anyway.  Avoiding remapping wasn't so much of an
optimization as just the way that I originally wrote it.  Not worth it.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20809>
2023-02-20 03:54:24 +00:00
Timothy Arceri
3a9edfc494 glsl: isolate object macro replacments
Here we use a leading space to isolate them from
the code they will be inserted into. For example:

    #define VALUE -1.0
    int a = -VALUE;

Should be evaluated to int a = - -1.0; not int a = --1.0;

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7932

Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21352>
2023-02-20 01:50:05 +00:00
Timothy Arceri
6e29dce291 glsl: add _token_list_prepend() helper to the parser
This will be used in the following patch.

Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21352>
2023-02-20 01:50:05 +00:00
Timur Kristóf
2c40215ab9 aco/optimizer: Change v_cmp with subgroup invocation to constant.
When a shader has a comparison with the subgroup invocation id,
we can use a constant instead, saving a VALU instruction.
When the constant can't be represented as a 64-bit literal,
use the s_bfm_b64 instruction to generate it instead, which
is still a win.

Fossil DB stats on GFX11:
Totals from 300 (0.22% of 134913) affected shaders:
CodeSize: 2223052 -> 2214336 (-0.39%); split: -0.43%, +0.04%
Instrs: 430216 -> 429882 (-0.08%); split: -0.14%, +0.06%
Latency: 5881180 -> 5878181 (-0.05%); split: -0.05%, +0.00%
InvThroughput: 731846 -> 729293 (-0.35%)
Copies: 31662 -> 31847 (+0.58%); split: -0.03%, +0.61%
Branches: 8241 -> 8100 (-1.71%)
PreVGPRs: 15788 -> 15786 (-0.01%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20843>
2023-02-18 21:16:58 +01:00
Marek Olšák
616d595d18 glthread: don't restore non-VBO vertex arrays after all draws
glthread takes care of all uploads, so it's OK to leave uploaded VBOs
bound. The only thing that will be wrong is the bound vertex buffer
returned by glGet, but the only case when that would be wrong is when
an app that doesn't use VBOs queries the current VBO. That never happens.

However, this adds code to unbind all internal VBOs for the case when
glthread is abruptly disabled (e.g. for GL_DEBUG_OUTPUT_SYNCHRONOUS).

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
201038a80d glthread: don't free glthread for GL_DEBUG_OUTPUT_SYNCHRONOUS, only disable it
and enable it when GL_DEBUG_OUTPUT_SYNCHRONOUS is disabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
068670a79a glthread: remove unnecessary debug code
_mesa_glthread_destroy won't be called for GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB,
so the "reason" parameter will be useless.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
cabc08a184 glthread: convert (Multi)DrawIndirect into direct if user buffers are present
so that user buffers are uploaded without syncing.

Now glthread fully handles non-VBO uploads, so that we can disable user
buffer codepaths in st/mesa.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
72b336dbdc glthread: add API to allow passing DrawID from glthread to mesa
This will be needed for lowering DrawIndirect in glthread, which is
needed if non-VBO vertex arrays are present.

This only adds the drawid parameter in glthread's draw_arrays and
draw_elements functions, and implements where needed.

New GL API functions are added because we want to use separate
DISPATCH_CMD_* enums for draws with DrawID, so that we don't increase
the memory footprint of draws in glthread batches if drawid == 0.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
aabca21c7e glthread: handle non-VBO uploads for glMultiModeDraw{Arrays,Elements}IBM
This was unimplemented, and this implementation matches exactly what we do
in main/draw.c.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
8510814528 glthread: don't execute Draw and BufferSubData calls if the context is lost
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
faf476ea4f glthread: inline draw functions that have only one use
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
21ab24acd0 glthread: remove goto statements and add unlikely() into draw functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
3b897719e6 glthread: add ctx->GLThread.draw_always_async to simplify draw checking
This just precomputes 3 terms of the condition to draw asynchronously.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
15aaef4d36 glthread: reorder draw code a little
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
50d791ca73 glthread: add a vertex upload path that unrolls indices for glDrawElements
u_vbuf does this too. This is the last big missing piece to stop using
u_vbuf.

If the vertex range to upload is much larger than the draw vertex count and
if all attribs are not in VBOs, convert glDrawElements to glBegin/End.

This is a path that makes the Cogs game go from 1 FPS to ~197 FPS. There is
no change in FPS because u_vbuf does this, but it will be disabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
28724de0d7 glthread: track vertex formats for all attributes
We'll need this for a special vertex upload fallback.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
e97d0b318b glthread: don't bind/unbind uploaded indexbuf, pass it to glMultiDraw directly
MultiDrawElementsUserBuf is changed to mean the same thing as
glMultiDrawElementsBaseVertex, but "gl_buffer_object *index_buffer" is
passed via a parameter instead of using the bound GL_ELEMENT_ARRAY_BUFFER.

This skips binding and unbinding the index buffer around every draw
where glthread uploads indices.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
a078374b10 glthread: don't bind/unbind uploaded indexbuf, pass it to glDraw directly
DrawElementsUserBuf is changed to mean the same thing as
glDrawElementsInstancedBaseVertexBaseInstance, but "gl_buffer_object *
index_buffer" is passed via a parameter instead of using the bound
GL_ELEMENT_ARRAY_BUFFER.

This skips binding and unbinding the index buffer around every draw
where glthread uploads indices.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
5c0c0dc5cd glthread: move some draw call parameters closer to their use
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
c2806a836b glthread: don't pass index bounds to the driver for async calls
They are never used with vertex uploads in glthread.
For example, glDrawRangeElements is converted to glDrawElements.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
38efb766d3 glthread: don't execute glDraw code if we're inside glBegin/End
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
07ef2652fe glthread: change glMultiDrawElements to execute draw_count < 0 asynchronously
also clean up the conditions.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
7aff69bcdd glthread: rewrite glMultiDrawArrays to never fail to upload vertices
The main goal is to never fail to upload non-VBO vertex arrays.
When glthread synchronized, it didn't upload vertices, expecting st/mesa
to do that. This keeps the required sync, and then upload vertices
in glthread.

Also, reorder the code and remove goto statements. This is pretty much
a rewrite.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
2023-02-18 09:31:41 -05:00
Marek Olšák
e6231a1320 Revert "ci/zink: Disable Amnesia trace until the linked issue gets fixed."
This reverts commit 2e807a028a.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21039>
2023-02-18 13:40:56 +00:00
Marek Olšák
efb531fcb5 glthread: ignore non-VBO vertex arrays with NULL data pointers
This can happen when an attrib is enabled, but the shader doesn't use it,
so it's ignored by mesa/state_tracker, and should be ignored here as well.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8138

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21039>
2023-02-18 13:40:56 +00:00
Marek Olšák
3ed141e9d8 glthread: add a heuristic to stop locking global mutexes with multiple contexts
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4516
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8035

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21039>
2023-02-18 13:40:56 +00:00
Marek Olšák
78c61140f1 glthread: upload non-BO indices in the core profile to fix GStreamer
Only apply the core profile checking to non-VBO vertices.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7948

Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21039>
2023-02-18 13:40:56 +00:00
Marek Olšák
2e0cb30bd5 glthread: initialize indices[i] for no-op MultiDrawElements
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21039>
2023-02-18 13:40:56 +00:00
Marek Olšák
e2ad086f48 mesa: ignore indices[i] if count[i] == 0 for MultiDrawElements
Cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21039>
2023-02-18 13:40:56 +00:00
Marek Olšák
55682e958b glthread: track the current element array buffer in the Core profile too
This is a prerequisite for:
    "glthread: upload non-BO indices in the core profile to fix GStreamer"

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21039>
2023-02-18 13:40:56 +00:00
Emma Anholt
37b544e410 hasvk: Fix gfx8/9 VB range > 32bits workaround detection.
Since the dirty range started out as 0..0, you would have 0..VBend as the
new dirty range on the first draw, and if your VB was >32b then you'd
flush every time you used it.  Instead, if there's no existing dirty range
then just set it to our new VB's range.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21370>
2023-02-18 07:25:47 +00:00
Emma Anholt
4cd7976208 anv: Fix gfx8/9 VB range > 32bits workaround detection.
Since the dirty range started out as 0..0, you would have 0..VBend as the
new dirty range on the first draw, and if your VB was >32b then you'd
flush every time you used it.  Instead, if there's no existing dirty range
then just set it to our new VB's range.

Perf results with zink+anv on my CFL:

sauerbraten:       +24.8182% +/- 0.602077% (n=5)
portal-2-v2.trace: +4.64289% +/- 0.285285% (n=5)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21370>
2023-02-18 07:25:47 +00:00