thatcosmonaut / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
1 stars 1 forks source link

Ensure resource consistency across backends #63

Open thatcosmonaut opened 4 days ago

thatcosmonaut commented 4 days ago

We should have a test like:

// update texture, not cycled
SDL_GpuUploadToTexture(myCopyPass, myTexture, ...)

// draw call
...
SDL_GpuBindFragmentSamplers(myRenderPass, myTexture, ...)
SDL_GpuDrawPrimitives(myRenderPass, ...)
...

// update texture again, not cycled
SDL_GpuUploadToTexture(myCopyPass, myTexture, ...)

// draw call 
...
SDL_GpuBindFragmentSamplers(myRenderPass, myTexture, ...)
SDL_GpuDrawPrimitives(myRenderPass, ...)
...

The expected behavior is that each draw call should use the data that was uploaded to the texture right before the draw call. It's not good practice to do this, but it should at least behave consistently.