Jesse Natalie
552ab9c2f7
dzn: Support root signature 1.2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20617 >
2023-01-17 20:17:42 +00:00
Jesse Natalie
1e0adac84a
dzn: Define a symbol that was present in older D3D headers
...
D3D12_BARRIER_SYNC_INPUT_ASSEMBLER was renamed to D3D12_BARRIER_SYNC_INDEX_INPUT,
so conditionally define the old name based on the version of the headers that are
being used.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20617 >
2023-01-17 20:17:42 +00:00
Jesse Natalie
2f4c7b5ccf
dzn: Use typeless format for creation of depth-only or stencil-only D24S8
...
When querying capabilities or creating views using a scoped aspect
mask, we want to return the format for the correct single-channel
format, but when actually creating the resource (aspect mask 0),
we want to use the typeless format, since the single-channel formats
don't report multisampling support.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
9f928adf81
dzn: Set MultisampleEnable to enable MSAA lines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
ca20577622
dzn: Storage buffer sizes need to be 4-byte-aligned
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
b948a5db4f
dzn: Support int border colors
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
10282bbd96
dzn: Use R24G8_TYPELESS for 24/8 depth resources
...
This is the same that was already being done for R32G8X24, not sure
why it was missed for R24G8.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
a3005ecb56
dzn: When changing root signature, dirty descriptors too
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
14f0c85874
dzn: Support alpha blend factor
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
aa3fc8753d
dzn: Get options13
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
22eb9b1c12
spirv2dxil: Replace not-provided inputs with zero instead of undef
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
61c391781e
spirv2dxil: Allow killing position as an undef varying
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
3ddf41cb7d
spirv2dxil: When removing unused inputs, make sure they're actually inputs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
00b9c10cf7
spirv2dxil: For removing unused vars, consider the whole I/O var size
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
85f44304d8
microsoft/compiler: Set num_components to 4 when updating pos write instructions
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
5d8e89f92f
microsoft/compiler: Use nir info.fs.uses_sample_shading to force sample-rate
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
cbc481f39f
microsoft/compiler: Re-work the logic for adding SV_SampleIndex to force sample-rate
...
Only add SV_SampleIndex if there exists a sample-rate var that has either flat
interpolation or centroid (and therefore can't force sample rate implicitly),
unless there is also a sample-rate var that doesn't have those properties.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
b151ed4b95
microsoft/compiler: Always emit float types in the I/O signature for structs
...
There's VK tests that have mismatching interpolation specifiers between FS
and the previous stage. For structs, that resulted in different types, which
breaks DXIL validation.
We could link the shaders and have that overwrite the interpolation field from
the previous shader, but we could also just not care and always use float.
I don't see any regressions from that.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
c1a3d6b9a9
microsoft/compiler: Remove arrays when testing for structs in I/O
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
c86bd4bfbc
microsoft/compiler: Implement texture sample count query
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
47481e8151
microsoft/compiler: Lower pack_[u/s]norm_2x16
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614 >
2023-01-17 12:47:16 +00:00
Jesse Natalie
f1faf30a5f
dzn: Fix clear bind flag logic
...
This is the patch I had meant to merge
Fixes: 8b79e6fb ("dzn: No need to add another bind flag for clears if one is already present")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20361 >
2023-01-13 21:55:41 +00:00
Jesse Natalie
5949521508
dzn/ci: Add image test group, which is all passing now
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20361 >
2023-01-13 21:55:41 +00:00
Jesse Natalie
889f03fc24
dzn/ci: Remove flakes/fails that don't hit anymore
...
The fails weren't causing pipeline failures because the tests just
aren't run, thanks to the dEQP fraction.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20361 >
2023-01-13 21:55:41 +00:00
GH Cao
af55e36d79
dzn: Declare debug only root_dwords as ASSERTED
...
Such variable is only used in assert(), so declare it as ASSERTED.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7885
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7234
Signed-off-by: GH Cao <driver1998.ms@outlook.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20676 >
2023-01-12 21:02:23 +00:00
Jesse Natalie
dee97e7b99
dzn: Allow multiple graphics queues
...
There's no real reason not to, WDDM supports it. It's not really that
useful, but I don't expect most apps to really want to do it anyway.
It does enable some useful synchronization scenarios sometimes.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200 >
2023-01-11 09:31:02 +00:00
Boris Brezillon
5f1b8b3e6c
dzn: Use DXGI swapchains
...
Makes things so much faster than doing CPU copies using StretchBlt().
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200 >
2023-01-11 09:31:02 +00:00
Pedro J. Estébanez
9d814c405b
microsoft/spirv_to_dxil: Let linking report the need of runtime data
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20608 >
2023-01-10 13:43:01 +00:00
Jesse Natalie
8b79e6fb5e
dzn: No need to add another bind flag for clears if one is already present
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Jesse Natalie
c59141d3c2
dzn: Lower tg4 offsets
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Jesse Natalie
9a991cc52e
dzn: Implement point coord
...
Since we don't support wide points, this isn't a useful feature, but the CTS
requires a particular point coord value for the single rasterized pixel, based
on where the original point coord fell within the pixel. Since we're not doing
a quad, we don't get free interpolation like the GL driver does, so split the
logic between vertex (transform point center into screen space) and pixel
(compute delta between current pixel/sample and point center).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Jesse Natalie
03ce60ec7e
dzn: Lower fragcoord wtrans
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Jesse Natalie
e8b12006bb
dzn: Use the right variable for heap slots when prepping resolves
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Jesse Natalie
22b8e0c74c
microsoft/compiler: Set the advanced texture ops flag correctly
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Jesse Natalie
a84208ee4d
microsoft/compiler: Fill out and sort the shader/module flags
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Jesse Natalie
beeeb74a4c
microsoft/compiler: For Vulkan, centroid should be ignored on position
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Jesse Natalie
d3cae18cb5
microsoft/compiler: For Vulkan, when shading at sample rate, pos is sample pos
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20400 >
2023-01-10 04:25:26 +00:00
Vinson Lee
84527093c4
spirv2dxil: Fix memory leak on error path.
...
Fix resource leak reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable file_contents going out of scope leaks the storage it points to.
Fixes: 531d17c334 ("spirv2dxil: Support linking multiple shaders")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20576 >
2023-01-08 21:12:46 +00:00
Jesse Natalie
a573f6a6da
dzn: Handle split front/back compare/write masks for dynamic state
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20364 >
2023-01-04 11:12:34 -08:00
Jesse Natalie
33e2444384
dzn: For CmdBindIndexBuffer, look at the graphics pipeline instead of last used
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20364 >
2023-01-04 11:12:34 -08:00
Jesse Natalie
a81e832af0
dzn: Don't touch pMultisampleState if rasterizerDiscardEnable
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20364 >
2023-01-04 11:12:34 -08:00
Jesse Natalie
22bb768a8e
dzn: Remove spammy logging during device create
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20364 >
2023-01-04 11:12:34 -08:00
Jesse Natalie
a0b9e5a93e
dzn: Flip on enhanced barrier code paths based on D3D capability
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324 >
2023-01-04 18:20:26 +00:00
Jesse Natalie
dc9a3ed4d5
dzn: Add an "enhanced" version of CmdPipelineBarrier2
...
This allows us to *much* more accurately express the app's barrier
requests. Unfortunately, there's still a few mismatches, so in those
cases we'll end up conservatively over-synchronizing/flushing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324 >
2023-01-04 18:20:26 +00:00
Jesse Natalie
4fb076fc22
dzn: Add an enhanced barrier path for internal and fixup barriers
...
While enhanced barriers is a *much* closer model to Vulkan's, there's
still one big mismatch: Vulkan's "transfer" concept supports clears,
copies, and resolves, while D3D's closest match only supports copies.
So when doing clears and resolves, we need to transition from the copy
layout to the correct layout, and then back.
Internal barriers are done for some meta scenarios as well as render
pass initial layout transitions. These look more or less the same as
non-enhanced, we just want to avoid mixing the two paradigms if possible.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324 >
2023-01-04 18:20:26 +00:00
Jesse Natalie
d50f160d0a
dzn: CmdWaitForEvents needs to submit barriers too
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324 >
2023-01-04 18:20:26 +00:00
Jesse Natalie
2314afae9d
dzn: Fix aspects used for blit barriers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324 >
2023-01-04 18:20:26 +00:00
Jesse Natalie
5b9aedce0e
dzn: Remove unnecessary read -> read transition barriers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324 >
2023-01-04 18:20:26 +00:00
Jesse Natalie
e616d33850
dzn: Respect sharing mode
...
D3D's "simultaneous access" concept pretty closely matches
Vulkan's concurrent sharing mode, except that we don't
support simultaneous access for depth buffers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324 >
2023-01-04 18:20:26 +00:00
Jesse Natalie
b9df7f0a27
dzn: Store valid BARRIER_ACCESS flag masks for a few objects
...
A subset of total access flags are valid based on command list
type and resource flags, so store that set during object creation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324 >
2023-01-04 18:20:26 +00:00