Skip to content

Commit ec738e6

Browse files
committed
- Fixed convert matrix bug happening on other vendors GPU Devices.
- Fixed wrong render target format for visiblity buffer pass
1 parent 25007c5 commit ec738e6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

sdk/src/dx12/dx12_backend_command_buffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,9 +1894,9 @@ namespace d3d12
18941894
{
18951895
// DestInfo
18961896
{
1897-
0, // DestSize to be populated by driver implementation
1897+
optimal ? 0 : width * height * sizeof(float16_t), // DestSize to be populated by driver implementation
18981898
optimal ? D3D12_LINEAR_ALGEBRA_MATRIX_LAYOUT_MUL_OPTIMAL : D3D12_LINEAR_ALGEBRA_MATRIX_LAYOUT_COLUMN_MAJOR, // convert to mul optimal layout
1899-
0, // stride is ignored since optimal layout is implementation dependent
1899+
optimal ? 0 : width * sizeof(float16_t), // stride is ignored since optimal layout is implementation dependent
19001900
width, // number of rows in weight matrix to be converted
19011901
height, // number of columns in weight matrix to converted
19021902
D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT16 // convert to float16_t datatype

sdk/src/network/tsnc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ void TSNC::upload_network(CommandQueue cmdQ, CommandBuffer cmdB)
171171
if (m_CVS)
172172
{
173173
mlp::upload_and_convert_matrices(m_Device, cmdQ, cmdB, (char*)cpuMLP.mlp0Buffer.data(), cpuMLP.mlp0Width, cpuMLP.mlp0Height, m_Nwk.mlp.weight0Buffer, m_Nwk.mlp.weight0OptimalBuffer, setIdx * cpuMLP.mlp0Width * cpuMLP.mlp0Height * sizeof(float16_t));
174-
mlp::upload_and_convert_matrices(m_Device, cmdQ, cmdB, (char*)cpuMLP.mlp1Buffer.data(), cpuMLP.mlp1Width, cpuMLP.mlp1Height, m_Nwk.mlp.weight1Buffer, m_Nwk.mlp.weight1OptimalBuffer, setIdx * cpuMLP.mlp0Width * cpuMLP.mlp0Height * sizeof(float16_t));
175-
mlp::upload_and_convert_matrices(m_Device, cmdQ, cmdB, (char*)cpuMLP.mlp2Buffer.data(), cpuMLP.mlp2Width, cpuMLP.mlp2Height, m_Nwk.mlp.weight2Buffer, m_Nwk.mlp.weight2OptimalBuffer, setIdx * cpuMLP.mlp0Width * cpuMLP.mlp0Height * sizeof(float16_t));
174+
mlp::upload_and_convert_matrices(m_Device, cmdQ, cmdB, (char*)cpuMLP.mlp1Buffer.data(), cpuMLP.mlp1Width, cpuMLP.mlp1Height, m_Nwk.mlp.weight1Buffer, m_Nwk.mlp.weight1OptimalBuffer, setIdx * cpuMLP.mlp1Width * cpuMLP.mlp1Height * sizeof(float16_t));
175+
mlp::upload_and_convert_matrices(m_Device, cmdQ, cmdB, (char*)cpuMLP.mlp2Buffer.data(), cpuMLP.mlp2Width, cpuMLP.mlp2Height, m_Nwk.mlp.weight2Buffer, m_Nwk.mlp.weight2OptimalBuffer, setIdx * cpuMLP.mlp2Width * cpuMLP.mlp2Height * sizeof(float16_t));
176176
}
177177
else
178178
{

sdk/src/render_pipeline/dino_renderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void DinoRenderer::initialize(uint64_t hInstance, const CommandLineOptions& opti
5454

5555
// Create the graphics components
5656
graphics::setup_graphics_api(GraphicsAPI::DX12);
57-
//d3d12::device::enable_debug_layer();
57+
// graphics::device::enable_debug_layer();
5858
graphics::device::enable_experimental_features();
5959
m_Device = graphics::device::create_graphics_device();
6060
m_Window = graphics::window::create_window(m_Device, (uint64_t)hInstance, 1920, 1080, "Intel TSNC (DX12)");

sdk/src/render_pipeline/skinned_mesh_renderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void SkinnedMeshRenderer::reload_shaders(const std::string& shaderLibrary)
9494
GraphicsPipelineDescriptor gpd;
9595
gpd.includeDirectories.push_back(shaderLibrary);
9696
gpd.filename = shaderLibrary + "\\Mesh\\VisibilityPass.graphics";
97-
gpd.rtFormat[0] = TextureFormat::R16_UInt;
97+
gpd.rtFormat[0] = TextureFormat::R32_UInt;
9898
gpd.depthStencilState.enableDepth = true;
9999
gpd.depthStencilState.depthtest = DepthTest::LEqual;
100100
gpd.depthStencilState.depthWrite = true;

0 commit comments

Comments
 (0)