mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[d3d11] Disallow mismatching shader bytecode and type
Fixes a wine test which lead to a "refcounting bug" down the line.
This commit is contained in:
parent
2405e474e5
commit
838a6ef0f1
@ -34,7 +34,11 @@ namespace dxvk {
|
|||||||
// Decide whether we need to create a pass-through
|
// Decide whether we need to create a pass-through
|
||||||
// geometry shader for vertex shader stream output
|
// geometry shader for vertex shader stream output
|
||||||
bool passthroughShader = pDxbcModuleInfo->xfb != nullptr
|
bool passthroughShader = pDxbcModuleInfo->xfb != nullptr
|
||||||
&& module.programInfo().type() != DxbcProgramType::GeometryShader;
|
&& (module.programInfo().type() == DxbcProgramType::VertexShader
|
||||||
|
|| module.programInfo().type() == DxbcProgramType::DomainShader);
|
||||||
|
|
||||||
|
if (module.programInfo().shaderStage() != pShaderKey->type() && !passthroughShader)
|
||||||
|
throw DxvkError("Mismatching shader type.");
|
||||||
|
|
||||||
m_shader = passthroughShader
|
m_shader = passthroughShader
|
||||||
? module.compilePassthroughShader(*pDxbcModuleInfo, name)
|
? module.compilePassthroughShader(*pDxbcModuleInfo, name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user