tests/vkd3d-shader-api: Refactorings to allow dxcompiler and Vulkan use in the shader API tests.
Storage buffer UAVs are currently not tested, and vkd3d does not use them. Testing can be accomplished using the BUFFER_UAV flag in the API tests, but we need to make dxcompiler and Vulkan helpers available there first.
Merge request reports
Activity
Storage buffer UAVs are not tested. It can be done in the Vulkan runner, but is probably not worth it.
It could also be tested outside the shader runner, for example as a vkd3d_shader_api.c test. I imagine it would help to move some code from shader_runner_vulkan.c to something like utils.h and d3d12_test_utils.h for sharing, but in any case, evidently having tests for this functionality is useful.
Perhaps tests should wait until after vkd3d is patched to use SSBOs, because then the d3d12 tests will use them, and the other pathway will need tests instead.
Presumably you'd just run the same tests twice; once with BUFFER_UAV_STORAGE_TEXEL_BUFFER and once with BUFFER_UAV_STORAGE_BUFFER.
I don't know the history, but apparently it was decided during development that the shader API would support both storage buffers and storage texel buffers. Probably the reason vkd3d uses storage texel buffers is because D3D12 supports 32-bit alignment of buffer offsets, and
minStorageBufferOffsetAlignment
is greater than 4 on some hardware. We use storage texel buffers andEXT_texel_buffer_alignment
to support 32-bit alignments. RADV has aminStorageBufferOffsetAlignment
of 4 for Navi cards, and a comment in vkd3d-proton says Nvidia supports 4 but advertises only 16. We need to use storage buffers for SM 6.2 because Vulkan storage texel buffers don't support 16-bit access. Offsets are a problem on Intel and maybe others, but vkd3d-proton stores offsets in a special buffer to work around that.Storage buffers may be a little more performant because Vulkan buffer views are not required.
added 52 commits
-
c0536a54...ccb6150a - 48 commits from branch
wine:master
- 6e1db76d - tests/d3d12: Test format R8G8B8A8_UNORM in test_typed_buffer_uav().
- 3d0967df - tests/shader-runner: Move dxc compilation helpers to dxc_compile.h.
- f37936f6 - tests/shader-runner: Move Vulkan helper functions to vulkan_utils.h.
- 77ebc7ee - tests/vkd3d-shader-api: Add tests for the BUFFER_UAV compiler option.
Toggle commit list-
c0536a54...ccb6150a - 48 commits from branch
- Resolved by Giovanni Mascellani
- Resolved by Giovanni Mascellani
- Resolved by Giovanni Mascellani
- Resolved by Giovanni Mascellani
- Resolved by Giovanni Mascellani
added 6 commits
- ebe0743b - tests/shader-runner: Introduce struct vulkan_test_context for the Vulkan runner.
- fc47d6dd - tests/shader-runner: Move struct vulkan_test_context to vulkan_utils.h.
- cd672c61 - tests/shader-runner: Move Vulkan helper functions to vulkan_utils.h.
- cb9a9fd6 - tests/shader-runner: Introduce a create_vulkan_pipeline_layout() helper function.
- 37a642fd - tests/shader-runner: Introduce a create_vulkan_shader_stage() helper function.
- 98bbe8c0 - tests/vkd3d-shader-api: Add tests for the BUFFER_UAV compiler option.
Toggle commit list- tests/dxc_compile.h 0 → 100644
1 2 changed this line in version 5 of the diff
- tests/dxc_compile.h 0 → 100644
9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21 #ifndef __VKD3D_DXC_COMPILE_H 22 #define __VKD3D_DXC_COMPILE_H 23 24 #include "vkd3d_d3dcommon.h" Sorry, I was unclear. I'd need the two new lines to be on top:
#define COBJMACROS #include "vkd3d_test.h" #include "vkd3d_d3dcommon.h" #include "vkd3d_d3dcompiler.h" #include "dxcompiler.h"
Otherwise
vkd3d_d3dcommon.h
tries to (recursively) includewindows.h
and fails (whilevkd3d_test.h
prevents that by includingvkd3d_windows.h
before, and it also definestrace()
).changed this line in version 6 of the diff
added 7 commits
- a6a7a2c0 - tests/shader-runner: Move dxc compilation helpers to dxc_compile.h.
- d35e8315 - tests/shader-runner: Introduce struct vulkan_test_context for the Vulkan runner.
- 4b062a3e - tests/shader-runner: Move struct vulkan_test_context to vulkan_utils.h.
- 9a1e5a97 - tests/shader-runner: Move Vulkan helper functions to vulkan_utils.h.
- 1ae2b236 - tests/shader-runner: Introduce a create_vulkan_pipeline_layout() helper function.
- c4966a3c - tests/shader-runner: Introduce a create_vulkan_shader_stage() helper function.
- 62a19136 - tests/vkd3d-shader-api: Add tests for the BUFFER_UAV compiler option.
Toggle commit listadded 7 commits
- d8538a52 - tests/shader-runner: Move dxc compilation helpers to dxc_compile.h.
- 405f95aa - tests/shader-runner: Introduce struct vulkan_test_context for the Vulkan runner.
- 67f4cd3a - tests/shader-runner: Move struct vulkan_test_context to vulkan_utils.h.
- ebd8ce82 - tests/shader-runner: Move Vulkan helper functions to vulkan_utils.h.
- f4fb0565 - tests/shader-runner: Introduce a create_vulkan_pipeline_layout() helper function.
- 722cfd43 - tests/shader-runner: Introduce a create_vulkan_shader_stage() helper function.
- 69101b03 - tests/vkd3d-shader-api: Add tests for the BUFFER_UAV compiler option.
Toggle commit list