Code Monkey home page Code Monkey logo

sdl_gpu_examples's People

Contributors

flibitijibibo avatar thatcosmonaut avatar thespydog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bartwe jaedan

sdl_gpu_examples's Issues

Question on SDL_CompileFromSPIRV and SDL_GpuCreateShader

It seems a bit strange in this code snippet:

if (SDL_GpuGetDriver(device) == SDL_GPU_DRIVER_VULKAN)
{
	shader = SDL_GpuCreateShader(device, &shaderInfo);
}
else
{
	shader = SDL_CompileFromSPIRV(device, &shaderInfo, SDL_FALSE);
}

It seems the design intent of these examples is to load up the SPIR-V blobs and cross compile them. This would make shipping the SPIR-V blobs a cross-platform shader solution. Is this correct? If so, why should I, as a user, need to ever call SDL_GpuCreateShader, unless I write a platform-dependent shader? Even if I'm targeting Vulkan, can I not just also call SDL_CompileFromSPIRV?

ComputeSpriteBatch example triggers presentation mode errors

First of all, this is fantastic work.

On my machine, the ComputeSpriteBatch is the only one failing: nothing shows up, and instead it's a flow of error logs:

WARN: Failed to recreate swapchain!
ERROR: Device does not support requested present mode!

I am on Ubuntu Linux 24.04, with a AMD Radeon 5700XT, a decent GPU:

INFO: Welcome to the SDL_Gpu example suite!
INFO: Press A/D to move between examples!
INFO: STARTING EXAMPLE: ClearScreen
INFO: Validation layers enabled, expect debug level performance!
INFO: SDL_Gpu Driver: Vulkan
INFO: Vulkan Device: AMD Radeon RX 5700 XT (RADV NAVI10)
INFO: Vulkan Driver: radv Mesa 24.0.5-1ubuntu1
INFO: Vulkan Conformance: 1.2.1

All other examples work as expected.

ComputeSpriteBatch seems to be using SDL_GPU_PRESENTMODE_IMMEDIATE.

Many other Vulkan apps do work as expected on my workstation, not sure which presentation mode they do use.

I can try on a Windows machine with different GPU on Monday.

Aggressive readback sample

Cycling transfer buffers isn't as trivial as GPU buffers on the library side, but it should be easy for the app side - we should demonstrate this to avoid having to cobble together host-memory cycling in SDL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.