CMake build issue related to DXC

104 views
Skip to first unread message

Orhun Birsoy

unread,
Jul 3, 2024, 2:33:24 PM7/3/24
to Dawn Graphics
Hi,

I am building dawn with cmake, and having an issue with how dxc is used in `src\tint\lang\hlsl\validate\validate.cc`.

I am currently trying to use chromium/6571 branch.

Looks like dxcapi.h is included assuming it will be available through the DXC third party sources and not from winsdk, but cmake build doesn't seem to work with `DAWN_FETCH_DEPENDENCIES ON` and `
DAWN_USE_BUILT_DXC ON or OFF`. Possibly due to missing submodule update(s) in `tools/fetch_dawn_dependencies.py`

I solved my local build by changing the include to look like
```
#ifdef DAWN_USE_BUILT_DXC
#include "dxc/dxcapi.h"
#else
#include <dxcapi.h>
#endif
```
while keeping ` DAWN_USE_BUILT_DXC OFF` (default).

I don't know how Dawn will be affected by the possible differences between WinSDK  and open source version of DXC.

Any suggestions how should I proceed with this issue?

Thanks. 

Ken Russell

unread,
Jul 3, 2024, 2:39:44 PM7/3/24
to Orhun Birsoy, Dawn Graphics, amai...@chromium.org
Hi Orhun,

I don't have an answer for your question though Antonio, CC'd, might.

Generally though - would you consider using top-of-tree Dawn from https://dawn.googlesource.com/dawn ? I see that chromium/6571 is pretty recent, but fixes are going in daily - a fix for Dawn's CMake build (on Android, though) just went in yesterday.

Thanks,

-Ken



--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/c3664839-fc5b-4527-9f41-58e04c0ebea4n%40googlegroups.com.

dan sinclair

unread,
Jul 3, 2024, 2:48:19 PM7/3/24
to Orhun Birsoy, Dawn Graphics
Hi Orhun,

I think we could just change `DAWN_FETCH_DEPENDENCIES` to also require DXC. It seems like an oversight that it isn't in there already.

dan


Jaswant Panchumarti

unread,
Jul 9, 2024, 8:11:09 PM7/9/24
to Dawn Graphics
Ran into this issue in github actions. https://dawn-review.googlesource.com/c/dawn/+/196935 adds `third_party/dxc` to the list of submodules in `fetch_dawn_dependencies.py`. After that lands, we should be good to go using cmake in windows.
Reply all
Reply to author
Forward
0 new messages