Commit Graph

2 Commits

Author SHA1 Message Date
Yonggang Luo
b4f701f962 d3d12: Fixes d3d12 compiling errors in D3D12ResourceState.h for mingw
```
In file included from ../../src/gallium/drivers/d3d12/D3D12ResourceState.cpp:24:
../../src/gallium/drivers/d3d12/D3D12ResourceState.h:51:45: error: call to non-'constexpr' function 'D3D12_RESOURCE_STATES operator|(D3D12_RESOURCE_STATES, D3D12_RESOURCE_STATES)'
   45 | D3D12_RESOURCE_STATE_RENDER_TARGET          |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   46 | D3D12_RESOURCE_STATE_UNORDERED_ACCESS       |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   47 | D3D12_RESOURCE_STATE_DEPTH_WRITE            |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   48 | D3D12_RESOURCE_STATE_STREAM_OUT             |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   49 | D3D12_RESOURCE_STATE_COPY_DEST              |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   50 | D3D12_RESOURCE_STATE_RESOLVE_DEST           |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   51 | D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE     |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   52 | D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE;
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/CI-Tools/msys64/mingw64/include/minwindef.h:163,
                 from C:/CI-Tools/msys64/mingw64/include/windef.h:9,
                 from C:/CI-Tools/msys64/mingw64/include/windows.h:69,
                 from C:/CI-Tools/msys64/mingw64/include/rpc.h:16,
                 from ../../subprojects/DirectX-Headers-1.0/include/directx/d3d12.h:26,
                 from ../../src/gallium/drivers/d3d12/D3D12ResourceState.h:33,
                 from ../../src/gallium/drivers/d3d12/D3D12ResourceState.cpp:24:
../../subprojects/DirectX-Headers-1.0/include/directx/d3d12.h:2865:1: note: 'D3D12_RESOURCE_STATES operator|(D3D12_RESOURCE_STATES, D3D12_RESOURCE_STATES)' declared here
 2865 | DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_STATES );
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
```

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
cf930db39c d3d12: Move the D3D12ResourceState code to the gallium driver
It's only used there, and we don't plan to use it in Dozen, so let's move
the code to src/gallium/drivers/d3d12/ and get rid of the static
d3d12_resource_state library.

Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16042>
2022-04-20 23:45:28 -07:00