Commit Graph

154988 Commits

Author SHA1 Message Date
Mike Blumenkrantz a7831c5f6e streaming-memcpy: move to src/util/ and compile unconditionally
this is useful, so make it available for general use

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16732>
2022-06-07 03:33:20 +00:00
Mike Blumenkrantz c370fa362b mesa/streaming-memcpy: add memcpy fallback
this makes it more compatible and able to be used from the caller without ifdefs

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16732>
2022-06-07 03:33:20 +00:00
Emma Anholt 03e8908e27 ci/crocus: Drop g41's xfail for rgba_half_float_oes.
Something fixed it recently, noticed when I was testing this MR and ran
manual jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Emma Anholt ab3a1d41c5 glsl: Drop INT_DIV_TO_MUL_RCP lowering.
nir_lower_int_to_float() does this at the end of compilation, no need to
do it up front.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Vasily Khoruzhick 5ec0301ec7 lima: Lower nir_op_idiv with other scalar math operations.
This will end up appearing in the backend once we move GLSL's
idiv->fmul+frcp lowering to NIR.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Emma Anholt 5c499d6d1a nir: Fix idiv lowering on !NativeIntegers when lower_fdiv is also set.
Avoids a regression when turning off GLSL's int div lowering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Emma Anholt 464b32c030 glsl: Drop the div-to-mul-rcp lowering for floats.
NIR has fdiv, and all the NIR backends have to have lower_fdiv set
appropriately already since various passes (format conversions,
tgsi_to_nir, nir_fast_normalize(), etc.) might generate one.

This causes softpipe and llvmpipe to now do actual divides, since
lower_fdiv is not set there.  Note that llvmpipe's rcp implementation is a
divide of 1.0 by x, so now we're going to be just doing div(x, y) instead
of mul(x, div(1.0, y)).

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Emma Anholt 594d3982f7 tgsi_exec: Fix inf/nan handling for divide by zero.
For RCP and for DDIV, we do division without any src1 != 0 checks, and we
should do the same here so that we get infs or nans as appropriate instead
of undefined.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Emma Anholt 0fbd1b1f4c glsl: Move exp/log-to-exp2/log2 lowering to glsl-to-NIR.
It's way more concise to write as nir_builder calls.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Emma Anholt d024eb6fab glsl: Remove stale lower_instructions comments.
Should have been in 3a42e92a4f ("glsl: Drop the dead MOD_TO_FLOOR path.")

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Emma Anholt 8c4b88ee48 gallium+glsl: Remove EmitNoSat/PIPE_CAP_VERTEX_SHADER_SATURATE
The drivers not setting it were:

- nv30, which gets lowering using NIR's lower_fsat flag.
- r300, which gets lowering using NIR's lower_fsat flag.
- a2xx, which has was getting it optimized back to fsat anyway.

This drops the check for the cap from gallium nine.  While nine does have
a non-nir path, I think it's safe to assume that if you have SM3
texturing, you can do fsat.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Emma Anholt 7a8e3c80fd nouveau/nv30: Make sure fsat is lowered in the VS.
GLSL lowers fsat to clamps based on PIPE_CAP_VERTEX_SHADER_SATURATE
(EmitNoSat), but nir is happy to optimize that back to fsat unless you
tell it not to.

Noticed by inspection while looking at deleting EmitNoSat.

