MultiverseSocial.com

Channel circle › core 1 Device › gpu

gpu (core 1, sub 0, flat id 16)

428 functions
SignaturePurposeSourceScope
int AttachGPUChannel(struct NetXecChannel *nx, uint32_t w, uint32_t h, uint32_t dev_flags)(no comment)DeviceGpu.c:12public
void DetachGPUChannel(struct NetXecChannel *nx)(no comment)DeviceGpu.c:33public
int IsAttachedGPUChannel(const struct NetXecChannel *nx)(no comment)DeviceGpu.c:45public
uint32_t GPUBackendPasses(void)(no comment)GPUBackendSDL3.c:33public
void GPUBackendRelease(void)(no comment)GPUBackendSDL3.c:35public
static uint32_t GbShader(SDL_GPUDevice *d, int frag)(no comment)GPUBackendSDL3.c:45static
static int GbSetup(SDL_GPUDevice *d, uint32_t w, uint32_t h)(no comment)GPUBackendSDL3.c:73static
int DrawGPULines(const struct ThreadGPUSeg *segs, int count, uint32_t w, uint32_t h, uint32_t *pixels)(no comment)GPUBackendSDL3.c:142public
int GPUCreateCount(void)(no comment)GPUChannel.c:45public
static void GpuMemAttach(void)(no comment)GPUChannel.c:47static
static void GpuMemDetach(void)(no comment)GPUChannel.c:71static
void * GPUChannelHandle(void)hv-c M0: for GPUBackendSDL3.cGPUChannel.c:85public
static uint64_t GPUFlags(const struct GPUChannel *gpu)flags are read under the channel mutex but CLOSING is set under the registry lock: atomic access.GPUChannel.c:97static
static void GPUPublish(struct GPUChannel *gpu)(no comment)GPUChannel.c:99static
struct GPUChannel * GPUAcquire(void)(no comment)GPUChannel.c:106public
void GPUReleaseRef(struct GPUChannel *gpu)(no comment)GPUChannel.c:117public
static struct GPUChannel * GPUAcquireThis(struct GPUChannel *want)Acquire and check that a caller's pointer is the live channel.GPUChannel.c:129static
static void GPULock(struct GPUChannel *gpu)(no comment)GPUChannel.c:136static
void GPUUnlock(struct GPUChannel *gpu)(no comment)GPUChannel.c:142public
int GPULockLive(struct GPUChannel *gpu)Lock a referenced channel; fails (and leaves it unlocked) once Close has started.GPUChannel.c:149public
static void GPUCountAdd(uint64_t *c, uint64_t n)Saturating u64 add (finding 9) and the u32 view for the old 32-bit wire fields.GPUChannel.c:161static
static uint32_t GPUSat32(uint64_t v)(no comment)GPUChannel.c:162static
long long GetGPUMemory(void)Bytes charged to GPU_MEMORY, read through MemoryChannel's Read entry point (its channel interface: 64-byte 'MEMC' record, [40] u64 allocated GPU). No timer, no global (finding 10).GPUChannel.c:166public
static void GpuPixel(struct GPUChannel *gpu, int x, int y, uint32_t color)(no comment)GPUChannel.c:176static
static void GpuLine(struct GPUChannel *gpu, int x0, int y0, int x1, int y1, uint32_t color)(no comment)GPUChannel.c:184static
static void GpuPixelCover(struct GPUChannel *gpu, int x, int y, uint32_t color, int cover)(no comment)GPUChannel.c:205static
static void GpuLineFine(struct GPUChannel *gpu, int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t color)Endpoints are 16.16. Coverage keeps the fractional offset visible.GPUChannel.c:222static
static uint32_t GpuRng(struct GPUChannelState *st)(no comment)GPUChannel.c:261static
static int32_t GpuSpeed(struct GPUChannelState *st)(no comment)GPUChannel.c:267static
static void GpuBounce(int32_t *p, int32_t *v, int32_t limit)(no comment)GPUChannel.c:274static
static void GpuFill(struct GPUChannel *gpu, uint32_t color)(no comment)GPUChannel.c:289static
static void OpNop(struct GPUChannel *gpu)(no comment)GPUChannel.c:297static
static void OpCopy(struct GPUChannel *gpu)(no comment)GPUChannel.c:299static
static void OpFill(struct GPUChannel *gpu)(no comment)GPUChannel.c:313static
static void OpBlit(struct GPUChannel *gpu)(no comment)GPUChannel.c:315static
static void OpClear(struct GPUChannel *gpu)(no comment)GPUChannel.c:321static
static void OpSetapen(struct GPUChannel *gpu)(no comment)GPUChannel.c:323static
static void OpSetbpen(struct GPUChannel *gpu)(no comment)GPUChannel.c:328static
static void OpLine(struct GPUChannel *gpu)(no comment)GPUChannel.c:333static
static void OpRect(struct GPUChannel *gpu)(no comment)GPUChannel.c:338static
static void OpEllipse(struct GPUChannel *gpu)(no comment)GPUChannel.c:346static
static void OpImage(struct GPUChannel *gpu)(no comment)GPUChannel.c:371static
static void OpPolygon(struct GPUChannel *gpu)(no comment)GPUChannel.c:382static
static void OpSpline(struct GPUChannel *gpu)(no comment)GPUChannel.c:390static
static void OpAlloc(struct GPUChannel *gpu)GPU_CHANNEL_ALLOCATE: (re)allocate the frame (frame_w x frame_h) through AllocMemExt(GPU_MEMORY) if it was freed. GPU_CHANNEL_FREE: free it (FreeMem). A failure stops the stream (op_error).GPUChannel.c:410static
static void OpFree(struct GPUChannel *gpu)(no comment)GPUChannel.c:434static
static void OpCustom0(struct GPUChannel *gpu)(no comment)GPUChannel.c:441static
static uint32_t PixClamp(int v)(no comment)GPUChannel.c:446static
static uint32_t PixCh(uint32_t p, int shift)(no comment)GPUChannel.c:453static
static uint32_t PixArgb(uint32_t a, uint32_t r, uint32_t g, uint32_t b)(no comment)GPUChannel.c:458static
static void GpuMap(struct GPUChannel *gpu, uint32_t (*fn)(uint32_t, uint32_t))(no comment)GPUChannel.c:463static
static uint32_t PixAlphaBlit(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:473static
static uint32_t PixBlend(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:482static
static uint32_t PixKey(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:490static
static uint32_t PixCorrect(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:496static
static uint32_t PixBright(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:503static
static uint32_t PixContrast(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:512static
static uint32_t PixSat(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:522static
static uint32_t PixHue(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:533static
static uint32_t PixFilter(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:539static
static uint32_t PixInvert(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:545static
static uint32_t PixGray(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:552static
static uint32_t PixMask(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:560static
static uint32_t PixMul(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:565static
static uint32_t PixScreen(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:573static
static uint32_t PixAdd(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:581static
static uint32_t PixSub(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:589static
static uint32_t PixDiff(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:597static
static uint32_t PixMax(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:608static
static uint32_t PixMin(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:618static
static uint32_t PixHalf(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:628static
static uint32_t PixOpaque(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:635static
static uint32_t PixTrans(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:641static
static uint32_t PixGlow(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:647static
static uint32_t PixFadeIn(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:657static
static uint32_t PixFadeOut(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:667static
static uint32_t PixHi(uint32_t p, uint32_t fg)(no comment)GPUChannel.c:677static
static void OpAlphaBlit(struct GPUChannel *gpu)(no comment)GPUChannel.c:685static
static void OpAlphablend(struct GPUChannel *gpu)(no comment)GPUChannel.c:686static
static void OpAlphaFill(struct GPUChannel *gpu)(no comment)GPUChannel.c:687static
static void OpColorkey(struct GPUChannel *gpu)(no comment)GPUChannel.c:692static
static void OpCorrect(struct GPUChannel *gpu)(no comment)GPUChannel.c:693static
static void OpBright(struct GPUChannel *gpu)(no comment)GPUChannel.c:694static
static void OpContrast(struct GPUChannel *gpu)(no comment)GPUChannel.c:695static
static void OpSat(struct GPUChannel *gpu)(no comment)GPUChannel.c:696static
static void OpHue(struct GPUChannel *gpu)(no comment)GPUChannel.c:697static
static void OpFilter(struct GPUChannel *gpu)(no comment)GPUChannel.c:698static
static void OpInvert(struct GPUChannel *gpu)(no comment)GPUChannel.c:699static
static void OpGray(struct GPUChannel *gpu)(no comment)GPUChannel.c:700static
static void OpMask(struct GPUChannel *gpu)(no comment)GPUChannel.c:701static
static void OpTileCopy(struct GPUChannel *gpu)(no comment)GPUChannel.c:703static
static void OpTileFill(struct GPUChannel *gpu)(no comment)GPUChannel.c:725static
static void OpEdge(struct GPUChannel *gpu)(no comment)GPUChannel.c:737static
static void OpBlurX(struct GPUChannel *gpu)(no comment)GPUChannel.c:749static
static void OpMotion(struct GPUChannel *gpu)(no comment)GPUChannel.c:766static
static void OpSoften(struct GPUChannel *gpu)(no comment)GPUChannel.c:767static
static void OpBlur(struct GPUChannel *gpu)(no comment)GPUChannel.c:768static
static void OpWarp(struct GPUChannel *gpu)(no comment)GPUChannel.c:770static
static void OpNoise(struct GPUChannel *gpu)(no comment)GPUChannel.c:783static
static void OpScratch(struct GPUChannel *gpu)(no comment)GPUChannel.c:792static
static void OpShadow(struct GPUChannel *gpu)(no comment)GPUChannel.c:800static
static void OpOutline(struct GPUChannel *gpu)(no comment)GPUChannel.c:813static
static void OpContour(struct GPUChannel *gpu)(no comment)GPUChannel.c:826static
static void OpSharpen(struct GPUChannel *gpu)(no comment)GPUChannel.c:828static
static void OpEmboss(struct GPUChannel *gpu)(no comment)GPUChannel.c:843static
static void OpPixelate(struct GPUChannel *gpu)(no comment)GPUChannel.c:857static
static void OpDither(struct GPUChannel *gpu)(no comment)GPUChannel.c:871static
static void OpMul(struct GPUChannel *gpu)(no comment)GPUChannel.c:886static
static void OpScreen(struct GPUChannel *gpu)(no comment)GPUChannel.c:887static
static void OpAdd(struct GPUChannel *gpu)(no comment)GPUChannel.c:888static
static void OpSubpix(struct GPUChannel *gpu)(no comment)GPUChannel.c:889static
static void OpDiff(struct GPUChannel *gpu)(no comment)GPUChannel.c:890static
static void OpLighten(struct GPUChannel *gpu)(no comment)GPUChannel.c:891static
static void OpDarken(struct GPUChannel *gpu)(no comment)GPUChannel.c:892static
static void OpShadowize(struct GPUChannel *gpu)(no comment)GPUChannel.c:893static
static void OpOpaque(struct GPUChannel *gpu)(no comment)GPUChannel.c:894static
static void OpTrans(struct GPUChannel *gpu)(no comment)GPUChannel.c:895static
static void OpGlow(struct GPUChannel *gpu)(no comment)GPUChannel.c:896static
static void OpFadeIn(struct GPUChannel *gpu)(no comment)GPUChannel.c:897static
static void OpFadeOut(struct GPUChannel *gpu)(no comment)GPUChannel.c:898static
static void OpHighlight(struct GPUChannel *gpu)(no comment)GPUChannel.c:899static
static void OpInterrupt(struct GPUChannel *gpu)(no comment)GPUChannel.c:901static
static void OpScaleUp(struct GPUChannel *gpu)(no comment)GPUChannel.c:906static
static void OpScaleDown(struct GPUChannel *gpu)(no comment)GPUChannel.c:923static
static void OpZoomIn(struct GPUChannel *gpu)(no comment)GPUChannel.c:941static
static void OpZoomOut(struct GPUChannel *gpu)(no comment)GPUChannel.c:942static
static void OpBezierPlot(struct GPUChannel *gpu)(no comment)GPUChannel.c:943static
static void OpBezierUpdate(struct GPUChannel *gpu)(no comment)GPUChannel.c:945static
static void OpUser(struct GPUChannel *gpu)(no comment)GPUChannel.c:954static
static int GpuSquareCopy(struct GPUChannel *gpu, uint32_t **out)(no comment)GPUChannel.c:964static
static void OpRotLeft(struct GPUChannel *gpu)(no comment)GPUChannel.c:977static
static void OpRotRight(struct GPUChannel *gpu)(no comment)GPUChannel.c:990static
static void OpRot180(struct GPUChannel *gpu)(no comment)GPUChannel.c:1003static
static void OpFlipH(struct GPUChannel *gpu)(no comment)GPUChannel.c:1015static
static void OpFlipV(struct GPUChannel *gpu)(no comment)GPUChannel.c:1030static
static void OpMirrorH(struct GPUChannel *gpu)(no comment)GPUChannel.c:1047static
static void OpMirrorV(struct GPUChannel *gpu)(no comment)GPUChannel.c:1059static
static void GpuOpsInit(void)(no comment)GPUChannel.c:1073static
static uint32_t GpuChecksum(const struct GPUChannel *gpu)(no comment)GPUChannel.c:1155static
static uint32_t GpuFgCount(const struct GPUChannel *gpu)(no comment)GPUChannel.c:1165static
struct GPUChannel * GPUChannelGet(void)(no comment)GPUChannel.c:1177public
static struct GPUChannel * OpenGPUChannelBody(struct NetXecChannel *nx)(no comment)GPUChannel.c:1184static
struct GPUChannel * OpenGPUChannel(struct NetXecChannel *nx)One lock for both Open entry points (recursive): a second Open returns the existing handle, never creates a second SDL_GPUDevice, and two threads cannot both initialise.GPUChannel.c:1326public
static void GPUFreeChannel(struct GPUChannel *gpu)Last reference gone (or Open failed half-way): free everything the channel owns.GPUChannel.c:1337static
static void GpuDestroy(struct GPUChannel *gpu)Close (findings 1, 2, 4): under the lifecycle lock, so Open and Close are serialised. 1. CLOSING + unregister: no new caller gets a reference.GPUChannel.c:1367static
static int GPUInstallStreamLocked(struct GPUChannel *gpu, const uint8_t *ops, uint32_t count, uint8_t width)(no comment)GPUChannel.c:1402static
static void GpuApplyGeom(struct GPUChannel *gpu, const struct GPUGeom *g)(no comment)GPUChannel.c:1450static
static int GpuDispatch(struct GPUChannel *gpu, const struct GPUGeom *geom)Unpack the installed stream and run it. geom NULL keeps the channel rect and pen. Otherwise geom[i] is theGPUChannel.c:1462static
int GPURunStream(struct GPUChannel *gpu)(no comment)GPUChannel.c:1511public
static int GPUChannelTest4Locked(struct GPUChannel *gpu)(no comment)GPUChannel.c:1522static
static int GpuRunWidth(struct GPUChannel *gpu, const uint8_t *ops, uint32_t count, uint8_t width)(no comment)GPUChannel.c:1574static
static int GPUChannelTestWidthsLocked(struct GPUChannel *gpu)(no comment)GPUChannel.c:1586static
static int GPUResizeFrameLocked(struct GPUChannel *gpu, uint32_t w, uint32_t h)(no comment)GPUChannel.c:1719static
static int GPURunDrawsLocked(struct GPUChannel *gpu, const uint8_t *ops, const struct GPUGeom *geom, uint32_t count)(no comment)GPUChannel.c:1749static
static int GPUChannelTestDrawLocked(struct GPUChannel *gpu)(no comment)GPUChannel.c:1760static
static int GPURenderLocked(struct GPUChannel *gpu, int on)(no comment)GPUChannel.c:1812static
static void GpuSeedLines(struct GPUChannelState *st, uint32_t w, uint32_t h)(no comment)GPUChannel.c:1818static
static int GPUMovingLinesLocked(struct GPUChannel *gpu, uint32_t w, uint32_t h)Returns 0 drawn, 1 not drawn (render off / too small), <0 error.GPUChannel.c:1846static
static int GPUDrawCommandSetLocked(struct GPUChannel *gpu, uint32_t surface, float x, float y)hv-c M0: the command-set panel is drawn on a ContainerChannel WINDOW surface (handle), not on an SDL_Renderer. surface 0 = the surface joined with GPUChannelJoin().GPUChannel.c:1910static
static int GPUOverlayLocked(struct GPUChannel *gpu, uint32_t surface, float x, float y, float w, float h)hv-c M0: blend the frame onto a ContainerChannel WINDOW surface (was: SDL_Renderer). Returns 1 drawn, 0 nothing to draw (not ready / render off), <0 the blit failed (finding 8).GPUChannel.c:1958static
int GPUInstallStream(struct GPUChannel *gpu, const uint8_t *ops, uint32_t count, uint8_t width)Locked public entry points. The *Locked functions above run with the channel lock held by these wrappers.GPUChannel.c:1992public
int GPUChannelTest4(struct GPUChannel *gpu)(no comment)GPUChannel.c:2004public
int GPUChannelTestWidths(struct GPUChannel *gpu)(no comment)GPUChannel.c:2015public
int GPUResizeFrame(struct GPUChannel *gpu, uint32_t w, uint32_t h)(no comment)GPUChannel.c:2026public
int GPURunDraws(struct GPUChannel *gpu, const uint8_t *ops, const struct GPUGeom *geom, uint32_t count)(no comment)GPUChannel.c:2037public
int GPUChannelTestDraw(struct GPUChannel *gpu)(no comment)GPUChannel.c:2049public
int GPURender(int on)Display-thread entry points (finding 1, 8): reference + live lock, int result. GPU_ERR_NOCHAN (-4) when no channel is open or it is closing.GPUChannel.c:2062public
int GPUMovingLines(uint32_t w, uint32_t h)(no comment)GPUChannel.c:2075public
int GPUDrawCommandSet(uint32_t surface, float x, float y)(no comment)GPUChannel.c:2088public
int GPUOverlay(uint32_t surface, float x, float y, float w, float h)1 drawn, 0 nothing to draw, <0 error (was 0 for both).GPUChannel.c:2102public
static int GpuMsgNeed(uint32_t in_len, uint32_t want)Message interface (the channel dispatch)GPUChannel.c:2121static
static int GpuMsgDo(struct GPUChannel *gpu, uint32_t op, const uint8_t *in, uint32_t in_len, uint8_t *out, uint32_t out_cap, uint32_t *out_len)(no comment)GPUChannel.c:2126static
int GPUChannelCommand(struct GPUChannel *gpu, uint32_t op, const void *in, uint32_t in_len, void *out, uint32_t out_cap, uint32_t *out_len)(no comment)GPUChannel.c:2258public
static struct GPUChannel * OpenGPUChannelForBody(struct Channel *owner)OwnershipGPUChannel.c:2282static
struct GPUChannel * OpenGPUChannelFor(struct Channel *owner)(no comment)GPUChannel.c:2304public
int CloseGPUChannelFor(struct Channel *owner, struct GPUChannel *gpu)Locked (finding 4): the owner test and the close happen under g_gpu_life_once.GPUChannel.c:2315public
int TransferGPUChannel(struct Channel *from, struct Channel *to)Hand ownership from one channel to another (Device sub 0 takes it over from the Container transition path). 0 ok, -1 from is not the owner / nothing open.GPUChannel.c:2337public
void CloseGPUChannel(struct GPUChannel *gpu)(no comment)GPUChannel.c:2350public
static uint32_t GwBe32(const uint8_t *p)hv-c M0 (2026-10-09): Channel entry points Join / Leave / Read / Write. Command stream on the wire: fixed 64-byte big-endian records (GPUW_*), opcodes bit-packedGPUChannel.c:2371static
static void GwPut32(uint8_t *p, uint32_t v)(no comment)GPUChannel.c:2376static
static void GwUnpack(const uint8_t *src, uint32_t count, uint32_t width, uint8_t *ops)MSB-first bit unpack of count fields of width bits from src.GPUChannel.c:2382static
void GPUWirePackOps(const uint8_t *ops, uint32_t count, uint32_t width, uint8_t *dst)(no comment)GPUChannel.c:2393public
uint64_t GPUChannelJoin(void *peer)(no comment)GPUChannel.c:2402public
void * GPUChannelLeave(void *peer)(no comment)GPUChannel.c:2426public
int GPUChannelSetSurface(struct GPUChannel *gpu, uint32_t surface)(no comment)GPUChannel.c:2450public
static int GwPresentNl(struct GPUChannel *gpu, const uint8_t *r)(no comment)GPUChannel.c:2460static
static int GwRecordNl(struct GPUChannel *gpu, const uint8_t *r)(no comment)GPUChannel.c:2477static
uint64_t GPUChannelWrite(void *chan, void *buf, long len)Two record shapes on the one runtime write slot, told apart by the first byte: GPUW_* 64-byte records (op 0..22), or ChannelData wire records ('C' of the CHDD magic,GPUChannel.c:2526public
uint64_t GPUChannelRead(void *chan, void *buf, long len)(no comment)GPUChannel.c:2553public
static void GpuRtOpen(struct Channel *ch)(no comment)GPUChannel.c:2593static
static void GpuRtClose(struct Channel *ch)(no comment)GPUChannel.c:2594static
static void GpuRtWire(struct Runtime *rt)(no comment)GPUChannel.c:2596static
static void ComputeDefaults(struct GPUComputeState *c)(no comment)GPUChannel.c:2664static
static uint32_t Be32(const uint8_t *p)(no comment)GPUChannel.c:2671static
static double Fx16(const uint8_t *p)(no comment)GPUChannel.c:2672static
static int ForceCpuEnv(void)(no comment)GPUChannel.c:2674static
static struct gw_stage * Stage(void)(no comment)GPUChannel.c:2680static
static int StageOnGpu(void)(no comment)GPUChannel.c:2690static
static uint32_t * FrameTwin(struct GPUChannel *gpu)the second frame block, sized like gpu->frame (re-made after a resize)GPUChannel.c:2697static
static void FrameSwap(struct GPUChannel *gpu)(no comment)GPUChannel.c:2713static
static int DrawStore(void)(no comment)GPUChannel.c:2720static
static int RunCompute(struct GPUChannel *gpu, uint32_t nops, const uint32_t *ops, const uint32_t *colors)one compute op on frame (w*h ARGB) through the chosen backendGPUChannel.c:2728static
static int BatchFromRecord(const uint8_t *r)(no comment)GPUChannel.c:2749static
static int RunDraw(struct GPUChannel *gpu, const uint8_t *r)(no comment)GPUChannel.c:2766static
static int HostUp(void)---------------- resident heap: host twin <-> GPU ----------------GPUChannel.c:2790static
static int RgpuUp(void)(no comment)GPUChannel.c:2800static
static int ResUp(uint32_t lo, uint32_t hi)(no comment)GPUChannel.c:2816static
static int ResDown(uint32_t lo, uint32_t hi)(no comment)GPUChannel.c:2824static
static void DirtyAdd(uint32_t lo, uint32_t hi)host changed words [lo, hi) of a block payloadGPUChannel.c:2833static
static void DirtyBlock(uint32_t handle)(no comment)GPUChannel.c:2853static
static int ResFlush(void)host -> GPU: everything the host changed since the GPU last saw itGPUChannel.c:2860static
static int ResGet(uint32_t lo, uint32_t hi)GPU -> host: words [lo, hi) onlyGPUChannel.c:2887static
static int ResSyncMeta(void)GPU -> host: the metadata, before the host allocates or freesGPUChannel.c:2895static
static int ResSyncFull(void)GPU -> host: the whole image (CPU bytecode run, GPUComputeHeap)GPUChannel.c:2905static
static void VarsForget(void)(no comment)GPUChannel.c:2914static
int GPUComputeHeapReset(void)(no comment)GPUChannel.c:2920public
uint32_t GPUComputeHeapAlloc(uint32_t count, uint32_t esz, uint32_t dtype_flags)(no comment)GPUChannel.c:2930public
static int BcRun(const uint8_t *r)(no comment)GPUChannel.c:2939static
static uint32_t VarEsz(uint32_t type)---------------- GPUVar: named typed arrays in the resident heap ----------------GPUChannel.c:2984static
static int VarOk(const struct GPUVar *v)(no comment)GPUChannel.c:2998static
struct GPUVar * GPUVarById(uint32_t id)(no comment)GPUChannel.c:3003public
static struct GPUVar * VarNewNl(uint32_t id, const char *name, uint32_t type, uint32_t count)(no comment)GPUChannel.c:3009static
static int VarSetNl(struct GPUVar *v, uint32_t first, const void *src, uint32_t n)(no comment)GPUChannel.c:3037static
static int VarGetNl(struct GPUVar *v, uint32_t first, void *dst, uint32_t n)(no comment)GPUChannel.c:3051static
static int VarFreeNl(struct GPUVar *v)(no comment)GPUChannel.c:3062static
static void SpvLocalSize(const uint32_t *w, uint32_t nw, uint32_t *x, uint32_t *y, uint32_t *z)SPIR-V OpExecutionMode %main LocalSize x y z (opcode 16, mode 17)GPUChannel.c:3075static
static int KernelOk(const struct GPUKernel *k)(no comment)GPUChannel.c:3088static
static void * KernelPipe(const uint32_t *spv, uint32_t bytes, struct GPUKernel *k, const char *what)the compute pipeline of a GPUKernel from SPIR-V: as it is on a SPIR-V device, else translated by ShaderChannel (SPIRV-Cross -> signed DXIL / DXBC). Bindings: set 1 binding 0 = heap (rw), set 2 binding 0 = params.GPUChannel.c:3095static
static struct GPUKernel * KernelLoadNl(uint32_t id, const char *path)(no comment)GPUChannel.c:3122static
static struct GPUKernel * KernelSourceNl(const char *glsl)GPUKernelSource: inline GLSL compute text. ShaderChannel compiles it to SPIR-V (the local size is read from it) and, on a device without SPIR-V (D3D12), to signed DXIL or DXBC.GPUChannel.c:3156static
static int KernelFreeNl(struct GPUKernel *k)(no comment)GPUChannel.c:3191static
static int RunKernelNl(struct GPUKernel *k, uint32_t groups, uint32_t nvars, struct GPUVar **vars)(no comment)GPUChannel.c:3199static
static struct GPUChannel * ApiGpu(struct GPUChannel *gpu)Returns the live channel with a reference and its lock held, or NULL (finding 1 for the compute API: no unlocked g_gpu read). ComputeLeave undoes both.GPUChannel.c:3241static
static void ComputeLeave(struct GPUChannel *gpu)(no comment)GPUChannel.c:3249static
struct GPUVar * GPUVarNew(struct GPUChannel *gpu, const char *name, uint32_t type, uint32_t count)(no comment)GPUChannel.c:3255public
int GPUVarSet(struct GPUVar *v, uint32_t first, const void *src, uint32_t n)(no comment)GPUChannel.c:3264public
int GPUVarGet(struct GPUVar *v, uint32_t first, void *dst, uint32_t n)(no comment)GPUChannel.c:3274public
int GPUVarFree(struct GPUVar *v)(no comment)GPUChannel.c:3284public
struct GPUKernel * GPUKernelLoad(struct GPUChannel *gpu, const char *spv_path)(no comment)GPUChannel.c:3294public
struct GPUKernel * GPUKernelSource(struct GPUChannel *gpu, const char *glsl)GPUKernelLoad from inline GLSL compute text (set 1 binding 0 = heap, set 2 binding 0 = params).GPUChannel.c:3304public
int GPUKernelSetCPU(struct GPUKernel *k, void (*fn)(uint32_t gid, uint32_t *heap, const uint32_t *params))(no comment)GPUChannel.c:3313public
int GPUKernelSetParam(struct GPUKernel *k, uint32_t index, uint32_t value)(no comment)GPUChannel.c:3320public
int GPUKernelFree(struct GPUKernel *k)(no comment)GPUChannel.c:3327public
int GPURunVars(struct GPUKernel *k, uint32_t groups, uint32_t nvars, struct GPUVar **vars)(no comment)GPUChannel.c:3337public
int GPURun(struct GPUKernel *k, uint32_t groups, ...)(no comment)GPUChannel.c:3347public
int GPUKernelBackend(const struct GPUKernel *k)(no comment)GPUChannel.c:3361public
static int RunKernel3dNl(struct GPUKernel *k, uint32_t gx, uint32_t gy, uint32_t gz, uint32_t nvars, struct GPUVar **vars)3-D dispatch: like RunKernelNl, with gx * gy * gz workgroups and the grid in the paramsGPUChannel.c:3368static
int GPURunVars3D(struct GPUKernel *k, uint32_t gx, uint32_t gy, uint32_t gz, uint32_t nvars, struct GPUVar **vars)(no comment)GPUChannel.c:3413public
int GPURun3D(struct GPUKernel *k, uint32_t gx, uint32_t gy, uint32_t gz, ...)(no comment)GPUChannel.c:3423public
int GPUComputeAvailable(void)(no comment)GPUChannel.c:3437public
void * GPUComputeHandle(void)(no comment)GPUChannel.c:3447public
static int SpvReflect(const uint32_t *w, uint32_t nw, uint32_t *model, char *entry, size_t ecap, uint32_t res[4])SPIR-V reflection for SDL_CreateGPUShader: execution model, entry point name and the resource counts. Arrays count as 1 binding each (SDL3 binds one resource per slot). 0 ok.GPUChannel.c:3454static
static void * ShaderStageNl(const char *path, uint32_t want_model, uint32_t *cnt)one Stage: read, check the execution model (0 vertex, 4 fragment), create the SDL_GPUShaderGPUChannel.c:3504static
static void * ShaderStageSourceNl(const char *glsl, uint32_t want_model, uint32_t *cnt)Same as ShaderStageNl from inline GLSL text: ShaderChannel compiles it to SPIR-V (read for the resource counts), and to DXIL as well when the device has no SPIR-V (D3D12).GPUChannel.c:3558static
static int ShaderOk(const struct GPUShader *s)(no comment)GPUChannel.c:3600static
static int ShaderFreeNl(struct GPUShader *s)(no comment)GPUChannel.c:3605static
static void ShadersRelease(void)(no comment)GPUChannel.c:3616static
static struct GPUShader * ShaderLoadNl(const char *vert, const char *frag, int source)(no comment)GPUChannel.c:3623static
struct GPUShader * GPUShaderLoad(struct GPUChannel *gpu, const char *vert_spv, const char *frag_spv)(no comment)GPUChannel.c:3647public
struct GPUShader * GPUShaderSource(struct GPUChannel *gpu, const char *vert_glsl, const char *frag_glsl)GPUShaderLoad from inline GLSL text (either may be NULL); free with GPUShaderFree.GPUChannel.c:3657public
int GPUShaderFree(struct GPUShader *s)(no comment)GPUChannel.c:3666public
static void PutBe(uint8_t *o, const uint8_t *src, uint32_t esz)---------------- records 9..22 (channel lock held) ----------------GPUChannel.c:3678static
static int VarSetRecord(const uint8_t *r)(no comment)GPUChannel.c:3684static
static int KernelRunRecord(const uint8_t *r)(no comment)GPUChannel.c:3694static
int GPUComputeRecordLocked(struct GPUChannel *gpu, const uint8_t *r)(no comment)GPUChannel.c:3703public
static uint32_t VarReadNl(uint8_t *o, long len)Read side of GPUW_VAR_GET: GPUR_VAR record then n big-endian elements. 0 = nothing pending.GPUChannel.c:3769static
void GPUComputeShutdown(int free_blocks)(no comment)GPUChannel.c:3796public
static int GPUComputeAttach(struct GPUChannel *gpu)Allocate this channel's compute state and make it current (OpenGPUChannel).GPUChannel.c:3832static
const char * GPUComputeBackendName(void)(no comment)GPUChannel.c:3842public
const char * GPUComputeGfxBackendName(void)(no comment)GPUChannel.c:3843public
const char * GPUComputeBcBackendName(void)(no comment)GPUChannel.c:3844public
const char * GPUComputeNote(void)(no comment)GPUChannel.c:3845public
uint32_t GPUComputeLastProgram(void)(no comment)GPUChannel.c:3846public
const uint32_t * GPUComputeHeap(uint32_t *words)(no comment)GPUChannel.c:3847public
void GPUComputeStats(uint64_t *up_words, uint64_t *down_words, uint32_t *dispatches)(no comment)GPUChannel.c:3857public
int GPUComputeReady(void)In-process counterpart of NXMAIN_OP_GPU_COMPUTE (MainChannel's non-NetXec branch): records 9..22 are built into GPUChannel, so there is nothing to attach; returns 1 = GPUChannelWrite accepts the compute records.GPUChannel.c:3866public
int GPUComputeDrawRef(const uint8_t *r, const uint32_t *frame, uint32_t w, uint32_t h, uint32_t *out, uint8_t *edge)(no comment)GPUChannel.c:3871public
void * GPUComputeHeapBuffer(void)SurfaceShaderFrame binds this as the vertex / fragment storage buffer, so GPUShader passes read GPUVars where GPUKernels left them. Nothing above was changed for this.GPUChannel.c:3882public
vec2 HeightfieldUV(vec2 xz)(no comment)GPUChannel.c:5162public
float VertexShadow(vec3 p, float ch)(no comment)GPUChannel.c:5163public
float T8RingB(float y)half-width (uv units) of the standard outline at height y (uv units)GPUChannel.c:5181public
float T8RingC(float y)(no comment)GPUChannel.c:5192public
float T8RingYOld(float t, float y)(no comment)GPUChannel.c:5198public
float T8RingY(float t, int k)(no comment)GPUChannel.c:5199public
float T8RingR(float t, int k)ring radius = max of the outline over both neighbouring intervals: every chord of the hull encloses itGPUChannel.c:5201public
void Hide()(no comment)GPUChannel.c:5215public
bool T8Mesh(vec3 b, float w)addition v8: a tree is drawn as a 3D mesh only when the camera is clearly outside its hull and in front of every hull point (|dot(F, b - cam)| > 0.6 w), else as the plain billboard; identical code in vegim.vert andGPUChannel.c:5219public
float T10Extent(vec3 o, vec3 D, vec3 L, vec3 Rv)(no comment)GPUChannel.c:5234public
void main()(no comment)GPUChannel.c:5240public
const char * GPUChannelTerrainDriver(void)(no comment)GPUChannel.c:5697public
const char * GPUChannelTerrainAdapter(void)(no comment)GPUChannel.c:5698public
static SDL_GPUShader * MakeTerrainShader(const char *glsl, const char *name, int frag, int nsamp)The terrain GLSL text above, compiled now for this device (ShaderChannel: SPIR-V on Vulkan, DXIL on D3D12) and made with AllocGPUShader (freed with FreeGPUShader). NULL + a note when the compiler is missing.GPUChannel.c:5702static
static SDL_GPUGraphicsPipeline * MakeVegPipeline(SDL_GPUShader *vs, SDL_GPUShader *fs, int inst)addition (look phase 2): vegetation pipeline. inst = 1: per-instance buffer (24-byte GPUChannelTerrainVeg); inst = 0: no vertex buffer (procedural ground cover from gl_InstanceIndex). Opaque, alpha-tested.GPUChannel.c:5722static
static SDL_GPUGraphicsPipeline * MakeTerrainPipeline(SDL_GPUShader *vs, SDL_GPUShader *fs, int water)(no comment)GPUChannel.c:5749static
static void VegInit(void)(no comment)GPUChannel.c:5809static
static void VegShutdown(void)(no comment)GPUChannel.c:5869static
static void VegKeep(const struct GPUChannelTerrainVeg *inst, uint32_t n)keep the trees of a VegUpload (copied into the preallocated array) and bucket them on a 128 x 128 gridGPUChannel.c:5879static
static uint32_t VegScan(const float *c, float rs, int pass, int K, struct GPUChannelTerrainVeg *dst)visit the trees within rs of c: pass 0 fills the distance histogram, pass 1 writes those in bins < K to dstGPUChannel.c:5910static
static void VegPrepare(SDL_GPUCommandBuffer *cmd, const struct GPUChannelTerrainLook *L)per frame, before the render pass: re-pick and send the near list only when the camera moved enoughGPUChannel.c:5931static
static void VegBillboards(SDL_GPUCommandBuffer *cmd, SDL_GPURenderPass *rp, const float *vv)(no comment)GPUChannel.c:5965static
static void KeepFrameFence(SDL_GPUFence *f)(no comment)GPUChannel.c:5985static
static void DrainFrameFences(void)(no comment)GPUChannel.c:5991static
static void TreeShadeInit(void)(no comment)GPUChannel.c:5997static
static void TreeShadeShutdown(void)(no comment)GPUChannel.c:6006static
static void TreeShadeBind(SDL_GPUCommandBuffer *cmd, SDL_GPURenderPass *rp, float *v8)in VegDraw after its bind: switch to the 3D-shaded pipeline (same vertex input, uniforms, index buffer)GPUChannel.c:6012static
void GPUChannelTerrainTrees3DShade(uint32_t mode)public: near-tree shading, 0 = the billboard's picture on the mesh (v8, default), 1 = 3D shadingGPUChannel.c:6020public
static void TreeMeshShutdown(void)(no comment)GPUChannel.c:6037static
static void TreeMeshInit(void)v11: the tree mesh uses treeg.vert (tuned crown + billboard trunk lean) in place of treef.vertGPUChannel.c:6046static
static int TreeMeshOn(void)(no comment)GPUChannel.c:6103static
static void TreeMeshBillboardBind(SDL_GPUCommandBuffer *cmd, SDL_GPURenderPass *rp, float *v8)in VegBillboards after its bind: the band-aware billboard pipeline (tm.w = band width)GPUChannel.c:6105static
static int TreeMeshDraw(SDL_GPUCommandBuffer *cmd, SDL_GPURenderPass *rp, const SDL_GPUTextureSamplerBinding *vs, float *v8)in VegDraw after its binds: draw the v10 mesh instead (returns 1 when it did; the terrain index buffer is back)GPUChannel.c:6113static
static void VegDraw(SDL_GPUCommandBuffer *cmd, SDL_GPURenderPass *rp, const SDL_GPUTextureSamplerBinding *vs, const float *vv)the mesh pass (after the billboards): one instanced indexed draw, then the terrain index buffer againGPUChannel.c:6129static
void GPUChannelTerrainTrees3D(float radius, uint32_t cap, uint32_t debug)public: radius in world units (0 = off: billboards at every distance, the v7 picture), cap instances (0 = GPUCT_T3D_DEFCAP, max GPUCT_T3D_MAX), debug 0 normal, 1 show the mesh hulls, 2 near trees hidden (no mesh)GPUChannel.c:6149public
void GPUChannelTerrainTrees3DStats(float *radiusUsed, uint32_t *meshes)public: last frame's state (switch radius actually used, mesh instances)GPUChannel.c:6156public
int GPUChannelTerrainInit(void *device, uint32_t w, uint32_t h, uint32_t maxVerts, uint32_t maxIdx)(no comment)GPUChannel.c:6162public
int GPUChannelTerrainTextures(const uint8_t *rgba)(no comment)GPUChannel.c:6290public
int GPUChannelTerrainUpload(const struct GPUChannelTerrainVtx *v, uint32_t nv, const uint32_t *idx, uint32_t ni, float extX, float extZ)(no comment)GPUChannel.c:6325public
int GPUChannelTerrainUploadRect(const struct GPUChannelTerrainVtx *v, uint32_t nv, const uint32_t *idx, uint32_t ni, float x0, float z0, float x1, float z1)addition (rect view): the water quad covers exactly x0..x1, z0..z1 (the terrain extent).GPUChannel.c:6332public
void GPUChannelTerrainCamera(float yawDeg, float pitchDeg, float dist, float tx, float tz, float aspect, float m[16])addition (rect view): orbit camera, column-major mvp, clip z 0..1, vertical fov 50 deg. yaw 0 = looking north (-z) with the cell edges parallel to the screen edges; yaw turns clockwiseGPUChannel.c:6374public
float GPUChannelTerrainFitDist(float pitchDeg, float aspect, float extX)addition (rect view): camera distance at which a strip extX wide (centred on the target, at ground level) exactly spans the bottom edge of the screen for this pitch and aspect.GPUChannel.c:6403public
void GPUChannelTerrainFinish(void)(no comment)GPUChannel.c:6412public
int GPUChannelTerrainDraw(const struct GPUChannelTerrainFrame *f, int wait)(no comment)GPUChannel.c:6419public
static uint16_t HalfFloat(float x)(no comment)GPUChannel.c:6433static
int GPUChannelTerrainHeightfield(const float *h2, uint32_t w, uint32_t h, float x0, float z0, float x1, float z1)addition (look): heightfield for soft sun shadows, padded to GPUCT_HF_MAX by edge replication.GPUChannel.c:6448public
int GPUChannelTerrainVegMap(const uint8_t *rgba, uint32_t w, uint32_t h)addition (look phase 2): vegetation map, same texel grid and extent as the last GPUChannelTerrainHeightfield (r grass, g dryness, b bush/flower, a tree density), padded by edge replication. Once per region.GPUChannel.c:6483public
int GPUChannelTerrainVegUpload(const struct GPUChannelTerrainVeg *inst, uint32_t n)addition (look phase 2): instanced vegetation (trees, torches, ...), copied once into the preallocated instance buffer (GPUCT_VEG_MAX). n = 0 clears it.GPUChannel.c:6509public
void GPUChannelTerrainCameraEye(float ex, float ey, float ez, float yawDeg, float pitchDeg, float aspect, float m[16], struct GPUChannelTerrainLook *look)addition (look phase 2): first-person camera at (ex, ey, ez) looking along yaw (0 = north, clockwise) and pitch (degrees down). Near plane 0.0002, far 8 (eye-level walk views). Fills the look like CameraLook.GPUChannel.c:6536public
void GPUChannelTerrainCameraLook(float yawDeg, float pitchDeg, float dist, float tx, float tz, float aspect, float mvp[16], struct GPUChannelTerrainLook *look)addition (look): camera + look vectors. invVP by Gauss-Jordan on the mvp (init-free, no allocation).GPUChannel.c:6579public
static float MixFloat(float a, float b, float t)addition (look phase 3): time of day. hours 0..24 (caller's clock or a fixed value; nothing is read here), cloud 0..1. Fills sun direction/colour, ambient, clear colour and the look's fog/sky/stars/torch gain; theGPUChannel.c:6608static
static float SmoothStep(float a, float b, float x)(no comment)GPUChannel.c:6609static
void GPUChannelTerrainTimeOfDay(float hours, float cloud, struct GPUChannelTerrainFrame *f, struct GPUChannelTerrainLook *look)(no comment)GPUChannel.c:6610public
int GPUChannelTerrainDrawLook(const struct GPUChannelTerrainFrame *f, const struct GPUChannelTerrainLook *look, int wait)(no comment)GPUChannel.c:6653public
int GPUChannelTerrainReadPixels(uint8_t *rgba)(no comment)GPUChannel.c:6748public
void GPUChannelTerrainShutdown(void)(no comment)GPUChannel.c:6773public
int OpenContainerGPUChannel(struct ContainerChannel *cc)GPUChannel sub. The container is the only owner: it opens the GPUChannel when it is created and closes it when it is closed. A missing GPU is notGPUChannel.c:6819public
void CloseContainerGPUChannel(struct ContainerChannel *cc)(no comment)GPUChannel.c:6836public
struct GPUChannel * GetContainerGPUChannel(struct ContainerChannel *cc)(no comment)GPUChannel.c:6846public
void SyncNetxecGPUChannel(struct ContainerChannel *cc)NetXec sets cc->base.ch_netxec after OpenContainerChannel returns, so the GPUChannel learns it here. Called from ContainerTick (the NetXec thread) only,GPUChannel.c:6858public
int CommandContainerGPUChannel(struct ContainerChannel *cc, uint32_t op, const void *in, uint32_t in_len, void *out, uint32_t out_cap, uint32_t *out_len)(no comment)GPUChannel.c:6865public
static void Put16(uint8_t *p, uint32_t v)(no comment)GPUChannelDraw.c:33static
static void Put32(uint8_t *p, uint32_t v)(no comment)GPUChannelDraw.c:34static
static uint32_t Get16(const uint8_t *p)(no comment)GPUChannelDraw.c:35static
static uint32_t Get32(const uint8_t *p)(no comment)GPUChannelDraw.c:36static
void GPUQuadPack(uint8_t *r, uint32_t tex, uint32_t flags, int32_t x, int32_t y, uint32_t w, uint32_t h, uint32_t u0, uint32_t v0, uint32_t u1, uint32_t v1, uint32_t argb, int32_t angle_c)(no comment)GPUChannelDraw.c:38public
void GPUQuadUnpack(const uint8_t *r, uint32_t *tex, uint32_t *flags, int32_t *x, int32_t *y, uint32_t *w, uint32_t *h, uint32_t *u0, uint32_t *v0, uint32_t *u1, uint32_t *v1, uint32_t *argb, int32_t *angle_c)(no comment)GPUChannelDraw.c:48public
int GPUDrawReady(void)(no comment)GPUChannelDraw.c:57public
const char * GPUDrawDriver(void)(no comment)GPUChannelDraw.c:58public
static SDL_GPUShader * MkShader(int frag)(no comment)GPUChannelDraw.c:60static
static int Upload(SDL_GPUTexture *t, const uint32_t *argb, uint32_t w, uint32_t h)(no comment)GPUChannelDraw.c:71static
static SDL_GPUTexture * MkTex(uint32_t w, uint32_t h, SDL_GPUTextureUsageFlags usage)(no comment)GPUChannelDraw.c:100static
int GPUDrawTexSet(uint32_t id, const uint32_t *argb, uint32_t w, uint32_t h)(no comment)GPUChannelDraw.c:109public
void GPUDrawTexFree(uint32_t id)(no comment)GPUChannelDraw.c:121public
int GPUDrawOpen(void *sdl_window)(no comment)GPUChannelDraw.c:127public
static int SaveBmp(const void *px, uint32_t w, uint32_t h, const char *path)(no comment)GPUChannelDraw.c:220static
int GPUDrawFlush(const uint8_t *recs, uint32_t n, uint32_t w, uint32_t h, int clear, uint32_t clear_argb)Flush: draw n queued records into the GPU target texture (w x h) in one render pass. clear != 0 (first pass after a Clear, or the target was (re)created): load_op CLEAR with clear_argb; otherwise LOAD, so these quads append to whatGPUChannelDraw.c:231public
int GPUDrawReadPixels(int32_t x, int32_t y, uint32_t rw, uint32_t rh, uint32_t *out)Synchronous download of a region of the target texture into out (ARGB8888, rw*rh words).GPUChannelDraw.c:325public
int GPUDrawPresent(const char *shot_bmp)Present: blit the target texture to the window swapchain. shot_bmp: download the target texture first and save it.GPUChannelDraw.c:361public
int GPUDrawFrame(const uint8_t *recs, uint32_t n, uint32_t w, uint32_t h, uint32_t clear_argb, const char *shot_bmp)One-shot frame (kept for callers of the first version): flush with clear, then present.GPUChannelDraw.c:394public
void GPUDrawClose(void)(no comment)GPUChannelDraw.c:401public
int DrawGPULines(const struct ThreadGPUSeg *segs, int count, uint32_t w, uint32_t h, uint32_t *pixels)(no comment)GPUPlatform.c:11public
void GPUBackendRelease(void)(no comment)GPUPlatform.c:18public
uint32_t GPUBackendPasses(void)(no comment)GPUPlatform.c:19public
static int BuildShaderCode(SDL_GPUDevice *dev, const char *glsl, uint64_t n, uint8_t **built, SDL_GPUComputePipelineCreateInfo *ci)GPU_SHADER_GLSL: code = n bytes of compute GLSL (no NUL needed). ShaderChannel compiles it to SPIR-V or DXIL for dev (cached by source hash); *built = AllocMem copy of the bytecode for the pipeline create.GPUChannelLayers.c:568static
static void ShaderLock(void)(no comment)ShaderChannel.c:107static
static void ShaderUnlock(void)(no comment)ShaderChannel.c:114static
static int ShaderFail(int code, const char *fmt, const char *a, const char *b)(no comment)ShaderChannel.c:116static
static int ShaderSym(SDL_SharedObject *h, const char *sym, void *fn_out)(no comment)ShaderChannel.c:123static
int ShaderNormalizeDir(const char *in, int windows, char *out, int cap)---- search directories -------------------------------------------------------------------------------ShaderChannel.c:131public
static char ShaderSep(const char *dir)(no comment)ShaderChannel.c:157static
static int ShaderAddDir(char (*dirs)[SHADER_PATH_BYTES], int n, int max, int windows, const char *a, const char *b)(no comment)ShaderChannel.c:159static
static SDL_EnumerationResult SDLCALL ShaderListName(void *ud, const char *dir, const char *name)(no comment)ShaderChannel.c:183static
static int ShaderListDir(const char *dir, char (*names)[SHADER_ENTRY_BYTES], int max)(no comment)ShaderChannel.c:191static
static int ShaderIsVersion(const char *name)(no comment)ShaderChannel.c:198static
static int ShaderVersionCompare(const char *a, const char *b)(no comment)ShaderChannel.c:206static
int ShaderSearchDirs(const struct ShaderEnv *env, int dxil, const char *first_dir, char (*dirs)[SHADER_PATH_BYTES], int max)(no comment)ShaderChannel.c:218public
static void ShaderKitsRoots(char (*kits)[SHADER_PATH_BYTES], const char **out)The Windows Kits\10 roots of the process: %ProgramFiles(x86)%, C:\Program Files (x86), %ProgramW6432%.ShaderChannel.c:265static
static void ShaderCurrentEnv(struct ShaderEnv *e)(no comment)ShaderChannel.c:280static
void ShaderSetEnv(const struct ShaderEnv *env)(no comment)ShaderChannel.c:304public
static SDL_SharedObject * ShaderOpenLib(const char *const *names, int dxil, const char *first_dir, char *dir_out, size_t dir_cap)Try names[] in each search directory, then (system_search) the bare names. dir_out gets the directory.ShaderChannel.c:323static
static int ShaderApiHasSpirv(const struct ShaderApi *a)(no comment)ShaderChannel.c:360static
static int ShaderApiHasSpvc(const struct ShaderApi *a)(no comment)ShaderChannel.c:365static
static int ShaderKeep(char *why, int code)A load step failed: keep why (the same note comes back on every later call, no new search)ShaderChannel.c:372static
static int ShaderAgain(const char *why)(no comment)ShaderChannel.c:377static
static int ShaderNoSigner(void)(no comment)ShaderChannel.c:384static
static int ShaderLoadSpirv(void)(no comment)ShaderChannel.c:390static
static int ShaderLoadSpvc(void)SPIRV-Cross (needed by DXIL and DXBC alike)ShaderChannel.c:428static
static int ShaderLoadDxil(void)(no comment)ShaderChannel.c:462static
static int ShaderLoadDxbc(void)d3dcompiler_47.dll ships with Windows (System32), so the system search finds it.ShaderChannel.c:496static
static int ShaderLoad(uint32_t format)(no comment)ShaderChannel.c:519static
static uint32_t ShaderPickLocked(uint32_t formats, const char *name)The format to produce for a device taking formats: SPIR-V, else signed DXIL, else DXBC. 0 = none loads; the note then lists each reason once ("DXIL: ...; DXBC: ..."). Lock held.ShaderChannel.c:529static
static void ShaderUnloadLocked(void)(no comment)ShaderChannel.c:560static
static int ShaderGlslToSpirv(const char *src, size_t len, uint32_t stage, const char *name, uint8_t **spv, size_t *n)GLSL -> SPIR-V. *spv is a ShaderAlloc block of *n bytes (caller frees).ShaderChannel.c:575static
static int ShaderSpirvToHlsl(const uint8_t *spv, size_t n, uint32_t stage, unsigned sm, const char *name, char **hlsl)SPIR-V -> HLSL (shader model sm: 60 for DXC, 51 for D3DCompile). The GLSL set is the register space. *hlsl is a ShaderAlloc string (caller frees).ShaderChannel.c:610static
static void * ShaderComFn(void *obj, int index)(no comment)ShaderChannel.c:637static
static void ShaderComRelease(void *obj)(no comment)ShaderChannel.c:642static
static void * ShaderBlobPtr(void *blob)(no comment)ShaderChannel.c:649static
static size_t ShaderBlobSize(void *blob)(no comment)ShaderChannel.c:654static
static int ShaderHlslToDxil(const char *hlsl, uint32_t stage, const char *name, uint8_t **dxil, size_t *n)HLSL -> DXIL (dxc -T ?s_6_0 -E main -O3). *dxil is a ShaderAlloc block (caller frees).ShaderChannel.c:661static
static int ShaderHlslToDxbc(const char *hlsl, uint32_t stage, const char *name, uint8_t **dxbc, size_t *n)HLSL -> DXBC (D3DCompile, ?s_5_1, entry main, optimization level 3). *dxbc is a ShaderAlloc block.ShaderChannel.c:709static
static int ShaderFromSpirvLocked(uint8_t *spv, size_t nspv, uint32_t stage, uint32_t fmt, const char *name, uint8_t **code, size_t *code_n)SPIR-V -> fmt. SPIR-V: *code = spv (not copied); DXIL / DXBC: a new ShaderAlloc block. Lock held.ShaderChannel.c:739static
uint64_t ShaderHash(const char *source, uint32_t stage, uint32_t format)---- cache --------------------------------------------------------------------------------------------ShaderChannel.c:755public
static int ShaderGetLocked(uint32_t formats, const char *source, uint32_t stage, const char *name, struct ShaderEntry **out)Find or build the entry for (source, stage, format). Lock held.ShaderChannel.c:766static
int ShaderCode(uint32_t formats, const char *source, uint32_t stage, const char *name, void *out, uint32_t cap, uint32_t *bytes, uint32_t *format)(no comment)ShaderChannel.c:821public
struct SDL_GPUShader * CompileShader(struct SDL_GPUDevice *dev, const char *source, const struct ShaderInfo *si)(no comment)ShaderChannel.c:840public
struct SDL_GPUComputePipeline * CompileComputePipeline(struct SDL_GPUDevice *dev, const char *source, const struct ShaderInfo *si)(no comment)ShaderChannel.c:874public
int ShaderCodeFromSpirv(uint32_t formats, const void *spirv, uint32_t spirv_bytes, uint32_t stage, const char *name, void *out, uint32_t cap, uint32_t *bytes, uint32_t *format)(no comment)ShaderChannel.c:912public
struct SDL_GPUDevice * OpenShaderSubChannel(uint32_t formats, int debug, const char *driver, const char *tag)(no comment)ShaderChannel.c:954public
const char * ShaderReadyText(struct SDL_GPUDevice *dev)(no comment)ShaderChannel.c:985public
uint32_t ShaderPickFormat(uint32_t formats)(no comment)ShaderChannel.c:996public
int ShaderCompilerReady(uint32_t formats)(no comment)ShaderChannel.c:1005public
void ShaderUseApi(const struct ShaderApi *api)(no comment)ShaderChannel.c:1007public
void ShaderCompilerReload(void)(no comment)ShaderChannel.c:1017public
const char * ShaderNote(void)(no comment)ShaderChannel.c:1024public
int ShaderLastError(void)(no comment)ShaderChannel.c:1025public
void ShaderCacheStats(uint32_t *entries, uint64_t *hits, uint64_t *misses, uint64_t *bytes)(no comment)ShaderChannel.c:1027public
static void ShaderFlushLocked(void)(no comment)ShaderChannel.c:1039static
void ShaderCacheFlush(void)(no comment)ShaderChannel.c:1047public
static int ShaderSlot(void *peer)(no comment)ShaderChannel.c:1061static
static int ShaderRecord(uint32_t slot, unsigned char *out)(no comment)ShaderChannel.c:1068static
uint64_t JoinShaderChannel(void *peer)(no comment)ShaderChannel.c:1092public
void * LeaveShaderChannel(void *peer)(no comment)ShaderChannel.c:1109public
uint64_t ReadShaderChannel(void *chan, void *buf, long len)(no comment)ShaderChannel.c:1120public
uint64_t WriteShaderChannel(void *chan, void *buf, long len)(no comment)ShaderChannel.c:1143public
static void ShaderRtOpen(struct Channel *ch)(no comment)ShaderChannel.c:1166static
static void ShaderRtClose(struct Channel *ch)(no comment)ShaderChannel.c:1174static
struct Runtime * GetShaderRuntime(void)(no comment)ShaderChannel.c:1185public
void OpenShaderChannel(void)(no comment)ShaderChannel.c:1187public
void CloseShaderChannel(void)(no comment)ShaderChannel.c:1197public

Core-level functions of core 1 · Core 1 in the full manual

The > Web 4 < Channel Paradigm · full manual · privacy · contact

Hits--