Commit Graph

14 Commits

Author SHA1 Message Date
Jesse Natalie bdf91b25d9 dzn: Retrieve validator version
For platforms where there's no validator available, leave the field zero-initialized
to let the DXIL backend choose whatever target validator version it wants.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 6af22121cf microsoft/compiler: Add a max validator version
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie c8f63e07da microsoft/compiler: Add a max shader model option
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 17c0888cfe dzn: Skip dxil validator and some Windows-only debug flags for Linux
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie f47e42fdba dzn: Annotate sometimes-unused variables.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Boris Brezillon 97dbebb558 dzn: Fix unused var warnings
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17250>
2022-06-29 09:54:42 -07:00
Boris Brezillon 91f3c7a9fb dzn: Fix triangle-fan emulation
We were completely ignoring the primitive-restart case in the
index-rewrite logic used to emulate triangle fans. Unfortunately, this
case is way more complicated than a regular index rewrite:

- we need to skip all primitive-restart entries when turning the triangle
  fan into a triangle list, which implies serializing the index buffer
  rewrite procedure (at least I didn't find any clever way to parallelize
  things)
- the number of triangles can no longer be extrapolated from the number
  of indices in the original index buffer, thus forcing us to lower
  direct indexed draws into indirect draws and patching the indexCount
  value when the new index buffer is forged

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16971>
2022-06-15 00:10:42 +00:00
Boris Brezillon 4f1cb63bf3 dzn: Fix unitialized var access in dzn_meta_compile_shader()
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16221>
2022-06-08 15:17:05 +00:00
Yonggang Luo 0445bfdc1b dzn: Fixes compiling error when build with msys2/mingw
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16767>
2022-06-03 16:33:00 +00:00
Boris Brezillon 1999e927b0 dzn: Fix the STATIC_ASSERT() in dzn_meta_blits_get_context()
We care about the object key size, not the size of a pointer.

Fixes: a012b21964 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16109>
2022-04-22 20:45:04 +00:00
Boris Brezillon e018311b35 dzn: Add KHR_draw_indirect_count support
Unfortunately it's not as simple as passing the indirect draw count
buffer to ExecuteIndirect. The compute job that populate the execute
buffer also needs to know the number of entries that need to be
patched. Instead of transitioning the indirect count buffer from
GENERIC_READ to INDIRECT_ARGUMENT we just keep at as a read-only
resource and copy the draw_count value to the exec buffer in the
compute job.

Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15914>
2022-04-22 10:01:51 +00:00
Erik Faye-Lund dee89ea027 dzn: drop needless enum-casts
After rewriting to C, we also don't need these casts.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16076>
2022-04-21 11:21:06 +00:00
Erik Faye-Lund 92964d2bfd dzn: remove some needless casts
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16052>
2022-04-21 10:52:44 +00:00
Erik Faye-Lund 0551f8ed62 dzn: port code to plain c
This does quite a lot in one go, simply because C and C++ are too
different to cleanly move from one language to another. But hopefully
this won't create too many rebase-issues.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
2022-04-19 15:39:48 +00:00
Renamed from src/microsoft/vulkan/dzn_meta.cpp (Browse further)