Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,11 @@ void EmitImage(ValueEmitContext& ctx, const IR::Inst& inst) {
ctx.Fail(inst, "uses depth comparison with a 3D image");
return;
}
if (op == IR::ValueOpcode::ImageGatherRaw &&
(volume(mem.resource) || std::ranges::any_of(indirect_images, volume))) {
ctx.Fail(inst, "gathers from a 3D image");
return;
}
if (op == IR::ValueOpcode::ImageGatherRaw) {
uint32_t component_or_dref;
if (dref) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const std::vector<Case> Cases = {
{"lds-umin-in-a-vertex-shader", 0x03, 0x00, {0xd8070000u, 0x00000100u, 0xbf810000u}},
{"image-get-lod-in-a-pixel-shader", 0x04, 0x00,
{0xf1800108u, 0x00400400u, 0xf8000801u, 0x00000004u, 0xbf810000u}},
{"image-gather-from-a-2d-image", 0x01, 0x00,
{0xf35a218du, 0x7e000281u, 0x80000100u, 0xbf960001u, 0xbefe04c0u,
0xea6f72eau, 0xbf8c0000u, 0xbf810000u}, true},
{"null-export-in-a-compute-shader", 0x00, 0x00,
{0xf8000891u, 0x03020100u, 0xbf810000u}},
{"disabled-parameter-export-in-a-compute-shader", 0x00, 0x00,
Expand Down Expand Up @@ -61,6 +64,9 @@ const std::vector<Refusal> Refusals = {
"not valid in a compute shader"},
{"depth-compare-sample-on-a-3d-image", 0x04, 0x00, {0xf0a00110u, 0x00400400u, 0xf8000801u, 0x00000004u, 0xbf810000u},
"depth comparison with a 3D image"},
{"image-gather-from-a-3d-image", 0x01, 0x00,
{0xf35a2195u, 0x7e000281u, 0x80000100u, 0xbf960001u, 0xbefe04c0u,
0xea6f72eau, 0xbf8c0000u, 0xbf810000u}, "gathers from a 3D image"},
{"depth-compare-sample-on-a-multisampled-image", 0x04, 0x00, {0xf0a00130u, 0x00400400u, 0xf8000801u, 0x00000004u, 0xbf810000u},
"samples a multisampled image"},
{"sample-on-a-multisampled-image", 0x04, 0x00, {0xf0800130u, 0x00400400u, 0xf8000801u, 0x00000004u, 0xbf810000u},
Expand Down
5 changes: 5 additions & 0 deletions docs/dev/debt/changes/fix-kyty-image-gather-dimensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# kyty

## add Functional

- [IMAGE_GATHER on a 3D image](../../../core/kyty/graphics/shader/recompiler/backend/spirv/spirvEmitterImage.cpp) is refused because Vulkan does not permit `OpImageGather` with a 3D image. The console operation is not measured, so there is no validated alternative lowering. Closes when: its semantics are measured and a valid lowering is tested.
Loading