Fixes: ca1ec72726 ("nv30/40: Switch to using NIR-to-TGSI by default.")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
2022-06-07 02:38:42 +00:00
Qiang Yu 61c500ee9b radeonsi: replace llvm ls/hs interface lds ops with nir lowered ones
Use ac nir lower pass to generate these lds load/store ops explicitly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16418>
2022-06-07 01:40:14 +00:00
Timur Kristóf f7f2770e72 ac/nir: Add remappability to tess and ESGS I/O lowering passes.
This will be used for radeonsi to map common I/O location to fixed
slots agreed by different shader stages.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16418>
2022-06-07 01:40:14 +00:00
Qiang Yu 666dbbf1a3 ac/nir: skip gl_Layer/gl_ViewportIndex write for LS
This is from radeonsi.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16418>
2022-06-07 01:40:14 +00:00
Qiang Yu 87dfff3e6b radeonsi: add tcs_vgpr_only_inputs parameter to si_get_nir_shader
Will be used later.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
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/16418>
2022-06-07 01:40:14 +00:00
Qiang Yu 47dd3525fb radeonsi: implement load_lshs_vertex_stride abi
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16418>
2022-06-07 01:40:14 +00:00
Qiang Yu 6a95452ddf ac/nir: use nir_intrinsic_load_lshs_vertex_stride_amd
For radeonsi which pass this value by argument.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16418>
2022-06-07 01:40:14 +00:00
Qiang Yu 33b4b923ee nir: add nir_intrinsic_load_lshs_vertex_stride_amd
For loading LS-HS vertex stride by shader argument in radeonsi.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16418>
2022-06-07 01:40:14 +00:00
Qiang Yu e35ff669b5 ac/llvm: get back nir_intrinsic_load_tess_rel_patch_id_amd
radeonsi will use it. This can be removed again after radeonsi support
radv_nir_lower_abi like lower pass.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16418>
2022-06-07 01:40:13 +00:00
Timothy Arceri 4237932685 glsl: tidy up link_varyings_and_uniforms()
All uniform linking is now done via nir based linker not via this
code so we drop that from its name. We also drop a bunch of unused
parameters.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16880>
2022-06-07 01:11:19 +00:00
Timothy Arceri f00be793e4 glsl: drop extra optimise swizzles call
As per the comment this was meant to tidy things up after varying
linking but varying linking has been moved into a nir based linker
so this extra call is no longer needed.

This optimisation pass is still called in the regular glsl ir
optimisation loop.

