102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
backend_sdl3gpu_pipelines.c File Reference
#include "backend_sdl3gpu_private.h"
#include "graphics_private.h"
#include <dttr_log.h>
#include <stddef.h>
#include "gen/sdl3gpu_shaders.h"

Go to the source code of this file.

Data Structures

struct  graphics_shader_blob

Functions

static const char * shader_stage_name (SDL_GPUShaderStage stage)
static graphics_shader_blob get_basic_vert_blob (SDL_GPUShaderFormat format)
static graphics_shader_blob get_basic_frag_blob (SDL_GPUShaderFormat format)
static SDL_GPUShader * create_shader (const graphics_shader_blob *blob, SDL_GPUShaderStage stage, uint32_t num_samplers)
static void release_shader_pair (DTTR_BackendState *state, SDL_GPUShader *vert, SDL_GPUShader *frag)
static bool create_graphics_pipelines (DTTR_BackendState *state, SDL_GPUShader *vert, SDL_GPUShader *frag)
bool dttr_graphics_sdl3gpu_create_pipelines ()
 Builds all graphics pipelines used by the SDL3 GPU backend.

Function Documentation

◆ create_graphics_pipelines()

bool create_graphics_pipelines ( DTTR_BackendState * state,
SDL_GPUShader * vert,
SDL_GPUShader * frag )
static

◆ create_shader()

SDL_GPUShader * create_shader ( const graphics_shader_blob * blob,
SDL_GPUShaderStage stage,
uint32_t num_samplers )
static

◆ dttr_graphics_sdl3gpu_create_pipelines()

bool dttr_graphics_sdl3gpu_create_pipelines ( )

Builds all graphics pipelines used by the SDL3 GPU backend.

Definition at line 207 of file backend_sdl3gpu_pipelines.c.

References create_graphics_pipelines(), create_shader(), dttr_backend, DTTR_LOG_ERROR, get_basic_frag_blob(), get_basic_vert_blob(), NULL, release_shader_pair(), and state.

Referenced by dttr_graphics_sdl3gpu_init().

◆ get_basic_frag_blob()

graphics_shader_blob get_basic_frag_blob ( SDL_GPUShaderFormat format)
static

Definition at line 41 of file backend_sdl3gpu_pipelines.c.

References NULL.

Referenced by dttr_graphics_sdl3gpu_create_pipelines().

◆ get_basic_vert_blob()

graphics_shader_blob get_basic_vert_blob ( SDL_GPUShaderFormat format)
static

Definition at line 29 of file backend_sdl3gpu_pipelines.c.

References NULL.

Referenced by dttr_graphics_sdl3gpu_create_pipelines().

◆ release_shader_pair()

void release_shader_pair ( DTTR_BackendState * state,
SDL_GPUShader * vert,
SDL_GPUShader * frag )
static

Definition at line 83 of file backend_sdl3gpu_pipelines.c.

References state.

Referenced by dttr_graphics_sdl3gpu_create_pipelines().

◆ shader_stage_name()

const char * shader_stage_name ( SDL_GPUShaderStage stage)
static

Definition at line 17 of file backend_sdl3gpu_pipelines.c.

References stage.

Referenced by create_shader().