Skip to content

SPV shader requiring --scalar-block-layout, fails RGA build #135

@Erfan-Ahmadi

Description

@Erfan-Ahmadi

I'm trying to do register analysis on my pre-built spirv shader (we have our own tooling). this shader requires scalar_block_layout extension which we ensure of at runtime.
but when I try to build it using RGA. it gives me an error:

Error: ERROR: Result::ErrorInvalidShader: Failed to validate SPIR-V:
error: 684: Structure id 131 decorated as Block for variable in PhysicalStorageBuffer storage class must follow standard storage buffer layout rules: member 4 at offset 140 is not aligned to 16
This is may be allowed if you enable the VK_KHR_relaxed_block_layout extension (or use the --relax-block-layout command line flag)

It's simply because the spirv-validator or spv-opt requires the --scalar-block-layout to be passed to the tool. and currently I've found no way to add that flag to rga to make my build successfull.

Please advise me on how to overcome this simple issue. I'd rather not fork this repo just to add a simple flag and build it myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions