Commit Graph

168808 Commits

Author SHA1 Message Date
George Ouzounoudis 4325efd2cf nvk: Move SET_BLEND_STATE_PER_TARGET to graphics state initialization
We never change this state so it needs to be set only once at state init.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 18:02:19 -06:00
Faith Ekstrand 5d937f09b2 nvk: Advertise VK_KHR_vulkan_memory_model
Now that the NAK barrier bugs seem fixed and we're passing all the
tests, we can turn this on.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9608
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>
2023-12-15 22:38:45 +00:00
Faith Ekstrand 629bef2a4c nak: Handle minimum execution latencies in the dep tracker
Some instructions have a minimum latency before another instruction can
execute.  It's a little unclear exactly what the details on these are.
For things like OpBar it's probably something to do with when stuff
actually convergres.  For MemBar, maybe we only need to wait before we
do something that also touches memory?  Unclear and the few docs seem to
imply that it's a straight-up stall.  For now, we model it as an
execution latency where nothing is allowed to happen until then.

The blob also inserts a NOP with a delay of 2 in these cases.  It's not
entirely clear why but it's probably best we do the same.  Theses
instructions tend to be pretty heavy-weight anyway so 2 cycles isn't
really going to cost much compared to the chances that we're missing
some subtle HW issues somewhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>
2023-12-15 22:38:45 +00:00
Faith Ekstrand 26c2566606 nak: Plumb shader model into instruction latency queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>
2023-12-15 22:38:45 +00:00
Faith Ekstrand 8c1daae469 nak: Switch to //-style comments
Some time ago I dropped the C-style `/* */` for `//` which seems to be
more idiomatic in Rust.  Let's get rid of the rest of the C-style ones
and make the codebase consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>
2023-12-15 22:38:45 +00:00
Nanley Chery 45d7764a06 iris: Don't memset the clear color BO during aux init
The clear color BO is sometimes getting unnecessarily zeroed. For
example, if the resource will be fast-cleared, the app may pick a
non-zero color, causing the initial memset to be unneeded.  So, skip the
memset and mark the clear color as unknown if it has not been freshly
allocated. For now, we leave the memsets on imported dmabufs alone for
simplicity.

On non-small BAR ACM systems, this also allows internal resources using
compression to be created without executing an IOCTL for memory mapping.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26675>
2023-12-15 21:58:16 +00:00
Nanley Chery 68d56b15d7 iris: Zero the clear color before FCV_CCS_E rendering
On small-BAR ACM systems, we don't initialize the clear color at
resource creation time. This could cause an issue with FCV_CCS_E.

Because the rendering and sampling fields may not be in agreement, FCV
may generate fast-cleared blocks during rendering and the sampler may
interpret them with the wrong values.

Thankfully, the register bit which enables FCV on ACM is disabled by
default, so there is not an actually issue today. Regardless, this patch
implements the fix for this issue now. The next patch will actually skip
explicit clear color initialization at resource creation time. So, this
fix will be useful for other systems that do have FCV enabled today.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26675>
2023-12-15 21:58:16 +00:00
Nanley Chery 6064de1d53 iris: Optimize BO_ALLOC_ZEROED for suballocations
Fresh suballocations from fresh allocations have already been zeroed by
the kernel. So, make BO_ALLOC_ZEROED a no-op for them.

This introduces a new field, iris_bo::zeroed, which will be reused for
similar optimizations in the future.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26675>
2023-12-15 21:58:16 +00:00
José Roberto de Souza ba6faeb974 anv: Remove libdrm usage from Xe KMD backend
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26699>
2023-12-15 20:40:49 +00:00
José Roberto de Souza dea6c82437 intel: Sync xe_drm.h final part
Sync xe_drm.h with commit a8ff56e160bb ("drm/xe/uapi: Remove reset uevent for now").

This is the last xe_drm.h uAPI break.

The only relevant change for ANV and Iris is that now VM bind uAPI
is asynchronous only so I had to bring back the syncobj creation, wait
and destruction.