No shader-db change on Iris (BDW).

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16880>
2022-06-07 01:11:19 +00:00
Emma Anholt 7af5929b54 turnip: Move tile loads back into the draw CS.
Now that we don't need to know if HW binning actually will get used or
not, we can just emit the tile loads into the start of the draw CS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Danylo Piliaiev ecabd3b5a9 turnip: Allow nested CP_COND_REG_EXEC
This ends up being needed for moving tile loads into the draw cs.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt a92fad45e9 turnip: Allow load/store skipping in vkCmdClearAttachments().
We have to use a 3D draw to make it possible (so it goes through the
binner's visibility calcs), but hopefully the increased overhead for apps
with non-skippable rendering balances against skipping in others.

The real motivation is to get draw-time state out of tile load setup.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt b8619ef343 turnip: Refactor a bit of subpass attachment processing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt 83ae4a5ed4 turnip: Include 3d-based CmdClearAttachments() in binning visibility.
It means the clear's draw can get skipped when it doesn't intersect with
the tile.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt 48403628a2 turnip: Refactor a bit of repeated code for subpass setup.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt 5b119c0148 ci/turnip: Add a little forced touch-testing of XFB with no binning requested.
This is just a couple of seconds of runtime.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt 046438b7a4 turnip: Use fb->binning_possible to decide on conditional tile load/stores.
When !fb->binning but fb->binning_possible, we can just set the VSC
per-tile visibility reg to all visible in the "whoops, we'd rather not bin
but we had to anyway for XFB" case.  This gets that EndRenderPass state out
of tile_load_cs/store_cs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt 6c37b4ded1 turnip: Move binning decisions from FB usage time to FB creation time.
This is mostly about helping me understand which choices are constant for the object as opposed to runtime decisions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt ceeaac340a turnip: Refactor a bit of tu6_emit_tile_select().
Reduce redundant code, make the used SET_VISIBILITY_OVERRIDE value clearer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt 2cad0dd03b turnip: Don't bother creating tile_load/store_cs for sysmem rendering.
They won't get called, so don't bother.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16826>
2022-06-07 00:00:28 +00:00
Emma Anholt f69aa01c4e ci/i915: Update manual piglit job expectations.
These shaders are near the instruction count limit, and something changed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16896>
2022-06-06 21:48:11 +00:00
Emma Anholt 5d0f36d826 ci/i915: Merge the piglit and deqp runs.
One less button to click.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16896>
2022-06-06 21:48:11 +00:00
Nagappa Koppad, Basanagouda a99e85db9e iris:Duplicate DRM fd internally instead of reuse.
Scenario we want to avoid is double close of DRM fd in iris driver.

Signed-off-by: Nagappa Koppad, Basanagouda <basanagouda.nagappa.koppad@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6620
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16886>
2022-06-06 20:04:28 +00:00
Alyssa Rosenzweig 01fd789ad5 docs: Document Mali-G57 conformance
Update the Panfrost driver documentation and the Mesa 22.2 release notes to
advertise the new Valhall support.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16890>
2022-06-06 19:30:15 +00:00
Alyssa Rosenzweig feb9020039 panfrost: Enable Mali-G57
Everything required for conformant OpenGL ES 3.1 support on Valhall (v9) is now
upstream -- all that's left is to enable implementations! Add the GPU ID for the
Mali-G57 implemented in the MediaTek MT8192 system-on-chip.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16890>
2022-06-06 19:30:15 +00:00
Rhys Perry 40db52488b aco: consider fma with multiplication by power-of-two unfused
fossil-db (Sienna Cichlid):
Totals from 700 (0.43% of 162353) affected shaders:
MaxWaves: 18986 -> 18990 (+0.02%)
Instrs: 546475 -> 539729 (-1.23%); split: -1.24%, +0.00%
CodeSize: 2823716 -> 2808504 (-0.54%); split: -0.55%, +0.01%
VGPRs: 25304 -> 25288 (-0.06%)
Latency: 2180102 -> 2168187 (-0.55%); split: -0.55%, +0.01%
InvThroughput: 466223 -> 457326 (-1.91%)
VClause: 6768 -> 6797 (+0.43%); split: -0.01%, +0.44%
SClause: 12235 -> 12237 (+0.02%); split: -0.22%, +0.24%
Copies: 34498 -> 34479 (-0.06%); split: -0.21%, +0.15%
PreVGPRs: 20968 -> 20958 (-0.05%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15862>
2022-06-06 19:06:01 +00:00
Qiang Yu 6489af145c mesa: enable HardwareAcceleratedSelect
Could be enabled/disabled by MESA_HW_ACCEL_SELECT.

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/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu e8658adaa8 virgl: return -1 for PIPE_CAP_ACCELERATED
There's no way currently in virgl to determine whether it's running
above CPU or GPU. This info will be used to disable HW SELECT.

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/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu 1b3fd8b3d2 zink: reset PIPE_CAP_ACCELERATED when cpu soft rendering
This field can be used to disable some unsupport/unproper hardware
acceleration. Reset it when zink is runing on cpu rendering.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu 9b22ab4167 mesa/st: implement hardware accelerated GL_SELECT
Use an internal geometry shader to handle input primitives. Do full
accurate culling and clipping in the shader and output hit result and
min/max depth to a SSBO for final being written to select buffer.

With multiple result slots in SSBO we can left multiple draws on the
fly and wait them done when buffer is full or exit GL_SELECT mode.

This provides quicker selection response compared to software based
solution. Tested on Discovery Studio 2020: some complex model needs
1~2s selection response time originally, now it's almost selected
immidiately.

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/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu 19f3737262 mesa: pass select result buffer offset as attribute/varying
Will be used by geometry shader to store hit result.

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/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu c41ac0682e mesa: add HWSelectModeBeginEnd dispatch table
Used when in glBegin/End section and HW GL_RENDER mode.

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/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu 8373248cf0 mesa: set CurrentServerDispatch too when glBegin/End
When glthread not enabled, CurrentClientDispatch and CurrentServerDispatch
should be same. This does not cause problems before because OutsideBeginEnd
and BeginEnd have same BeginEnd entries, so when
CurrentServerDispatch==OutsideBeginEnd
CurrentClientDispatch==BeginEnd
will call into same BeginEnd _mesa_* functions.

But we'll add another dispatch table to replace BeginEnd when HW GL_SELECT
mode, so this needs to be fixed. Otherwise some function like _mesa_Rectf
which always call with CurrentServerDispatch will go into wrong entries.

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/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu 90b34c9184 mapi: add api setup header for hw select mode
Used by GL_SELECT mode dispatch table setup.

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/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu f890b49c29 mesa/vbo: enclose none-vertex functions with HW_SELECT_MODE
For constructing dispatch table used in GL_SELECT mode. Every vertex
inserted need to also insert a name stack offset attribute.

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/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu d231f95591 mesa: add hw select name stack code path
HW code path will not flush vertex whenever name stack change.
It will save the current name stack and write to select buffer
only when no space left or exit select mode.

This let us submit multi draws from different name stack at
once instead of submit draws for a single name stack then
wait it finish before submit next one.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15765>
2022-06-06 18:23:49 +00:00
Qiang Yu 429c7fbaa1 mesa: refine name stack code to prepare for hw select
No functional change, just pack existing software based implementation into
the HardwareAcceleratedSelect switch, will add hardware implementation in
next commit.

ctx->Select.NameStackDepth is sure to be <=MAX_NAME_STACK_DEPTH, so removed
the overflow check in _mesa_LoadName.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Sgined-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15765>
2022-06-06 18:23:49 +00:00