Skip to content

Odd behaviour uploading buffers for compute shaders on Vulkan #200

@0ffz

Description

@0ffz

Posted this to Discord a few weeks back but I forgot to track it here: I've written a unit test that passes on OpenGL but not Vulkan backends here.

This test initializes a buffer with 1..n and tries to run a single iteration of a shader that multiplies inputs by two. The Vulkan backend fails, with the buffer containing random data, OpenGL multiplies correctly.

  • Here's the shader exec function referenced in there, which basically just runs a task in onAfterCollect.
  • Buffers are initialized via a simple helper located here
  • Junit extension for setting up scene is here, this essentially just creates an empty scene.

If it would help, I can try setting up a similar extension in this repo to add to the test suite, these need to create a window to run though so I'm not sure if they'd work on a github runner. Maybe as a separate module could make sense? (If there already are shader tests somewhere that I missed let me know too!)

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