Skip to content

A few API questions #173

@madebr

Description

@madebr
  • SDL_ShaderCross_CompileGraphicsShaderFromSPIRV accepts a const SDL_ShaderCross_ComputePipelineMetadata *metadata argument. But this type has also irrelevant members: you don't need the inputs and outputs to compile a shader.

    Is this ok (and maybe should be documented)? Or should we introduce a new type?

  • Looking at the implementation of SDL_ShaderCross_CompileGraphicsShaderFromSPIRV and SDL_ShaderCross_CompileComputePipelineFromSPIRV, these don't forward properties to SDL's SDL_CreateGPUComputePipeline or SDL_CreateGPUShader. This is probably ok as it is a convenience function. But should we document that all properties passed to the SDL_shadercross api are for SDL_shadercross use only?

  • The properties are missing documentation

  • The property key names should be renamed to be in the SDL_shadercross namespace. For example SDL.shadercross.spirv.pssl.compatibility should be renamed SDL_shadercross.spirv.pssl.compatibility

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