mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1481] rdna2spirv: 16-bit gradients for image_sample_d_g16 and image_sample_… #1511
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1511
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1481
Author: @vsking2000
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:shader-sample-g16📝 Commits (1)
ece08d3rdna2spirv: 16-bit gradients for image_sample_d_g16 and image_sample_d_cl_g16 (SHADER-SAMPLE-G16)📊 Changes
3 files changed (+229 additions, -2 deletions)
View changed files
📝
docs/design.md(+2 -1)➕
tests/semantic/test_sample_g16.py(+190 -0)📝
tools/rdna2spirv.py(+37 -1)📄 Description
…d_cl_g16 (SHADER-SAMPLE-G16)
The two g16 forms whose f32-gradient sibling main translates are now the same sample as image_sample_d / image_sample_d_cl, with dP/dx and dP/dy read as f16 halves: two per VGPR, low half first, each axis padded to a whole VGPR (1D (dx, -) (dx, -); 2D/array/cube (x, y) (x, y); 3D (x, y) (z, -) (x, y) (z, -)). Coordinates and clamp follow, packed only under a16; g16 and a16 are independent. Gen.g16_gradients widens each half with UnpackHalf2x16 and drops the pad; the f32-gradient path does the rest. LLVM (SIISelLowering lowerImage, packImage16bitOpsToDwords) and Mesa ACO (aco_select_nir.cpp, emit_pack_v1) agree on every point.
The six compare/offset g16 forms stay refused until their f32 siblings are translated (SHADER-SAMPLE-GRAD-FORMS), and the eight _cd g16 forms stay refused. docs/design.md gets a row. Not run on a GPU.
Claude-Session: https://claude.ai/code/session_01Y7fbZYVY7EtLknWBZUfSLf
Claimed in the coordination issue as:
Depends on:
Fixes:
What and why
Tested
GPUs tested:
AI-assisted:
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.