D3D12: Add Quad integration test with texture sampling
- Add quad test that renders a textured quad with earth texture - Add quad.hlsl shader with texture sampling (Texture2D + SamplerState) - Add SRV descriptor heap and root signature with SRV table - Fix MessageBox errors -> Log() console output - Fix shader float2->float4 type mismatch - Fix texture initialization to use proper command list handling - Add shader error output to stderr in D3D12Shader - Add Map error logging in D3D12Screenshot
This commit is contained in:
60
tests/RHI/D3D12/integration/quad/CMakeLists.txt
Normal file
60
tests/RHI/D3D12/integration/quad/CMakeLists.txt
Normal file
@@ -0,0 +1,60 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
project(D3D12_Quad)
|
||||
|
||||
set(ENGINE_ROOT_DIR ${CMAKE_SOURCE_DIR}/engine)
|
||||
|
||||
add_executable(D3D12_Quad
|
||||
WIN32
|
||||
main.cpp
|
||||
)
|
||||
|
||||
set_target_properties(D3D12_Quad PROPERTIES LINK_FLAGS "/INCREMENTAL:NO")
|
||||
|
||||
target_include_directories(D3D12_Quad PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${ENGINE_ROOT_DIR}/include
|
||||
${ENGINE_ROOT_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(D3D12_Quad PRIVATE
|
||||
UNICODE
|
||||
_UNICODE
|
||||
)
|
||||
|
||||
target_link_libraries(D3D12_Quad PRIVATE
|
||||
d3d12
|
||||
dxgi
|
||||
d3dcompiler
|
||||
winmm
|
||||
XCEngine
|
||||
)
|
||||
|
||||
add_custom_command(TARGET D3D12_Quad POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Res
|
||||
$<TARGET_FILE_DIR:D3D12_Quad>/Res
|
||||
)
|
||||
|
||||
add_custom_command(TARGET D3D12_Quad POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_SOURCE_DIR}/tests/RHI/D3D12/integration/compare_ppm.py
|
||||
$<TARGET_FILE_DIR:D3D12_Quad>/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_SOURCE_DIR}/tests/RHI/D3D12/integration/run_integration_test.py
|
||||
$<TARGET_FILE_DIR:D3D12_Quad>/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
|
||||
$<TARGET_FILE_DIR:D3D12_Quad>/
|
||||
)
|
||||
|
||||
add_test(NAME D3D12_Quad_Integration
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE_DIR:D3D12_Quad>/run_integration_test.py
|
||||
$<TARGET_FILE:D3D12_Quad>
|
||||
quad.ppm
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
|
||||
5
|
||||
WORKING_DIRECTORY $<TARGET_FILE_DIR:D3D12_Quad>
|
||||
)
|
||||
Reference in New Issue
Block a user