upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
authorJess-Doit <doit.jesss@gmail.com>2026-11-21 22:52:54 -0800
committerJess-Doit <doit.jesss@gmail.com>2026-11-21 23:18:38 -0800
commita0a6d2f07cfcca1007e5898a4795d1d59a16a274 (patch)
tree9b5b16a51b4707f8baaa5585da134b2aa2a3b2fc /runtime/src/main.cpp
parentc63773d51235d72250d48699f29830ac9ddafd60 (diff)
Translator: --texel-offset-fallback for image_sample*_o without VK_KHR_maintenance8
A run-time texel Offset outside gather needs VK_KHR_maintenance8, which NVIDIA Pascal lacks, so ps_texoff skips there and 4 PS (31 image_sample_o) can't run. With --texel-offset-fallback the offset is folded into the coordinate: coordinate + offset / size of the sampled level (0 for _lz/_c_lz, the LOD for _l, OpImageQueryLod's for implicit samples, plus the bias for _b; floored and clamped). An integer offset commutes with wrapping and clamping, so this is exact at that level for every address mode; only a trilinear blend differs (the coarser level moves by offset / 2). Implicit samples become Grad samples with the unshifted coordinate's derivatives, so the LOD doesn't change with a per-pixel offset. Gathers keep their Offset (shaderImageGatherExtended). - LEONIDA_TEXOFF_FALLBACK=1 for build.py, check.py and run_gpu_tests.py; vk_texture_test then isn't asked for maintenance8, and texoff_problem also judges the +16/-32 sample. - runtime/test/shaders/ps_texoff_implicit.asm: ps_texoff's per-pixel sample as image_sample_o, the corpus form. - tests/test_texel_offsets.py: the fallback for every sample form, including spirv-val without --allow-offset-texture-operand. - docs/design.md "Texel offsets", docs/testing.md. GTX 1060: ps_texoff and ps_texoff_implicit 4096/4096 exact (SKIP before). Corpus: the 4 PS translate and validate; needs_maintenance8 4 -> 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SSJXX67xeoorUsLJ2f9zms
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions