Skip to content
Snippets Groups Projects
Unverified Commit 926438b6 authored by liamwhite's avatar liamwhite Committed by GitHub
Browse files

Merge pull request #9578 from bylaws/patch-2

Avoid OOB array access reading passthrough attr mask
parents 432d48d9 d34275a2
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment