mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
d3d12: fix return-code without dxcompiler.dll
When we don't have a good dxcompiler.dll that we can load IDxcLibrary
from to help with diagnostics, we currently return true for validation
even if the validation actually failed.
Let's fix that, and also add a debug-message explaining what went wrong
for those who are debugging and wondering what's up.
Fixes: 2ea15cd661 ("d3d12: introduce d3d12 gallium driver")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15744>
This commit is contained in:
parent
0e14b674f1
commit
837f781c9a
1 changed files with 7 additions and 1 deletions
|
|
@ -1590,7 +1590,13 @@ bool d3d12_validation_tools::validate_and_sign(struct blob *dxil)
|
|||
validator->Validate(&source, DxcValidatorFlags_InPlaceEdit, &result);
|
||||
HRESULT validationStatus;
|
||||
result->GetStatus(&validationStatus);
|
||||
if (FAILED(validationStatus) && library) {
|
||||
if (FAILED(validationStatus)) {
|
||||
if (!library) {
|
||||
debug_printf("D3D12: validation failed, but lacking "
|
||||
"IDxcLibrary for proper diagnostics.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
ComPtr<IDxcBlobEncoding> printBlob, printBlobUtf8;
|
||||
result->GetErrorBuffer(&printBlob);
|
||||
library->GetBlobAsUtf8(printBlob.Get(), printBlobUtf8.GetAddressOf());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue