Skip to content

WGSL pointer can't be passed as function argument on Firefox #2

@fweibel

Description

@fweibel
Shader validation error: Function [6] 'load_vec4' is invalid
    ┌─ :103:1
    │  
103 │ ╭ fn load_vec4(buffer: ptr<storage, array<float>, read>, index: uint, stride: uint) -> float4 {
104 │ │     let base = index * stride;
105 │ │     return float4(
106 │ │       (*buffer)[base + 0u],
    · │
109 │ │       (*buffer)[base + 3u]
110 │ │     );
    │ ╰──────^ naga::ir::Function [6]
    │  
    = Argument 'buffer' at index 0 is a pointer of space Storage { access: StorageAccess(LOAD) }, which can't be passed into functions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions