Dave Airlie
01dfd65a2d
nir: port fp16 casting code from dxil
...
This moves the dxil pass to common code and makes dxil
use the new code.
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643 >
2021-03-22 12:16:59 +10:00
Jesse Natalie
fe90bcf11a
microsoft/compiler: Don't separate phis while inserting upcasts
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4414
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9464 >
2021-03-09 01:41:32 +00:00
Jason Ekstrand
117668b811
nir: Make nir_ssa_def_rewrite_uses take an SSA value
...
This commit replaces the new_src parameter of nir_ssa_def_rewrite_uses()
with an SSA def, removes nir_ssa_def_rewrite_uses_ssa(), and rewrites
all the users as needed.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383 >
2021-03-08 16:59:55 +00:00
Christian Gmeiner
c6d65bb01e
microsoft/compiler: use intrinsic builders
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8295 >
2021-01-06 14:34:41 +00:00
Jesse Natalie
c1c1bad582
d3d12: Fix GCC warnings for missing function prototypes
...
Most of these are adding 'static', for functions that are local
to a translation unit but weren't declared static.
There's one instance of a missing include for bringing the prototype
into the translation unit, one function missing a return type (default-int),
and one which added inline to avoid it being considered unused in some sources.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780 >
2020-12-01 17:10:47 +00:00
Jesse Natalie
e593329b0c
microsoft/compiler: Misc fixes caught by GCC
...
* Fix const-correctness on dxil_mdnode pointer arrays
* Fix warning for a missing scope in a case block
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780 >
2020-12-01 17:10:47 +00:00
Jesse Natalie
4e481a1f65
microsoft/compiler: Fix unhandled switch case warnings
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780 >
2020-12-01 17:10:47 +00:00
Jesse Natalie
4358af87e7
d3d12: Fix signed-unsigned comparison warnings
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780 >
2020-12-01 17:10:47 +00:00
Jesse Natalie
c3bf781cb0
microsoft/compiler: Remove dead code/variables
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780 >
2020-12-01 17:10:46 +00:00
Jesse Natalie
ff05da7f8d
microsoft: Add CLC frontend and kernel/compute support to DXIL converter
...
This adds a standalone library which can convert through the pipeline of
OpenCL C -> SPIR -> SPIR-V -> NIR -> DXIL. It can add in the libclc
implementations of various library functions in the NIR phase, and
also massages the NIR to shift it more towards graphics-style compute.
This is leveraged by the out-of-tree OpenCLOn12 runtime
(https://github.com/microsoft/OpenCLOn12 ).
This is the combination of a lot of commits from our development branch,
containing code by several authors.
Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com >
Co-authored-by: Daniel Stone <daniels@collabora.com >
Co-authored-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Vinson Lee
791fecfae1
microsoft/compiler: Add scope for declaration in case statement.
...
This patch fixes this build error.
../src/microsoft/compiler/dxil_nir.c: In function 'extract_comps_from_vec32':
../src/microsoft/compiler/dxil_nir.c:52:10: error: a label can only be part of a statement and a declaration is not a statement
52 | unsigned dst_offs = i * comps_per32b;
| ^~~~~~~~
Fixes: b9c61379ab
("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7563 >
2020-11-18 03:38:37 +00:00
Erik Faye-Lund
b9c61379ab
microsoft/compiler: translate nir to dxil
...
Here's the code to emit DXIL code from NIR. It's big and bulky as-is,
and it needs to be split up a bit.
This is the combination of a lot of commits from our development branch,
containing code by several authors.
Co-authored-by: Bill Kristiansen <billkris@microsoft.com >
Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com >
Co-authored-by: Daniel Stone <daniels@collabora.com >
Co-authored-by: Gert Wollny <gert.wollny@collabora.com >
Co-authored-by: Jesse Natalie <jenatali@microsoft.com >
Co-authored-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7477 >
2020-11-10 15:37:07 +00:00