Skip to content

naga-agal: Extend dp3 source operands to vec4 - #25125

Open
pngdrift wants to merge 2 commits into
ruffle-rs:masterfrom
pngdrift:extend-dp3-sources-vec4
Open

pngdrift wants to merge 2 commits into
ruffle-rs:masterfrom
pngdrift:extend-dp3-sources-vec4

Conversation

@pngdrift

@pngdrift pngdrift commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #23270.

Previously dp3 loaded its sources without extending them to vec4 before applying the vec3 swizzle.
For a FLOAT_2 attribute, this caused the swizzle to reference the Z component of a vec2, resulting in a wgpu shader validation error like this:

Shader validation error: Entry point main at Vertex is invalid
 = Expression [13] is invalid
 = Swizzle component Z is outside of vector size Bi

Testing

Added stage3d/agal_dp3_attribute_formats.

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

@pngdrift
pngdrift force-pushed the extend-dp3-sources-vec4 branch from d20dccd to 952a8a5 Compare November 7, 2026 15:14
@Lord-McSweeney Lord-McSweeney added A-avm2 Area: AVM2 (ActionScript 3) stage3d T-fix Type: Bug fix (in something that's supposed to work already) llm The PR contains mostly LLM-generated code labels Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm2 Area: AVM2 (ActionScript 3) llm The PR contains mostly LLM-generated code stage3d T-fix Type: Bug fix (in something that's supposed to work already)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on AlternativaLoader.swf

2 participants