Channel circle › core 1 Device › gpu
gpu (core 1, sub 0, flat id 16)
428 functions
| Signature | Purpose | Source | Scope |
|---|---|---|---|
| int AttachGPUChannel(struct NetXecChannel *nx, uint32_t w, uint32_t h, uint32_t dev_flags) | (no comment) | DeviceGpu.c:12 | public |
| void DetachGPUChannel(struct NetXecChannel *nx) | (no comment) | DeviceGpu.c:33 | public |
| int IsAttachedGPUChannel(const struct NetXecChannel *nx) | (no comment) | DeviceGpu.c:45 | public |
| uint32_t GPUBackendPasses(void) | (no comment) | GPUBackendSDL3.c:33 | public |
| void GPUBackendRelease(void) | (no comment) | GPUBackendSDL3.c:35 | public |
| static uint32_t GbShader(SDL_GPUDevice *d, int frag) | (no comment) | GPUBackendSDL3.c:45 | static |
| static int GbSetup(SDL_GPUDevice *d, uint32_t w, uint32_t h) | (no comment) | GPUBackendSDL3.c:73 | static |
| int DrawGPULines(const struct ThreadGPUSeg *segs, int count, uint32_t w, uint32_t h, uint32_t *pixels) | (no comment) | GPUBackendSDL3.c:142 | public |
| int GPUCreateCount(void) | (no comment) | GPUChannel.c:45 | public |
| static void GpuMemAttach(void) | (no comment) | GPUChannel.c:47 | static |
| static void GpuMemDetach(void) | (no comment) | GPUChannel.c:71 | static |
| void * GPUChannelHandle(void) | hv-c M0: for GPUBackendSDL3.c | GPUChannel.c:85 | public |
| 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:97 | static |
| static void GPUPublish(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:99 | static |
| struct GPUChannel * GPUAcquire(void) | (no comment) | GPUChannel.c:106 | public |
| void GPUReleaseRef(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:117 | public |
| static struct GPUChannel * GPUAcquireThis(struct GPUChannel *want) | Acquire and check that a caller's pointer is the live channel. | GPUChannel.c:129 | static |
| static void GPULock(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:136 | static |
| void GPUUnlock(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:142 | public |
| int GPULockLive(struct GPUChannel *gpu) | Lock a referenced channel; fails (and leaves it unlocked) once Close has started. | GPUChannel.c:149 | public |
| 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:161 | static |
| static uint32_t GPUSat32(uint64_t v) | (no comment) | GPUChannel.c:162 | static |
| 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:166 | public |
| static void GpuPixel(struct GPUChannel *gpu, int x, int y, uint32_t color) | (no comment) | GPUChannel.c:176 | static |
| static void GpuLine(struct GPUChannel *gpu, int x0, int y0, int x1, int y1, uint32_t color) | (no comment) | GPUChannel.c:184 | static |
| static void GpuPixelCover(struct GPUChannel *gpu, int x, int y, uint32_t color, int cover) | (no comment) | GPUChannel.c:205 | static |
| 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:222 | static |
| static uint32_t GpuRng(struct GPUChannelState *st) | (no comment) | GPUChannel.c:261 | static |
| static int32_t GpuSpeed(struct GPUChannelState *st) | (no comment) | GPUChannel.c:267 | static |
| static void GpuBounce(int32_t *p, int32_t *v, int32_t limit) | (no comment) | GPUChannel.c:274 | static |
| static void GpuFill(struct GPUChannel *gpu, uint32_t color) | (no comment) | GPUChannel.c:289 | static |
| static void OpNop(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:297 | static |
| static void OpCopy(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:299 | static |
| static void OpFill(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:313 | static |
| static void OpBlit(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:315 | static |
| static void OpClear(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:321 | static |
| static void OpSetapen(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:323 | static |
| static void OpSetbpen(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:328 | static |
| static void OpLine(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:333 | static |
| static void OpRect(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:338 | static |
| static void OpEllipse(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:346 | static |
| static void OpImage(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:371 | static |
| static void OpPolygon(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:382 | static |
| static void OpSpline(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:390 | static |
| 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:410 | static |
| static void OpFree(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:434 | static |
| static void OpCustom0(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:441 | static |
| static uint32_t PixClamp(int v) | (no comment) | GPUChannel.c:446 | static |
| static uint32_t PixCh(uint32_t p, int shift) | (no comment) | GPUChannel.c:453 | static |
| static uint32_t PixArgb(uint32_t a, uint32_t r, uint32_t g, uint32_t b) | (no comment) | GPUChannel.c:458 | static |
| static void GpuMap(struct GPUChannel *gpu, uint32_t (*fn)(uint32_t, uint32_t)) | (no comment) | GPUChannel.c:463 | static |
| static uint32_t PixAlphaBlit(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:473 | static |
| static uint32_t PixBlend(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:482 | static |
| static uint32_t PixKey(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:490 | static |
| static uint32_t PixCorrect(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:496 | static |
| static uint32_t PixBright(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:503 | static |
| static uint32_t PixContrast(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:512 | static |
| static uint32_t PixSat(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:522 | static |
| static uint32_t PixHue(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:533 | static |
| static uint32_t PixFilter(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:539 | static |
| static uint32_t PixInvert(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:545 | static |
| static uint32_t PixGray(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:552 | static |
| static uint32_t PixMask(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:560 | static |
| static uint32_t PixMul(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:565 | static |
| static uint32_t PixScreen(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:573 | static |
| static uint32_t PixAdd(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:581 | static |
| static uint32_t PixSub(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:589 | static |
| static uint32_t PixDiff(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:597 | static |
| static uint32_t PixMax(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:608 | static |
| static uint32_t PixMin(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:618 | static |
| static uint32_t PixHalf(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:628 | static |
| static uint32_t PixOpaque(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:635 | static |
| static uint32_t PixTrans(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:641 | static |
| static uint32_t PixGlow(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:647 | static |
| static uint32_t PixFadeIn(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:657 | static |
| static uint32_t PixFadeOut(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:667 | static |
| static uint32_t PixHi(uint32_t p, uint32_t fg) | (no comment) | GPUChannel.c:677 | static |
| static void OpAlphaBlit(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:685 | static |
| static void OpAlphablend(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:686 | static |
| static void OpAlphaFill(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:687 | static |
| static void OpColorkey(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:692 | static |
| static void OpCorrect(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:693 | static |
| static void OpBright(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:694 | static |
| static void OpContrast(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:695 | static |
| static void OpSat(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:696 | static |
| static void OpHue(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:697 | static |
| static void OpFilter(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:698 | static |
| static void OpInvert(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:699 | static |
| static void OpGray(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:700 | static |
| static void OpMask(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:701 | static |
| static void OpTileCopy(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:703 | static |
| static void OpTileFill(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:725 | static |
| static void OpEdge(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:737 | static |
| static void OpBlurX(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:749 | static |
| static void OpMotion(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:766 | static |
| static void OpSoften(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:767 | static |
| static void OpBlur(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:768 | static |
| static void OpWarp(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:770 | static |
| static void OpNoise(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:783 | static |
| static void OpScratch(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:792 | static |
| static void OpShadow(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:800 | static |
| static void OpOutline(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:813 | static |
| static void OpContour(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:826 | static |
| static void OpSharpen(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:828 | static |
| static void OpEmboss(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:843 | static |
| static void OpPixelate(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:857 | static |
| static void OpDither(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:871 | static |
| static void OpMul(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:886 | static |
| static void OpScreen(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:887 | static |
| static void OpAdd(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:888 | static |
| static void OpSubpix(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:889 | static |
| static void OpDiff(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:890 | static |
| static void OpLighten(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:891 | static |
| static void OpDarken(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:892 | static |
| static void OpShadowize(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:893 | static |
| static void OpOpaque(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:894 | static |
| static void OpTrans(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:895 | static |
| static void OpGlow(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:896 | static |
| static void OpFadeIn(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:897 | static |
| static void OpFadeOut(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:898 | static |
| static void OpHighlight(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:899 | static |
| static void OpInterrupt(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:901 | static |
| static void OpScaleUp(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:906 | static |
| static void OpScaleDown(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:923 | static |
| static void OpZoomIn(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:941 | static |
| static void OpZoomOut(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:942 | static |
| static void OpBezierPlot(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:943 | static |
| static void OpBezierUpdate(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:945 | static |
| static void OpUser(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:954 | static |
| static int GpuSquareCopy(struct GPUChannel *gpu, uint32_t **out) | (no comment) | GPUChannel.c:964 | static |
| static void OpRotLeft(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:977 | static |
| static void OpRotRight(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:990 | static |
| static void OpRot180(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1003 | static |
| static void OpFlipH(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1015 | static |
| static void OpFlipV(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1030 | static |
| static void OpMirrorH(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1047 | static |
| static void OpMirrorV(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1059 | static |
| static void GpuOpsInit(void) | (no comment) | GPUChannel.c:1073 | static |
| static uint32_t GpuChecksum(const struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1155 | static |
| static uint32_t GpuFgCount(const struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1165 | static |
| struct GPUChannel * GPUChannelGet(void) | (no comment) | GPUChannel.c:1177 | public |
| static struct GPUChannel * OpenGPUChannelBody(struct NetXecChannel *nx) | (no comment) | GPUChannel.c:1184 | static |
| 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:1326 | public |
| static void GPUFreeChannel(struct GPUChannel *gpu) | Last reference gone (or Open failed half-way): free everything the channel owns. | GPUChannel.c:1337 | static |
| 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:1367 | static |
| static int GPUInstallStreamLocked(struct GPUChannel *gpu, const uint8_t *ops, uint32_t count, uint8_t width) | (no comment) | GPUChannel.c:1402 | static |
| static void GpuApplyGeom(struct GPUChannel *gpu, const struct GPUGeom *g) | (no comment) | GPUChannel.c:1450 | static |
| 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 the | GPUChannel.c:1462 | static |
| int GPURunStream(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1511 | public |
| static int GPUChannelTest4Locked(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1522 | static |
| static int GpuRunWidth(struct GPUChannel *gpu, const uint8_t *ops, uint32_t count, uint8_t width) | (no comment) | GPUChannel.c:1574 | static |
| static int GPUChannelTestWidthsLocked(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1586 | static |
| static int GPUResizeFrameLocked(struct GPUChannel *gpu, uint32_t w, uint32_t h) | (no comment) | GPUChannel.c:1719 | static |
| static int GPURunDrawsLocked(struct GPUChannel *gpu, const uint8_t *ops, const struct GPUGeom *geom, uint32_t count) | (no comment) | GPUChannel.c:1749 | static |
| static int GPUChannelTestDrawLocked(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:1760 | static |
| static int GPURenderLocked(struct GPUChannel *gpu, int on) | (no comment) | GPUChannel.c:1812 | static |
| static void GpuSeedLines(struct GPUChannelState *st, uint32_t w, uint32_t h) | (no comment) | GPUChannel.c:1818 | static |
| 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:1846 | static |
| 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:1910 | static |
| 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:1958 | static |
| 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:1992 | public |
| int GPUChannelTest4(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:2004 | public |
| int GPUChannelTestWidths(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:2015 | public |
| int GPUResizeFrame(struct GPUChannel *gpu, uint32_t w, uint32_t h) | (no comment) | GPUChannel.c:2026 | public |
| int GPURunDraws(struct GPUChannel *gpu, const uint8_t *ops, const struct GPUGeom *geom, uint32_t count) | (no comment) | GPUChannel.c:2037 | public |
| int GPUChannelTestDraw(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:2049 | public |
| 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:2062 | public |
| int GPUMovingLines(uint32_t w, uint32_t h) | (no comment) | GPUChannel.c:2075 | public |
| int GPUDrawCommandSet(uint32_t surface, float x, float y) | (no comment) | GPUChannel.c:2088 | public |
| 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:2102 | public |
| static int GpuMsgNeed(uint32_t in_len, uint32_t want) | Message interface (the channel dispatch) | GPUChannel.c:2121 | static |
| 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:2126 | static |
| 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:2258 | public |
| static struct GPUChannel * OpenGPUChannelForBody(struct Channel *owner) | Ownership | GPUChannel.c:2282 | static |
| struct GPUChannel * OpenGPUChannelFor(struct Channel *owner) | (no comment) | GPUChannel.c:2304 | public |
| 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:2315 | public |
| 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:2337 | public |
| void CloseGPUChannel(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:2350 | public |
| 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-packed | GPUChannel.c:2371 | static |
| static void GwPut32(uint8_t *p, uint32_t v) | (no comment) | GPUChannel.c:2376 | static |
| 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:2382 | static |
| void GPUWirePackOps(const uint8_t *ops, uint32_t count, uint32_t width, uint8_t *dst) | (no comment) | GPUChannel.c:2393 | public |
| uint64_t GPUChannelJoin(void *peer) | (no comment) | GPUChannel.c:2402 | public |
| void * GPUChannelLeave(void *peer) | (no comment) | GPUChannel.c:2426 | public |
| int GPUChannelSetSurface(struct GPUChannel *gpu, uint32_t surface) | (no comment) | GPUChannel.c:2450 | public |
| static int GwPresentNl(struct GPUChannel *gpu, const uint8_t *r) | (no comment) | GPUChannel.c:2460 | static |
| static int GwRecordNl(struct GPUChannel *gpu, const uint8_t *r) | (no comment) | GPUChannel.c:2477 | static |
| 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:2526 | public |
| uint64_t GPUChannelRead(void *chan, void *buf, long len) | (no comment) | GPUChannel.c:2553 | public |
| static void GpuRtOpen(struct Channel *ch) | (no comment) | GPUChannel.c:2593 | static |
| static void GpuRtClose(struct Channel *ch) | (no comment) | GPUChannel.c:2594 | static |
| static void GpuRtWire(struct Runtime *rt) | (no comment) | GPUChannel.c:2596 | static |
| static void ComputeDefaults(struct GPUComputeState *c) | (no comment) | GPUChannel.c:2664 | static |
| static uint32_t Be32(const uint8_t *p) | (no comment) | GPUChannel.c:2671 | static |
| static double Fx16(const uint8_t *p) | (no comment) | GPUChannel.c:2672 | static |
| static int ForceCpuEnv(void) | (no comment) | GPUChannel.c:2674 | static |
| static struct gw_stage * Stage(void) | (no comment) | GPUChannel.c:2680 | static |
| static int StageOnGpu(void) | (no comment) | GPUChannel.c:2690 | static |
| static uint32_t * FrameTwin(struct GPUChannel *gpu) | the second frame block, sized like gpu->frame (re-made after a resize) | GPUChannel.c:2697 | static |
| static void FrameSwap(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:2713 | static |
| static int DrawStore(void) | (no comment) | GPUChannel.c:2720 | static |
| 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 backend | GPUChannel.c:2728 | static |
| static int BatchFromRecord(const uint8_t *r) | (no comment) | GPUChannel.c:2749 | static |
| static int RunDraw(struct GPUChannel *gpu, const uint8_t *r) | (no comment) | GPUChannel.c:2766 | static |
| static int HostUp(void) | ---------------- resident heap: host twin <-> GPU ---------------- | GPUChannel.c:2790 | static |
| static int RgpuUp(void) | (no comment) | GPUChannel.c:2800 | static |
| static int ResUp(uint32_t lo, uint32_t hi) | (no comment) | GPUChannel.c:2816 | static |
| static int ResDown(uint32_t lo, uint32_t hi) | (no comment) | GPUChannel.c:2824 | static |
| static void DirtyAdd(uint32_t lo, uint32_t hi) | host changed words [lo, hi) of a block payload | GPUChannel.c:2833 | static |
| static void DirtyBlock(uint32_t handle) | (no comment) | GPUChannel.c:2853 | static |
| static int ResFlush(void) | host -> GPU: everything the host changed since the GPU last saw it | GPUChannel.c:2860 | static |
| static int ResGet(uint32_t lo, uint32_t hi) | GPU -> host: words [lo, hi) only | GPUChannel.c:2887 | static |
| static int ResSyncMeta(void) | GPU -> host: the metadata, before the host allocates or frees | GPUChannel.c:2895 | static |
| static int ResSyncFull(void) | GPU -> host: the whole image (CPU bytecode run, GPUComputeHeap) | GPUChannel.c:2905 | static |
| static void VarsForget(void) | (no comment) | GPUChannel.c:2914 | static |
| int GPUComputeHeapReset(void) | (no comment) | GPUChannel.c:2920 | public |
| uint32_t GPUComputeHeapAlloc(uint32_t count, uint32_t esz, uint32_t dtype_flags) | (no comment) | GPUChannel.c:2930 | public |
| static int BcRun(const uint8_t *r) | (no comment) | GPUChannel.c:2939 | static |
| static uint32_t VarEsz(uint32_t type) | ---------------- GPUVar: named typed arrays in the resident heap ---------------- | GPUChannel.c:2984 | static |
| static int VarOk(const struct GPUVar *v) | (no comment) | GPUChannel.c:2998 | static |
| struct GPUVar * GPUVarById(uint32_t id) | (no comment) | GPUChannel.c:3003 | public |
| static struct GPUVar * VarNewNl(uint32_t id, const char *name, uint32_t type, uint32_t count) | (no comment) | GPUChannel.c:3009 | static |
| static int VarSetNl(struct GPUVar *v, uint32_t first, const void *src, uint32_t n) | (no comment) | GPUChannel.c:3037 | static |
| static int VarGetNl(struct GPUVar *v, uint32_t first, void *dst, uint32_t n) | (no comment) | GPUChannel.c:3051 | static |
| static int VarFreeNl(struct GPUVar *v) | (no comment) | GPUChannel.c:3062 | static |
| 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:3075 | static |
| static int KernelOk(const struct GPUKernel *k) | (no comment) | GPUChannel.c:3088 | static |
| 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:3095 | static |
| static struct GPUKernel * KernelLoadNl(uint32_t id, const char *path) | (no comment) | GPUChannel.c:3122 | static |
| 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:3156 | static |
| static int KernelFreeNl(struct GPUKernel *k) | (no comment) | GPUChannel.c:3191 | static |
| static int RunKernelNl(struct GPUKernel *k, uint32_t groups, uint32_t nvars, struct GPUVar **vars) | (no comment) | GPUChannel.c:3199 | static |
| 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:3241 | static |
| static void ComputeLeave(struct GPUChannel *gpu) | (no comment) | GPUChannel.c:3249 | static |
| struct GPUVar * GPUVarNew(struct GPUChannel *gpu, const char *name, uint32_t type, uint32_t count) | (no comment) | GPUChannel.c:3255 | public |
| int GPUVarSet(struct GPUVar *v, uint32_t first, const void *src, uint32_t n) | (no comment) | GPUChannel.c:3264 | public |
| int GPUVarGet(struct GPUVar *v, uint32_t first, void *dst, uint32_t n) | (no comment) | GPUChannel.c:3274 | public |
| int GPUVarFree(struct GPUVar *v) | (no comment) | GPUChannel.c:3284 | public |
| struct GPUKernel * GPUKernelLoad(struct GPUChannel *gpu, const char *spv_path) | (no comment) | GPUChannel.c:3294 | public |
| 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:3304 | public |
| int GPUKernelSetCPU(struct GPUKernel *k, void (*fn)(uint32_t gid, uint32_t *heap, const uint32_t *params)) | (no comment) | GPUChannel.c:3313 | public |
| int GPUKernelSetParam(struct GPUKernel *k, uint32_t index, uint32_t value) | (no comment) | GPUChannel.c:3320 | public |
| int GPUKernelFree(struct GPUKernel *k) | (no comment) | GPUChannel.c:3327 | public |
| int GPURunVars(struct GPUKernel *k, uint32_t groups, uint32_t nvars, struct GPUVar **vars) | (no comment) | GPUChannel.c:3337 | public |
| int GPURun(struct GPUKernel *k, uint32_t groups, ...) | (no comment) | GPUChannel.c:3347 | public |
| int GPUKernelBackend(const struct GPUKernel *k) | (no comment) | GPUChannel.c:3361 | public |
| 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 params | GPUChannel.c:3368 | static |
| int GPURunVars3D(struct GPUKernel *k, uint32_t gx, uint32_t gy, uint32_t gz, uint32_t nvars, struct GPUVar **vars) | (no comment) | GPUChannel.c:3413 | public |
| int GPURun3D(struct GPUKernel *k, uint32_t gx, uint32_t gy, uint32_t gz, ...) | (no comment) | GPUChannel.c:3423 | public |
| int GPUComputeAvailable(void) | (no comment) | GPUChannel.c:3437 | public |
| void * GPUComputeHandle(void) | (no comment) | GPUChannel.c:3447 | public |
| 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:3454 | static |
| 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_GPUShader | GPUChannel.c:3504 | static |
| 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:3558 | static |
| static int ShaderOk(const struct GPUShader *s) | (no comment) | GPUChannel.c:3600 | static |
| static int ShaderFreeNl(struct GPUShader *s) | (no comment) | GPUChannel.c:3605 | static |
| static void ShadersRelease(void) | (no comment) | GPUChannel.c:3616 | static |
| static struct GPUShader * ShaderLoadNl(const char *vert, const char *frag, int source) | (no comment) | GPUChannel.c:3623 | static |
| struct GPUShader * GPUShaderLoad(struct GPUChannel *gpu, const char *vert_spv, const char *frag_spv) | (no comment) | GPUChannel.c:3647 | public |
| 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:3657 | public |
| int GPUShaderFree(struct GPUShader *s) | (no comment) | GPUChannel.c:3666 | public |
| static void PutBe(uint8_t *o, const uint8_t *src, uint32_t esz) | ---------------- records 9..22 (channel lock held) ---------------- | GPUChannel.c:3678 | static |
| static int VarSetRecord(const uint8_t *r) | (no comment) | GPUChannel.c:3684 | static |
| static int KernelRunRecord(const uint8_t *r) | (no comment) | GPUChannel.c:3694 | static |
| int GPUComputeRecordLocked(struct GPUChannel *gpu, const uint8_t *r) | (no comment) | GPUChannel.c:3703 | public |
| 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:3769 | static |
| void GPUComputeShutdown(int free_blocks) | (no comment) | GPUChannel.c:3796 | public |
| static int GPUComputeAttach(struct GPUChannel *gpu) | Allocate this channel's compute state and make it current (OpenGPUChannel). | GPUChannel.c:3832 | static |
| const char * GPUComputeBackendName(void) | (no comment) | GPUChannel.c:3842 | public |
| const char * GPUComputeGfxBackendName(void) | (no comment) | GPUChannel.c:3843 | public |
| const char * GPUComputeBcBackendName(void) | (no comment) | GPUChannel.c:3844 | public |
| const char * GPUComputeNote(void) | (no comment) | GPUChannel.c:3845 | public |
| uint32_t GPUComputeLastProgram(void) | (no comment) | GPUChannel.c:3846 | public |
| const uint32_t * GPUComputeHeap(uint32_t *words) | (no comment) | GPUChannel.c:3847 | public |
| void GPUComputeStats(uint64_t *up_words, uint64_t *down_words, uint32_t *dispatches) | (no comment) | GPUChannel.c:3857 | public |
| 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:3866 | public |
| 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:3871 | public |
| 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:3882 | public |
| vec2 HeightfieldUV(vec2 xz) | (no comment) | GPUChannel.c:5162 | public |
| float VertexShadow(vec3 p, float ch) | (no comment) | GPUChannel.c:5163 | public |
| float T8RingB(float y) | half-width (uv units) of the standard outline at height y (uv units) | GPUChannel.c:5181 | public |
| float T8RingC(float y) | (no comment) | GPUChannel.c:5192 | public |
| float T8RingYOld(float t, float y) | (no comment) | GPUChannel.c:5198 | public |
| float T8RingY(float t, int k) | (no comment) | GPUChannel.c:5199 | public |
| float T8RingR(float t, int k) | ring radius = max of the outline over both neighbouring intervals: every chord of the hull encloses it | GPUChannel.c:5201 | public |
| void Hide() | (no comment) | GPUChannel.c:5215 | public |
| 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 and | GPUChannel.c:5219 | public |
| float T10Extent(vec3 o, vec3 D, vec3 L, vec3 Rv) | (no comment) | GPUChannel.c:5234 | public |
| void main() | (no comment) | GPUChannel.c:5240 | public |
| const char * GPUChannelTerrainDriver(void) | (no comment) | GPUChannel.c:5697 | public |
| const char * GPUChannelTerrainAdapter(void) | (no comment) | GPUChannel.c:5698 | public |
| 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:5702 | static |
| 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:5722 | static |
| static SDL_GPUGraphicsPipeline * MakeTerrainPipeline(SDL_GPUShader *vs, SDL_GPUShader *fs, int water) | (no comment) | GPUChannel.c:5749 | static |
| static void VegInit(void) | (no comment) | GPUChannel.c:5809 | static |
| static void VegShutdown(void) | (no comment) | GPUChannel.c:5869 | static |
| 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 grid | GPUChannel.c:5879 | static |
| 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 dst | GPUChannel.c:5910 | static |
| 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 enough | GPUChannel.c:5931 | static |
| static void VegBillboards(SDL_GPUCommandBuffer *cmd, SDL_GPURenderPass *rp, const float *vv) | (no comment) | GPUChannel.c:5965 | static |
| static void KeepFrameFence(SDL_GPUFence *f) | (no comment) | GPUChannel.c:5985 | static |
| static void DrainFrameFences(void) | (no comment) | GPUChannel.c:5991 | static |
| static void TreeShadeInit(void) | (no comment) | GPUChannel.c:5997 | static |
| static void TreeShadeShutdown(void) | (no comment) | GPUChannel.c:6006 | static |
| 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:6012 | static |
| void GPUChannelTerrainTrees3DShade(uint32_t mode) | public: near-tree shading, 0 = the billboard's picture on the mesh (v8, default), 1 = 3D shading | GPUChannel.c:6020 | public |
| static void TreeMeshShutdown(void) | (no comment) | GPUChannel.c:6037 | static |
| static void TreeMeshInit(void) | v11: the tree mesh uses treeg.vert (tuned crown + billboard trunk lean) in place of treef.vert | GPUChannel.c:6046 | static |
| static int TreeMeshOn(void) | (no comment) | GPUChannel.c:6103 | static |
| 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:6105 | static |
| 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:6113 | static |
| 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 again | GPUChannel.c:6129 | static |
| 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:6149 | public |
| void GPUChannelTerrainTrees3DStats(float *radiusUsed, uint32_t *meshes) | public: last frame's state (switch radius actually used, mesh instances) | GPUChannel.c:6156 | public |
| int GPUChannelTerrainInit(void *device, uint32_t w, uint32_t h, uint32_t maxVerts, uint32_t maxIdx) | (no comment) | GPUChannel.c:6162 | public |
| int GPUChannelTerrainTextures(const uint8_t *rgba) | (no comment) | GPUChannel.c:6290 | public |
| int GPUChannelTerrainUpload(const struct GPUChannelTerrainVtx *v, uint32_t nv, const uint32_t *idx, uint32_t ni, float extX, float extZ) | (no comment) | GPUChannel.c:6325 | public |
| 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:6332 | public |
| 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 clockwise | GPUChannel.c:6374 | public |
| 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:6403 | public |
| void GPUChannelTerrainFinish(void) | (no comment) | GPUChannel.c:6412 | public |
| int GPUChannelTerrainDraw(const struct GPUChannelTerrainFrame *f, int wait) | (no comment) | GPUChannel.c:6419 | public |
| static uint16_t HalfFloat(float x) | (no comment) | GPUChannel.c:6433 | static |
| 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:6448 | public |
| 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:6483 | public |
| 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:6509 | public |
| 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:6536 | public |
| 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:6579 | public |
| 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; the | GPUChannel.c:6608 | static |
| static float SmoothStep(float a, float b, float x) | (no comment) | GPUChannel.c:6609 | static |
| void GPUChannelTerrainTimeOfDay(float hours, float cloud, struct GPUChannelTerrainFrame *f, struct GPUChannelTerrainLook *look) | (no comment) | GPUChannel.c:6610 | public |
| int GPUChannelTerrainDrawLook(const struct GPUChannelTerrainFrame *f, const struct GPUChannelTerrainLook *look, int wait) | (no comment) | GPUChannel.c:6653 | public |
| int GPUChannelTerrainReadPixels(uint8_t *rgba) | (no comment) | GPUChannel.c:6748 | public |
| void GPUChannelTerrainShutdown(void) | (no comment) | GPUChannel.c:6773 | public |
| 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 not | GPUChannel.c:6819 | public |
| void CloseContainerGPUChannel(struct ContainerChannel *cc) | (no comment) | GPUChannel.c:6836 | public |
| struct GPUChannel * GetContainerGPUChannel(struct ContainerChannel *cc) | (no comment) | GPUChannel.c:6846 | public |
| 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:6858 | public |
| 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:6865 | public |
| static void Put16(uint8_t *p, uint32_t v) | (no comment) | GPUChannelDraw.c:33 | static |
| static void Put32(uint8_t *p, uint32_t v) | (no comment) | GPUChannelDraw.c:34 | static |
| static uint32_t Get16(const uint8_t *p) | (no comment) | GPUChannelDraw.c:35 | static |
| static uint32_t Get32(const uint8_t *p) | (no comment) | GPUChannelDraw.c:36 | static |
| 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:38 | public |
| 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:48 | public |
| int GPUDrawReady(void) | (no comment) | GPUChannelDraw.c:57 | public |
| const char * GPUDrawDriver(void) | (no comment) | GPUChannelDraw.c:58 | public |
| static SDL_GPUShader * MkShader(int frag) | (no comment) | GPUChannelDraw.c:60 | static |
| static int Upload(SDL_GPUTexture *t, const uint32_t *argb, uint32_t w, uint32_t h) | (no comment) | GPUChannelDraw.c:71 | static |
| static SDL_GPUTexture * MkTex(uint32_t w, uint32_t h, SDL_GPUTextureUsageFlags usage) | (no comment) | GPUChannelDraw.c:100 | static |
| int GPUDrawTexSet(uint32_t id, const uint32_t *argb, uint32_t w, uint32_t h) | (no comment) | GPUChannelDraw.c:109 | public |
| void GPUDrawTexFree(uint32_t id) | (no comment) | GPUChannelDraw.c:121 | public |
| int GPUDrawOpen(void *sdl_window) | (no comment) | GPUChannelDraw.c:127 | public |
| static int SaveBmp(const void *px, uint32_t w, uint32_t h, const char *path) | (no comment) | GPUChannelDraw.c:220 | static |
| 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 what | GPUChannelDraw.c:231 | public |
| 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:325 | public |
| 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:361 | public |
| 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:394 | public |
| void GPUDrawClose(void) | (no comment) | GPUChannelDraw.c:401 | public |
| int DrawGPULines(const struct ThreadGPUSeg *segs, int count, uint32_t w, uint32_t h, uint32_t *pixels) | (no comment) | GPUPlatform.c:11 | public |
| void GPUBackendRelease(void) | (no comment) | GPUPlatform.c:18 | public |
| uint32_t GPUBackendPasses(void) | (no comment) | GPUPlatform.c:19 | public |
| 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:568 | static |
| static void ShaderLock(void) | (no comment) | ShaderChannel.c:107 | static |
| static void ShaderUnlock(void) | (no comment) | ShaderChannel.c:114 | static |
| static int ShaderFail(int code, const char *fmt, const char *a, const char *b) | (no comment) | ShaderChannel.c:116 | static |
| static int ShaderSym(SDL_SharedObject *h, const char *sym, void *fn_out) | (no comment) | ShaderChannel.c:123 | static |
| int ShaderNormalizeDir(const char *in, int windows, char *out, int cap) | ---- search directories ------------------------------------------------------------------------------- | ShaderChannel.c:131 | public |
| static char ShaderSep(const char *dir) | (no comment) | ShaderChannel.c:157 | static |
| static int ShaderAddDir(char (*dirs)[SHADER_PATH_BYTES], int n, int max, int windows, const char *a, const char *b) | (no comment) | ShaderChannel.c:159 | static |
| static SDL_EnumerationResult SDLCALL ShaderListName(void *ud, const char *dir, const char *name) | (no comment) | ShaderChannel.c:183 | static |
| static int ShaderListDir(const char *dir, char (*names)[SHADER_ENTRY_BYTES], int max) | (no comment) | ShaderChannel.c:191 | static |
| static int ShaderIsVersion(const char *name) | (no comment) | ShaderChannel.c:198 | static |
| static int ShaderVersionCompare(const char *a, const char *b) | (no comment) | ShaderChannel.c:206 | static |
| int ShaderSearchDirs(const struct ShaderEnv *env, int dxil, const char *first_dir, char (*dirs)[SHADER_PATH_BYTES], int max) | (no comment) | ShaderChannel.c:218 | public |
| 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:265 | static |
| static void ShaderCurrentEnv(struct ShaderEnv *e) | (no comment) | ShaderChannel.c:280 | static |
| void ShaderSetEnv(const struct ShaderEnv *env) | (no comment) | ShaderChannel.c:304 | public |
| 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:323 | static |
| static int ShaderApiHasSpirv(const struct ShaderApi *a) | (no comment) | ShaderChannel.c:360 | static |
| static int ShaderApiHasSpvc(const struct ShaderApi *a) | (no comment) | ShaderChannel.c:365 | static |
| 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:372 | static |
| static int ShaderAgain(const char *why) | (no comment) | ShaderChannel.c:377 | static |
| static int ShaderNoSigner(void) | (no comment) | ShaderChannel.c:384 | static |
| static int ShaderLoadSpirv(void) | (no comment) | ShaderChannel.c:390 | static |
| static int ShaderLoadSpvc(void) | SPIRV-Cross (needed by DXIL and DXBC alike) | ShaderChannel.c:428 | static |
| static int ShaderLoadDxil(void) | (no comment) | ShaderChannel.c:462 | static |
| static int ShaderLoadDxbc(void) | d3dcompiler_47.dll ships with Windows (System32), so the system search finds it. | ShaderChannel.c:496 | static |
| static int ShaderLoad(uint32_t format) | (no comment) | ShaderChannel.c:519 | static |
| 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:529 | static |
| static void ShaderUnloadLocked(void) | (no comment) | ShaderChannel.c:560 | static |
| 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:575 | static |
| 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:610 | static |
| static void * ShaderComFn(void *obj, int index) | (no comment) | ShaderChannel.c:637 | static |
| static void ShaderComRelease(void *obj) | (no comment) | ShaderChannel.c:642 | static |
| static void * ShaderBlobPtr(void *blob) | (no comment) | ShaderChannel.c:649 | static |
| static size_t ShaderBlobSize(void *blob) | (no comment) | ShaderChannel.c:654 | static |
| 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:661 | static |
| 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:709 | static |
| 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:739 | static |
| uint64_t ShaderHash(const char *source, uint32_t stage, uint32_t format) | ---- cache -------------------------------------------------------------------------------------------- | ShaderChannel.c:755 | public |
| 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:766 | static |
| 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:821 | public |
| struct SDL_GPUShader * CompileShader(struct SDL_GPUDevice *dev, const char *source, const struct ShaderInfo *si) | (no comment) | ShaderChannel.c:840 | public |
| struct SDL_GPUComputePipeline * CompileComputePipeline(struct SDL_GPUDevice *dev, const char *source, const struct ShaderInfo *si) | (no comment) | ShaderChannel.c:874 | public |
| 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:912 | public |
| struct SDL_GPUDevice * OpenShaderSubChannel(uint32_t formats, int debug, const char *driver, const char *tag) | (no comment) | ShaderChannel.c:954 | public |
| const char * ShaderReadyText(struct SDL_GPUDevice *dev) | (no comment) | ShaderChannel.c:985 | public |
| uint32_t ShaderPickFormat(uint32_t formats) | (no comment) | ShaderChannel.c:996 | public |
| int ShaderCompilerReady(uint32_t formats) | (no comment) | ShaderChannel.c:1005 | public |
| void ShaderUseApi(const struct ShaderApi *api) | (no comment) | ShaderChannel.c:1007 | public |
| void ShaderCompilerReload(void) | (no comment) | ShaderChannel.c:1017 | public |
| const char * ShaderNote(void) | (no comment) | ShaderChannel.c:1024 | public |
| int ShaderLastError(void) | (no comment) | ShaderChannel.c:1025 | public |
| void ShaderCacheStats(uint32_t *entries, uint64_t *hits, uint64_t *misses, uint64_t *bytes) | (no comment) | ShaderChannel.c:1027 | public |
| static void ShaderFlushLocked(void) | (no comment) | ShaderChannel.c:1039 | static |
| void ShaderCacheFlush(void) | (no comment) | ShaderChannel.c:1047 | public |
| static int ShaderSlot(void *peer) | (no comment) | ShaderChannel.c:1061 | static |
| static int ShaderRecord(uint32_t slot, unsigned char *out) | (no comment) | ShaderChannel.c:1068 | static |
| uint64_t JoinShaderChannel(void *peer) | (no comment) | ShaderChannel.c:1092 | public |
| void * LeaveShaderChannel(void *peer) | (no comment) | ShaderChannel.c:1109 | public |
| uint64_t ReadShaderChannel(void *chan, void *buf, long len) | (no comment) | ShaderChannel.c:1120 | public |
| uint64_t WriteShaderChannel(void *chan, void *buf, long len) | (no comment) | ShaderChannel.c:1143 | public |
| static void ShaderRtOpen(struct Channel *ch) | (no comment) | ShaderChannel.c:1166 | static |
| static void ShaderRtClose(struct Channel *ch) | (no comment) | ShaderChannel.c:1174 | static |
| struct Runtime * GetShaderRuntime(void) | (no comment) | ShaderChannel.c:1185 | public |
| void OpenShaderChannel(void) | (no comment) | ShaderChannel.c:1187 | public |
| void CloseShaderChannel(void) | (no comment) | ShaderChannel.c:1197 | public |