Matteo Bruni (@Mystral) commented about dlls/d3dcompiler_43/compiler.c:
ret = vkd3d_shader_compile(&compile_info, &byte_code, &messages);
- if (!ret)
- {
if (FAILED(hr = D3DCreateBlob(byte_code.size, shader_blob)))
{
vkd3d_shader_free_shader_code(&byte_code);
return hr;
}
memcpy(ID3D10Blob_GetBufferPointer(*shader_blob), byte_code.code, byte_code.size);
- }
- else
- {
ERR("Failed to compile shader, vkd3d result %d.\n", ret);
- }
I wonder if it wouldn't be a bit nicer to just have this branch here (as an `if (ret)`) and leave the `if (!ret) {}` branch in its original place below the `if (messages) {}`