Skip to content

Warning or error should be emitted if shader lacks an end instruction #34

@jrbuchanan02

Description

@jrbuchanan02

Feature Request

I'm new to writing 3DS homebrew and I'm also new to writing shaders for the PICA200. I've found it's easy to accidentally forget to add the end instruction to a shader. Of course, since the GPU simply continues past the shaders I've written and into whatever's in memory, the program immediately hangs or crashes (at least when testing on emulator)

What feature are you suggesting?

Overview:

  • If picasso doesn't emit the end instruction for a shader, it should output some form of warning or error if it also sees that the shader should have an end instruction

Smaller Details:

  • I think that in practice, the entry point for the shader usually contains the end instruction which finishes the shader. Perhaps that's where this check should occur?
  • I'm not sure if the shader files (I think devkitPro's 3ds_rules build shaders by individual file) always have the shader's end instruction so I'm not sure if a missing end indicates a malformed shader.

Nature of Request:

  • Addition
    • Add warning or error when the shader has no end instruction

Why would this feature be useful?

This feature would add protection against mindless errors for new homebrew developers such as me and also adds an extra layer of protection against these mindless errors for more experienced devs.

Metadata

Metadata

Assignees

No one assigned

    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