Skip to content

richer wesl-test: ideas from amberscript #188

Description

@mighdoll

amberscript has a rich declarative language for shader tests. Far beyond what wesl-test can do so far..

What ideas can/should we adapt for wesl-test?

Some amberscript of note:

  • declarative buffer initalizers:

      BUFFER myData DATA_TYPE float DATA 1.0 2.0 3.0 4.0 END                                
    
  • A rich set of comparators for numeric values:
    EXPECT LT, EXPECT LE, EXPECT EQ, etc.

  • Buffer comparisions

    EXPECT buf1 RMSE_BUFFER buf2 TOLERANCE 0.01
    
  • Buffer copying, clearing

    CLEAR pipeline                                                                        
    COPY buf1 TO buf2                                                                     
    
  • earth mover distance metrics for image snapshot comparisons

  • Probes to check particular values or regions in buffers and images

    EXPECT kImgBuffer IDX 0 0 SIZE 127 127 EQ_RGB 255 0 0
    EXPECT kComputeBuffer IDX 524280 EQ 255 255
    
  • Declarative pipelines

    PIPELINE compute kComputePipeline
      ATTACH kComputeShader
      BIND BUFFER kComputeBuffer AS storage DESCRIPTOR_SET 0 BINDING 3
    END  # pipeline
    
  • Run pipelines, expiclity and repeatedly

    REPEAT 10
      RUN pipeline1 10 1 1
      RUN pipeline2 2 1 1
    END
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Unprioritized

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions