Browse Source
Merge pull request #9578 from bylaws/patch-2
Avoid OOB array access reading passthrough attr mask
pull/15/merge
liamwhite
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/shader_recompiler/frontend/maxwell/translate_program.cpp
|
|
|
@ -259,7 +259,7 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo |
|
|
|
program.is_geometry_passthrough = sph.common0.geometry_passthrough != 0; |
|
|
|
if (program.is_geometry_passthrough) { |
|
|
|
const auto& mask{env.GpPassthroughMask()}; |
|
|
|
for (size_t i = 0; i < program.info.passthrough.mask.size(); ++i) { |
|
|
|
for (size_t i = 0; i < mask.size() * 32; ++i) { |
|
|
|
program.info.passthrough.mask[i] = ((mask[i / 32] >> (i % 32)) & 1) == 0; |
|
|
|
} |
|
|
|
|
|
|
|
|