mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 02:52:10 +01:00
[dxbc] Check if the signature is nullptr before using it
Fixes a crash in The Witcher 3.
This commit is contained in:
parent
31772af4a5
commit
0ab27aa4e3
@ -49,13 +49,15 @@ namespace dxvk {
|
|||||||
DxbcClipCullInfo DxbcAnalyzer::getClipCullInfo(const Rc<DxbcIsgn>& sgn) const {
|
DxbcClipCullInfo DxbcAnalyzer::getClipCullInfo(const Rc<DxbcIsgn>& sgn) const {
|
||||||
DxbcClipCullInfo result;
|
DxbcClipCullInfo result;
|
||||||
|
|
||||||
for (auto e = sgn->begin(); e != sgn->end(); e++) {
|
if (sgn != nullptr) {
|
||||||
const uint32_t componentCount = e->componentMask.popCount();
|
for (auto e = sgn->begin(); e != sgn->end(); e++) {
|
||||||
|
const uint32_t componentCount = e->componentMask.popCount();
|
||||||
if (e->systemValue == DxbcSystemValue::ClipDistance)
|
|
||||||
result.numClipPlanes += componentCount;
|
if (e->systemValue == DxbcSystemValue::ClipDistance)
|
||||||
if (e->systemValue == DxbcSystemValue::CullDistance)
|
result.numClipPlanes += componentCount;
|
||||||
result.numCullPlanes += componentCount;
|
if (e->systemValue == DxbcSystemValue::CullDistance)
|
||||||
|
result.numCullPlanes += componentCount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user