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:
@@ -159,6 +159,7 @@ bool D3D12Screenshot::CopyToReadbackAndSave(ID3D12Device* device,
|
||||
unsigned char* mappedData = nullptr;
|
||||
hr = readbackBuffer->Map(0, &readRange, (void**)&mappedData);
|
||||
if (FAILED(hr)) {
|
||||
XCEngine::Debug::Logger::Get().Error(XCEngine::Debug::LogCategory::Rendering, "Screenshot: Map failed");
|
||||
cmdList->Release();
|
||||
cmdAlloc->Release();
|
||||
readbackBuffer->Release();
|
||||
|
||||
@@ -20,6 +20,7 @@ bool D3D12Shader::CompileFromFile(const wchar_t* filePath, const char* entryPoin
|
||||
if (m_error) {
|
||||
const char* errorMsg = static_cast<const char*>(m_error->GetBufferPointer());
|
||||
OutputDebugStringA(errorMsg);
|
||||
fprintf(stderr, "[SHADER ERROR] %s\n", errorMsg);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user