Is still in the Xe port TODO list to make VM binds truly asynchronous.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26699>
2023-12-15 20:40:49 +00:00
Sagar Ghuge 2ac78b5096 anv: Enable blitter engine unconditionally on ACM+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26703>
2023-12-15 20:10:53 +00:00
Eric Engestrom 8043e8c4a6 vulkan/wsi: fix build when platform headers are installed in non-standard locations
Anything that uses the platform defines in `vulkan_wsi_list` will need
to be able to resole the includes they trigger, which are provided by
`vulkan_wsi_deps`.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10304
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26715>
2023-12-15 18:35:54 +00:00
Friedrich Vock f9a394b753 radv/rt: Initialize unused children in PLOC early-exit
Bad things happen when these aren't initialized.

Fixes GPU hangs when loading Avatar: Frontiers of Pandora savegames.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26712>
2023-12-15 17:52:00 +00:00
Job Noorman 286caa5080 ir3: lower 64b registers
After all int64/double lowerings, there might still be 64b registers
left which ir3 currently doesn't handle. This only happens in a small
number of Piglit tests where those registers (or the variables they come
from) did not get DCE'd.

This patch handles 64b registers in ir3 by adding a NIR pass that does
the following:
 - @decl_reg -> split in two 32b ones
 - @store_reg -> unpack_64_2x32_split_x/y and two separate stores
 - @load_reg -> two separate loads and pack_64_2x32_split

After this pass, the 64b vecs used for the original loads/stores are
still present and are also not handled yet by ir3. This patch removes
them by running nir_lower_alu_to_scalar and nir_copy_prop.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26175>
2023-12-15 17:19:28 +00:00
Job Noorman 6e7a61df4c nir: add _safe variants of nir_foreach_reg_load/store
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26175>
2023-12-15 17:19:28 +00:00
Iago Toral Quiroga 5057eb90a1 v3dv: implement VK_KHR_shader_terminate_invocation
The semantics for this matches those of discard.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26683>
2023-12-15 16:35:50 +00:00
Iago Toral Quiroga d0f75fdeab broadcom: lower null pointers
We only support the variablePointersStorageBuffer feature of variable pointers,
which basically ensures that pointers may only target one buffer. This means
that a particular pointer may change where it points within a given buffer but
it cannot change its value to point to some other buffer. This is a requirement
from us since we expect buffer indices on buffer loads and stores to be
constant, so we can't have a buffer load come through a pointer that may
be assigned to different buffers, since in that case the buffer index
would need to come from bcsel.

There is, however, a small complication: the spec still allows pointers to
be null, and NIR defines null pointers to use 0xffffffff for both the buffer
index and the offset, which will cause a problem in a scenario like this:

int *b = ...
if (cond) {
   b = null;
   discard;
}
ubo_load(b);

Here the buffer index for the ubo load may come from a bcsel choosing between
the null pointer (0xffffffff) and the valid address (let's say 0), so we don't
have a constant and we assert fail.

This change detects this scenario and upon finding it will rewrite the buffer
index on the null pointer branch of the bcsel to match that of the valid
branch so that later optimizations passes can remove the bcsel and we end up
with a constant index. This is fine because a null pointer dereference is
undefined behavior and it is not something we should see in valid applications.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26683>
2023-12-15 16:35:50 +00:00
Iago Toral Quiroga 716847a77d broadcom: disable perquad tmu loads after discards
Otherwise we may emit a load from an invalid offset from
a lane that was discarded.

This fixes an simulator assert from triggering when
executing:
dEQP-VK.spirv_assembly.instruction.terminate_invocation.terminate.no_null_pointer_load

That test emits a conditional kill and then a buffer load
which would have invalid offsets for the lines killed. Since
the buffer load is in uniform control flow we were incorrectly
emitting a full quad load, including disabled lanes which would
prompt the simulator to assert on invalid offsets being loaded
coming from the lanes that had been killed in the shader.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26683>
2023-12-15 16:35:50 +00:00
Sil Vilerino 2b04fb410f d3d12: Fix warning C4065 switch statement contains default but no case labels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26710>
2023-12-15 16:17:50 +00:00
Ruijing Dong 8bbdde2d9a radeonsi/vcn: enable ROI feature in vcn.
Enable ROI feature.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659>
2023-12-15 14:06:34 +00:00
Ruijing Dong 9c07a2e10d radeonsi/vcn: ROI feature implementation
Implemented ROI feature in VCN generations.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659>
2023-12-15 14:06:34 +00:00
Ruijing Dong d6da63071e frontends/va: add ROI feature
ROI (region of interest) feature implementation
in va.

It does not support ROI priority, and supports
qp delta, and the maximum number of supported
region is defined as 32, the region sequence implies
the priority, the lower the sequence number, the higher
the region priority, when region overlapping happened,
the higher priority region overwrites the lower
priority one.

And specifically for AV1, the adjust step will be
rounded by 5 when rate control is used, for example,
if qp_delta (q index) is 6, it will use 5, if
qp_delta is 8, it will use 10.

For AVC/HEVC (RC/CQP) and AV1 CQP mode, the
qp_delta granularity is 1.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659>
2023-12-15 14:06:34 +00:00
Ruijing Dong 434a53ebbe radesonsi/vcn add qp_map definition
This is for enabling ROI (region of interest)
feature in VAAPI interface. It will support
both CQP and rate control mode.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659>
2023-12-15 14:06:34 +00:00
Boris Brezillon 0463a951ad panfrost: Flag BO shareable when appropriate
Let the kmod backend know when we might end up exporting a BO. This
doesn't change anything for the Panfrost kmod backend, but will be
needed for Panthor.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:27 +00:00
Boris Brezillon 30d6dfb861 panvk: Pass PAN_BO_SHAREABLE when relevant
Check VkExportMemoryAllocateInfo to know if we might export the BO
object at some point.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:27 +00:00
Boris Brezillon aa6176ee1e panfrost: Introduce a PAN_BO_SHAREABLE flag
This flag reflects the ability to share a BO. This lets the kmod
backend optimize the case where the BO stays private to a specific
VM.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:27 +00:00
Boris Brezillon 5089a758df panfrost: Back panfrost_bo with pan_kmod_bo object
We keep the existing implementation unchanged but use pan_kmod for
all interactions with the kernel driver.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:27 +00:00
Boris Brezillon 7a9c471009 panfrost: Add a VM to panfrost_device
The current code assumes the logical device comes with a VM, so let's
explicitly create this default VM so we can map BOs with the kmod API.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon 91fe8a0d28 panfrost: Back panfrost_device with pan_kmod_dev object
Back panfrost_device with pan_kmod_dev object and query all props using
the pan_kmod_dev_query_props().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon 70bcdbee6c panfrost: Avoid direct accesses to some panfrost_bo fields
We are about to delegate some BO-related operations to the pan_kmod
layer, but before we can do that, we need to hide panfrost_bo
internals so we can redirect such accesses to pan_kmod.

Provide panfrost_bo_{size,handle}() accessors and start using them.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon d47e01a3c3 panfrost: Avoid direct accesses to some panfrost_device fields
We are about to delegate some device-related operations to the pan_kmod
layer, but before we can do that, we need to hide panfrost_device
internals so we can redirect such accesses to pan_kmod.

Provide a few panfrost_device_xxx() accessors and start using them.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon 93178999f6 pan/kmod: Add a backend for the panfrost kernel driver
Just a few implementation details that are worth mentioning:

- Panfrost doesn't support explicit VM management. This means
  panfrost_kmod_vm_create() must always be created with
  PAN_KMOD_VM_FLAG_AUTO_VA and panfrost_kmod_vm_bind(op=map) must
  always be passed PAN_KMOD_VM_MAP_AUTO_VA. The actual VA is assigned
  at BO creation time, and returned through
  drm_panfrost_create_bo.offset, or can be queried through
  DRM_IOCTL_PANFROST_GET_BO_OFFSET for imported BOs.

- Evictability is hooked up to DRM_IOCTL_PANFROST_MADVISE.

- BO wait is natively supported through DRM_IOCTL_PANFROST_WAIT_BO.

The rest is just a straightforward translation between the kmod API and
the existing panfrost ioctls.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon d95ec56f8c panfrost: Abstract kernel driver operations
We have generic BO management and device management layers that
directly call kernel driver-specific ioctls. The introduction of
Panthor (the new kernel driver supporting CSF hardware) forces us to
abstract some low-level operations. This could be done directly in
pan_{bo,device,props}.{c,h}, but having the abstraction clearly defined
and separated from the rest of the code makes for a cleaner
implementation.

This is also a good way to get a low-level KMD abstraction that
we can use without pulling all sort of gallium-related details in,
which will be important for some refactoring we plan to do in panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Samuel Pitoiset 768c737273 radv: remove some declared but unused functions/macros
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26682>
2023-12-15 08:40:24 +00:00
Samuel Pitoiset 2f79ed1831 radv: stop asserting some image create info fields
Vulkan Validation Layers already check that and these assertions never
caught anything.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26682>
2023-12-15 08:40:23 +00:00
Colin Marc a26119e124 vulkan video: correctly set SPS VUI bits
According to the spec section E.1 flags such as overscan_info_present_flag are
independent of aspect_ratio_info_present_flag.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26669>
2023-12-15 07:13:13 +00:00
Tapani Pälli 07f8db02ff iris: cleanup, use intel_needs_workaround instead of is_dg2
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26666>
2023-12-15 06:13:41 +00:00
Tapani Pälli 2f25679b3f anv: cleanup, use intel_needs_workaround instead of is_dg2
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26666>
2023-12-15 06:13:41 +00:00
Tapani Pälli 012b6fbe63 drirc: setup anv_assume_full_subgroups=16 for UnrealEngine5.1
We set max subgroup size as 16 for 'UnrealEngine5.1', this improves a
customer benchmark by 50% on A750.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26385>
2023-12-15 05:28:51 +00:00
Tapani Pälli 7ff8f79a88 anv/hasvk/drirc: change anv_assume_full_subgroups to have subgroup size
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26385>
2023-12-15 05:28:51 +00:00
Faith Ekstrand 1cf1b9d741 nir: Scalarize bounds checked loads and stores
Fixes: 39da1deb49 ("nir/lower_io: Add a bounds-checked 64-bit global address format")
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26526>
2023-12-15 03:53:54 +00:00
Caio Oliveira 81e3b28f78 compiler: Remove C++ static member pointers to builtin types
When we moved the bulk of glsl_type to C, these globals were
kept to avoid changes to compiler/glsl code in the MR.  Now that
landed, change the code to use the actual bultins directly.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26658>
2023-12-15 03:09:19 +00:00
Caio Oliveira bfc953add7 intel/compiler: Use C helpers to access builtin types
Remove usage of C++ static members as they are going to be removed.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26658>
2023-12-15 03:09:19 +00:00
Caio Oliveira 90e364edb0 compiler/types: Add a few more helpers to get builtin types
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26658>
2023-12-15 03:09:19 +00:00
Faith Ekstrand 22b99f15b9 nvk: Use ENUM_PACKED for enums instead of PACKED
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:59 +00:00
Faith Ekstrand 45f320e97f nvk: Enable cbufs
Just in case this breaks and blows up the universe, we'll add a NO_CBUFS
debug flag as a back-door.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:59 +00:00
Faith Ekstrand d41fe63d99 nvk: Add debug flags to the physical device
These should probably go on the instance but everything is tangled up
too badly right now.  This at least moves them to some place where we
have them without a nouveau_ws_device.  It's fine to do this because
debug flags are an environment variable and won't change across a run.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:59 +00:00
Faith Ekstrand ee29a8d1cd nvk: Upload cbufs based on the cbuf_map
For draw, this requires that we use a macro to read descriptors out of
the descriptor buffer because we may not have that information easily
available on the CPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand e6cd4b177a nvk: Don't flush descriptors in BeginConditionalRendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand 869f5fc680 nvk: Set MME_DATA_FIFO_CONFIG on device init
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00