mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1480] rdna2spirv: explicit-gradient samples with compare or offset (SHADER-… #1510
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#1510
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/1480
Author: @vsking2000
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:shader-sample-grad-forms📝 Commits (1)
a768a65rdna2spirv: explicit-gradient samples with compare or offset (SHADER-SAMPLE-GRAD-FORMS)📊 Changes
3 files changed (+322 additions, -11 deletions)
View changed files
📝
docs/design.md(+3 -2)➕
tests/semantic/test_sample_grad_forms.py(+283 -0)📝
tools/rdna2spirv.py(+36 -9)📄 Description
…SAMPLE-GRAD-FORMS)
image_sample_c_d, image_sample_c_d_cl, image_sample_d_o, image_sample_d_cl_o, image_sample_c_d_o and image_sample_c_d_cl_o were refused by name. They combine pieces the translator already has as GPU-tested rules (depth compare, explicit gradients, _o offsets, the min-LOD clamp): address order offset, z-compare, dP/dx, dP/dy, coordinates, clamp, as LLVM (AMDGPUSampleVariants, lowerImage) and Mesa ACO both emit it. The sample is OpImageSample(Dref)ExplicitLod with Grad, Offset and MinLod in that order; a16 keeps the compare and the f32 gradients whole.
Refused with a reason: compare on a 3D image, 3D gradient forms with tfe/lwe, and the _o forms under --texel-offset-fallback (the shifted level is not computed from explicit gradients). The _cd and g16 forms stay refused. docs/design.md gets a row; the two rows that listed these as refused now point to it. 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.