Repository navigation
fix(shader): bind an unnormalized S# normalized when it samples only null images - #7296
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Full CI on 6bbbf0a (merged into main) fails to compile on Linux only: The new Fix: change the assert to Separately, #7085, #6959, #6941, #7223 and #6924 also raise |
|
Thanks. Fixed in ec2453d: the assert now expects 632, the same one-line change as 05b3f6e. I couldn't build the Linux-only assert here, so the value comes from your CI output. On FormatVersion: noted. If one of #7085, #6959, #6941, #7223 or #6924 lands first, I'll rebase and move this one to 38. AI-assisted: yes |
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
…null images An S# that forces unnormalized coordinates was refused when it samples a T# the shader declares 3D, 2D-array, cube or multisampled, since Vulkan allows unnormalized coordinates only with a single-level 1D or 2D view. A null T# reads zeros at any coordinate, and a T# whose channels all select constants is emitted as those constants without a sample, so when the S# samples no other T# its coordinates cannot change a result. Such an S# is now marked in its binding (samplerCoordinatesIgnored) and the driver creates its sampler without FORCE_UNNORMALIZED. The flag is part of the binding content key and of the shader disk cache, whose format version is raised to 38. An S# that also samples a real T# while a null T# of such a shape shares it is still refused. PPSA01317 pairs an unnormalized clamped bilinear S# with a null 3D T# and a 3D T# whose channels all select 0 for image_sample_lz in a compute shader during boot. AI-assisted: yes
…dinatesIgnored The new samplerCoordinatesIgnored field adds 40 bytes to DescriptorBinding under libstdc++ on Linux x86_64, where the size assert is compiled. The encoder and decoder already carry the field. AI-assisted: yes
ec2453d to
ca7f2f6
Compare
|
Rebased onto main 385ed71 (force-push, head ca7f2f6). Git merged cleanly, but main is already at
AI-assisted: yes |
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
|
AMD on Windows: the tests this PR names pass on an RDNA 3.5 GPU. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release.
AI-assisted |
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
Check the declared shape of null images before bypassing materialization, preserving the null-only sampler behavior from boykopovar#7296. Bump the disk format for the added sampler coordinate flags.
Keep the current null-image bypass when a shared sampler also serves a live 2D image. Apply the coordinate-ignore behavior from boykopovar#7296 only when no live sample needs those coordinates; retain regression coverage for both cases.
What
A compute shader that does
image_sample_lzthrough an S# forcing unnormalized coordinates was refused when that S# is paired with a T# the shader declares 3D, 2D-array, cube or multisampled:DescriptorBindingBuilder::Populate unnormalized guest sampler samples a 1D-array, 2D-array, 3D, cube or multisampled image, which is not implemented;guest sampler descriptor uses unnormalized coordinates which are not implemented.Vulkan allows unnormalized coordinates only on a single-level 1D or 2D view, so a real T# of those shapes still cannot take such a sampler. But a null T# reads zeros at any coordinate, and a T# whose four channel selects are all constants is emitted as those constants without a sample. When an unnormalized S# samples nothing else, its coordinates cannot change any result.
PPSA01317 compute shader
0x1258d12200does exactly this during boot: S#00008092 00fff000 02500000 00000000(clamp on all axes, bilinear, explicit LOD) is paired only with a null T# and a 1x1x1 R8 3D T# whose channel selects are all 0.Change:
ProveUnnormalizedskips a sampled pair whose shape mismatch comes from a null T#. If the S# then samples no real T#, its binding element gets the newsamplerCoordinatesIgnoredflag instead ofsamplerUnnormalized.ShaderResources::addImageBindingclears the force-unnormalized bit of such an S# before creating the sampler.FormatVersiongoes 37 -> 38 (main is at 37 since feat(agc): implement 11_11_10 float color targets through 32-bit uint attachments #7207), as earlier binding-flag additions (e.g.samplerIntegerBorder) did.Tested
Windows 11, MinGW-w64 GCC, NVIDIA GeForce RTX 5090 Laptop GPU (driver 616.92). Rebased on
mainat c0a7468.agc_shader_memory(newverifyNullVolumeUnnormalizedSampler, which runsDescriptorBindingBuilder::Populatewith the S# above):samplerCoordinatesIgnored = {true},samplerUnnormalized = {false}.main(only the newDescriptorBinding::samplerCoordinatesIgnoredfield kept so the test compiles): fails withDescriptorBindingBuilder::Populate unnormalized guest sampler samples a 1D-array, 2D-array, 3D, cube or multisampled image, which is not implemented.agc_shader_disk_cache(binding round-trip now coverssamplerCoordinatesIgnored),agc_shader_disk_cache_large_file,agc_driver_graphics: pass.python tools/check_conventions.py --base origin/mainandpython tools/check_test_registration.pypass.Not tested: AMD, Intel, Linux, macOS. The title was not re-run on this exact branch.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)