shader: lower pixel compare masks composed with VCC in a whole-quad tail #3309

Open
opened 2026-11-28 07:53:26 +00:00 by R0Y00 · 4 comments
R0Y00 commented 2026-11-28 07:53:26 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T07:53:26Z.


Refs #2413, #3210 and #870. The native C++ fixed-mesh pixel path can project individual lane predicates, but a pixel tail that combines a two-SGPR comparison mask with VCC through AND, ANDN2 and OR still needs a proven lowering. Related entry-layout support is in #3308.

Use a source-built gfx1013 pixel fixture with WQM, saved exact coverage, a named comparison mask and VCC. Exercise both operands, inactive lanes and a helper lane contribution. Preserve 64-bit mask provenance across register writes and refuse a later SCC read unless its wave-wide nonzero result is established. Include a control in which a mask half is overwritten.

Acceptance: validated DXIL, expected GPU readback for each case, and a passing direct-container regression. On the local fixed-mesh integration, show that the reviewed stage pair links and creates a color PSO with its captured root and attachment state. Report fixture results and integration results separately. Target main after the compiler prerequisite in #3091.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6661477102 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3309). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-28T07:53:26Z. --- Refs #2413, #3210 and #870. The native C++ fixed-mesh pixel path can project individual lane predicates, but a pixel tail that combines a two-SGPR comparison mask with VCC through AND, ANDN2 and OR still needs a proven lowering. Related entry-layout support is in #3308. Use a source-built gfx1013 pixel fixture with WQM, saved exact coverage, a named comparison mask and VCC. Exercise both operands, inactive lanes and a helper lane contribution. Preserve 64-bit mask provenance across register writes and refuse a later SCC read unless its wave-wide nonzero result is established. Include a control in which a mask half is overwritten. Acceptance: validated DXIL, expected GPU readback for each case, and a passing direct-container regression. On the local fixed-mesh integration, show that the reviewed stage pair links and creates a color PSO with its captured root and attachment state. Report fixture results and integration results separately. Target main after the compiler prerequisite in #3091.
SimSalabimse commented 2026-11-28 12:28:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-28T12:28:45Z.


I'd like to take this one. The plan is to build a gfx1013 pixel fixture from source, with WQM, saved exact coverage, and a named compare mask combined with VCC through AND, ANDN2 and OR. It will cover both operands, inactive lanes and a helper-lane contribution. The 64-bit mask provenance stays tracked across register writes. A later SCC read is refused unless the wave-wide nonzero result is established, and there is a control where one mask half gets overwritten.

I'll base it on #3091 as the issue says, and target main once that lands. I'll test on WARP and on NVIDIA hardware (32-lane waves).

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7239254602 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3309#issuecomment-7239254602). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-28T12:28:45Z. --- I'd like to take this one. The plan is to build a gfx1013 pixel fixture from source, with WQM, saved exact coverage, and a named compare mask combined with VCC through AND, ANDN2 and OR. It will cover both operands, inactive lanes and a helper-lane contribution. The 64-bit mask provenance stays tracked across register writes. A later SCC read is refused unless the wave-wide nonzero result is established, and there is a control where one mask half gets overwritten. I'll base it on #3091 as the issue says, and target main once that lands. I'll test on WARP and on NVIDIA hardware (32-lane waves). AI-Assisted
Leyukaka commented 2026-11-28 20:43:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T20:43:27Z.


@SimSalabimse, are you still on this? There has been no PR or comment since the 12:28 UTC claim. If you have released it, I can take it.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7245493553 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3309#issuecomment-7245493553). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T20:43:27Z. --- @SimSalabimse, are you still on this? There has been no PR or comment since the 12:28 UTC claim. If you have released it, I can take it.
SimSalabimse commented 2026-11-28 21:00:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-28T21:00:08Z.


@Leyukaka Yep, I'm still on it. I was waiting for #3091 to land (it merged at 13:48 UTC), and the fixture work is starting now on current main. I'll post here when the branch is up.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7245699343 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3309#issuecomment-7245699343). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-28T21:00:08Z. --- @Leyukaka Yep, I'm still on it. I was waiting for #3091 to land (it merged at 13:48 UTC), and the fixture work is starting now on current main. I'll post here when the branch is up. AI-Assisted
Leyukaka commented 2026-11-29 15:30:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T15:30:40Z.


Taking this over from #3401 since there has been no activity for 2 h; will hand back if @SimSalabimse resumes. The plan is in a comment on #3401.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7258146218 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3309#issuecomment-7258146218). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T15:30:40Z. --- Taking this over from #3401 since there has been no activity for 2 h; will hand back if @SimSalabimse resumes. The plan is in a comment on #3401.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#3309
No description provided.