Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: Zero client memory objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: Use meta for CmdClear*Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nil: Switch to using the new headers for TIC entries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: Use max alignment for descriptor pool sizes
Since we only know the number of each descriptor type and not their
groupings, we don't know how alignments will compound. Figure out the
maximum alignment and then use that for everything to ensure that, no
matter how they're combined, we always have enough room.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Mon, 15 Aug 2022 05:56:47 +0000 (15:56 +1000)]
nvk: add indexed draw support.
This passes the
dEQP-VK.draw.renderpass.basic_draw.draw_indexed* tests for me on Turing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Mon, 15 Aug 2022 01:56:28 +0000 (11:56 +1000)]
nvk: add some limits/features from binary driver.
These are just copied from nvidia vulkaninfo for my tu104.
I've left geom/tess stuff out for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Tue, 16 Aug 2022 02:27:13 +0000 (12:27 +1000)]
nvk: fix depth emission ordering.
dEQP-VK.api.image_clearing.core.clear_depth_stencil_image.single_layer.x8_d24_unorm_pack32_200x180
was hitting
nouveau_push.h:233: nvk_push_val: Assertion `last_method == idx' failed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Tue, 16 Aug 2022 02:16:03 +0000 (12:16 +1000)]
nvk: increase graphics cpu push buffer
dEQP-VK.pipeline.monolithic.image.suballocation.sampling_type.separate.view_type.1d.format.r8g8_uint.count_4.size.512x1
was hitting 98 dwords
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Tue, 16 Aug 2022 02:15:08 +0000 (12:15 +1000)]
nvk: fix pipeline pushbuf sizing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: add linear image creation support.
the dEQP-VK.draw.* tests use a tiled + linear image and copy between
them.
This fixes the result gathering, not the actual result.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Mon, 15 Aug 2022 00:18:59 +0000 (10:18 +1000)]
nvk: add initial 8/16 byte clears.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nouveau: Fix pushbuf ref reset for user command buffers
Copy+paste error. Also, we should do the refs reset before potentialy
doing a full reset, otherwise the refs reset will assert.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: Enable all the dynamic state features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Wed, 26 Jul 2023 19:22:47 +0000 (14:22 -0500)]
nvk: Stop using vk_cmd_set_dynamic_graphics_state in meta_end()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: Use vk_meta for CmdClearAttachments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: Expose a bind_vertex_buffer helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: Add an addr field to nvk_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
nvk: Add an attachment format even for secondaries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
vulkan/meta: Add implementations of Clear*Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
vulkan/meta: Implement start-of-rendering clears
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
vulkan/meta: Implement attachment clears
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:53 +0000 (20:11 -0600)]
vulkan/meta: Add a concept of rect pipelines
Most hardware supports some sort of rectangle primitive. This adds a
new VK_PRIMITIVE_TOPOLOGY_RECT_LIST_MESA which will be used by the vast
majority of (if not all) meta commands. Drivers can key off of of this
to build pipelines differently and implement their own cmd_draw_rects
and cmd_draw_volume hooks or they can map it to TRIANGLE_LIST and use
the provided helpers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
vulkan/meta: Add an object tracking list
This will let us create objects which get held onto by the command
buffer until it's reset or destroyed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
vulkan/meta: Add the start of a meta framework
For now, this just adds some basic object caching.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Color attachments clears via image clears
This is a bit of a hack but it's good enough for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Implement vkCmdDraw()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Graphics pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nouveau: Add CPU push buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Implement push constants and descriptors for graphics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Emit dynamic graphics state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Misc. additional state setup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Add boilerplate for Begin/EndRendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nil/format: Add helpers for render formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Import 3D context init code from nouveau
We really should organize this better but at least we have it now.
This should pretty much be equivalent to what nouveau is doing on
screen/context create.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Add a nvk_cmd_buffer_device() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk/shader: Populate headers for vertex and fragment shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk/shader: Assign I/O locations and gather info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Make shader_upload take an nvk_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Expose pipeline alloc/free functions
This will provide some commonality between graphics and compute.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Free pipeline shader BOs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Add an nvk_shader_address helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Don't free the NIR in nvk_compile_nir
It's a layering violation and the NIR is currently leaked if we the
compile fails. It's better to make the caller clean up.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Switch to vk_pipeline_shader_stage_to_nir
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Split pipeline binding into helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nvk: Add graphics state to command buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nouveau: Generate 3D headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nouveau: Null terminate the debug flag list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nouveau/push: Make P_IMMD more versatile
It's now able to use either the immediate form or method form depending
on whether or not the value fits into 13 bits. We wrap the check with
__builtin_constant_p() so that this choice is compile-time determined
instead of runtime. I've verified with SET_CT_SELECT() that GCC is able
to determine which bits are used even if not all of them are constants.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nouveau/parser: Handle arrays properly in P_IMMD()
We make a new macro VA_NVCLS_FOO which is either an array macro or a
regular macro and, either way, redirects to V_NVCLS_FOO. This lets us
unconditionally use VA_NVCLS_FOO in P_IMMD() and, if the caller hands in
a FOO(i), it will get unwrapped and mangled to produce to V_NVCLS_FOO.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nouveau/parser: Better dump float data
For now, we only do something with floats when we dump. You still need
to use fui() when setting them.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:52 +0000 (20:11 -0600)]
nouveau/parser: Properly dump most arrays used by 3D
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nouveau/parser: Fix an integer overflow and a typo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Init WSI after setting up supported_sync_types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Mon, 8 Aug 2022 20:08:39 +0000 (22:08 +0200)]
nouveau/ws: allocate copy subchan as well
Starting with Ampere we have to do this. It is a safe thing for previous
gens to do.
Very old kernels might reject this, but too lazy to check.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Mon, 8 Aug 2022 20:01:11 +0000 (22:01 +0200)]
nouveau/ws: allocate 3D subchan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Mon, 8 Aug 2022 13:45:09 +0000 (15:45 +0200)]
nouveau/headers: initial 3D headers import
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Mon, 8 Aug 2022 13:44:54 +0000 (15:44 +0200)]
nouveau/headers: add path for 3D headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Mon, 8 Aug 2022 20:01:28 +0000 (22:01 +0200)]
nvk: set deviceName
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nouveau/push: Add a P_INLINE_FLOAT helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Make image/buffer address helpers const
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Include nvk_private.h in everything
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Yusuf Khan [Thu, 28 Jul 2022 18:37:45 +0000 (13:37 -0500)]
nouveau/ws: remove the drm.h header
It can cause compilation issues on Arch, there is a workaround by
including it as <drm.h> but this solution is simpler.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Mauro Rossi [Fri, 15 Jul 2022 16:04:27 +0000 (18:04 +0200)]
nouveau/ws: fix building error in nouveau_ws_push_dump()
PRIxPTR macro solves the problem
Fixes the following build error:
../src/nouveau/winsys/nouveau_push.c:119:43: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
printf("[0x%08lx] HDR %x subch %i", cur - push->orig_map, hdr, subchan);
~~~~~ ^~~~~~~~~~~~~~~~~~~~
%08x
1 error generated.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Thu, 7 Jul 2022 16:36:52 +0000 (18:36 +0200)]
nouveau/ws: use new NVIF interface to query oclasses
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Sun, 3 Jul 2022 17:05:44 +0000 (19:05 +0200)]
nouveau/ws: get rid of libdrm
and just completely rework device and context creation
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Thu, 23 Jun 2022 23:34:15 +0000 (01:34 +0200)]
nouveau/ws: depend on generated class header files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Padd shader BOs by 4K to avoid I-cache overflow
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Bind immutable samplers on descriptor set creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Rework OOM handling for descriptor pools
We now properly return VK_ERROR_OUT_OF_POOL_MEMORY if we run out instead
of silently assigning a NULL bo and map.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Advertise minUniformBufferOffsetAlignment
Fixes a bunch of dEQP-VK.image.store.with_format.*_constant tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: No-op sparse image format properties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Unconditionally zero image format properties
It seems like this shouldn't be neded but some of the tests complain if
we don't because they call vkGetPhysicalDeviceImageFormatProperties()
and vkGetPhysicalDeviceImageFormatProperties2() and compare if they
return identical results even if they return error. Zero is the
reasonable thing to do if you don't support a format anyway because then
it's a maximum extent, sample count, etc. of zero.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Initial vkCmdClearImage support
Doing something for some formats is better than silently doing nothing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Assert that we don't double-free descriptors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:51 +0000 (20:11 -0600)]
nvk: Delete the storage TIC in nvk_image_view_destroy
Also, assert that descriptors are non-zero. Zero is reserved for the
null image descriptor.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Support inline uniform blocks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Use a switch for descriptor types in load_descriptor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Fix descriptor offset alignment
This fixes two bugs. First, we were aligning when setting the bindign
offset but not actually applying that alignment to buffer_size so when
we incremented by stride * descriptorCount, it incremented starting with
the unaligned value. Second, in some cases we return stride = align = 0
and the ALIGN_POT macro will return 0 when something's aligned to 0.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Properly indent a comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Implement push constants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Load the requested descriptor size
We were hard-coding to vec4s for some reason. This results in vec4
texture handles which, while properly ignroed by codegen, are just
weird and not what we want.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Handle cube storage images properly
TIC entries for cubes divide the array size by 6 so we don't want that
when using it as a storage image. This means nvk_image_view needs
separate TIC entries for storage vs. sampled now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Use a descriptor type instead of a hand-rolled thing
This was an attempt to prematurely optimize some things. Sure, it's a
hot-path, but there's other control-flow in there and we can optimize it
later if needed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Advertise non-zero descriptor set limits
Right now, everything's pretty much unlimited. We may want to limit
UBOs in the future to just what we can bind but everything else will
probably remain pretty high.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Advertise descriptor array indexing
This isn't as dynamic as it looks. It still requires the index to be
uniform, it just lets it be not a constant. Given how our descriptor
sets work, this is all handled trivially already.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Better advertise image format features
We now advertise the top-level features and we don't falsely claim
write-without-format support per-format. In theory, NV hardware should
be able to do shaderStorageImageReadWithoutFormat but codegen doesn't
know how yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Add support for dynamic buffers
These are recorded in the CPU portion of the descriptor set and combined
with the dynamic offset at vkCmdBindDescriptorSets time and placed into
the root descriptor table.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Use the correct root descriptor table size for CmdDispatch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Advertise KHR_dedicated_allocation
We're not requiring or even requesting anything to be dedicated yet but
we may as well put in the plumbing. This gets more tests running.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Implement buffer views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Move is_storage_image_format to nvk_format.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nil: Add a helper for filling out buffer TIC entries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Implement samplers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Re-format nvk_sampler.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nvk: Teture pool sizes are maximums not sizes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nil: Fix image array layer alignments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nil: Refactor TIC image extent setup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nil: Don't minify image dimensions when setting up TIC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)]
nil: Drop miptail support for now
We don't have any idea how they work or even which TIC bits have to do
with them. Better off just leave them alone for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Mon, 20 Jun 2022 06:56:43 +0000 (16:56 +1000)]
nouveau/classes: add 906f header support.
This needed some tweaks to the generator script
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>