这是indexloc提供的服务,不要输入任何密码
Skip to content

Compat: Disallow vertex stride of 0 #4515

@Kangz

Description

@Kangz

I think this is another thing that needs to be added to the list. WebGPU supports a stride of 0 for attributes. OpenGL ES does not. Stride of 0 in GL = advance the size of the attribute. Stride of 0 in WebGPU = a stride of 0 as in don't advance the attribute. Just keep reading the same value.

I guess in Compat a stride if 0 in an attribute would generate a validation error? Otherwise you could read value in the buffer, turn off the attribute (gl.disableVertexAttribPointer), and set the attribute's constant value (gl.vertexAttrib4f(...valueReadFromBuffer))

Originally posted by @greggman in #4266 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatWebGPU Compatibility Mode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions