Commit Graph
1369 Commits
Author SHA1 Message Date
Dean 6a32550fd1 Merge pull request #6699 from MarcZX100/codex/sampler-heap-32-6692
fix(shader): support 32 logical samplers in runtime heap
2026-10-17 18:45:02 +13:00
Dean 2bfe0045d8 Merge pull request #5940 from zmeizy/claude/pknorm-f16-denormal-inputs
fix(shader): flush v_cvt_pknorm_*_f16 denormal inputs by FLOAT_MODE
2026-10-17 18:21:25 +13:00
TamaleroandClaude Opus 5.5 97a84e3261 fix(recompiler): hold 32 samplers in the runtime sampler heap
A pixel shader of PPSA16833 binds more than 16 samplers outside the
sampler tables. Each takes two heap entries, one per descriptor variant,
so the 32-entry heap refused it with "shader sampler pairs exceed runtime
heap capacity" and the title aborted when a new game started.

The heap now holds 64 entries (32 samplers). Its metadata array is part
of ShaderData, which grows from 14528 to 16064 bytes, still within the
16 KiB uniform buffer every Vulkan device supports; the runtime ABI
version moves to 13 so shaders cached with the old layout are rebuilt.
The overflow message names the sampler count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:36:17 +13:00
Dean 29bfe31dd8 Merge pull request #6083 from n-delic/pr/sampler-pairs-v2
fix(shader): allow 32 sampler pairs per shader
2026-10-17 16:34:56 +13:00
Adrià ea5c27b53e Merge pull request #6025 from wh1trope/perf/dominator-bitsets
perf(shader): intersect dominator sets as bitsets
2026-10-17 05:30:45 +02:00
Adrià c9cabcaf84 Merge pull request #6008 from zmeizy/claude/ldexp-f32-denormal-modes
fix(shader): translate v_ldexp_f32 in f32 denormal modes 1 and 2
2026-10-17 04:14:45 +02:00
Adrià fd9e577d98 Merge pull request #6007 from zmeizy/claude/cmp-f32-denormal-modes
fix(shader): translate f32 compares in f32 denormal modes 1 and 2
2026-10-17 03:10:56 +02:00
Adrià db7d9de5e4 Merge pull request #5405 from Pipodi/feat/spanned-wave64-compute
feat(recompiler): run single-wave wave64 compute programs at one lane per invocation on 32-lane hosts
2026-10-16 21:05:55 +02:00
Adrià 0936dc910a Merge pull request #5943 from zmeizy/claude/f16-conversion-float-mode
fix(shader): round and flush f16 conversion results by FLOAT_MODE in every denormal mode
2026-10-16 20:39:11 +02:00
Alex ColliniandClaude Opus 5.5 7a6cc71786 feat(agc): carry spanned waves in the target and require full subgroups
APS5_SPANNED_WAVE is now read once by the driver, which sets
SpirvTarget::spannedWaves only on a device with 32-lane compute subgroup
control and computeFullSubgroups. The recompiler no longer reads the
environment. The field is part of the cache key and of the request
serialization (version 32), so a cached or replayed module keeps the mode
it was built in.

A spanned module numbers its lanes SubgroupId * 32 +
SubgroupLocalInvocationId, which needs two full 32-lane subgroups. The
artifact records this as fullSubgroups (disk cache and pipeline identity
included), and the driver creates those pipelines with
REQUIRE_FULL_SUBGROUPS. Compute pipeline captures accept the flag with a
required subgroup size.

The two-lane fallback now catches only SpannedWaveUnsupported, thrown for
a shuffle wider than 32 bits; other emit errors surface as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:12:58 +02:00
Adrià c8044c3a7a Merge pull request #5914 from fdfawef324/codex/vertex-lane-bounds
fix(shader): fold fixed 32-lane vertex bounds
2026-10-16 13:47:56 +02:00
Adrià bba8b293ba Merge pull request #5899 from ps54all/feat/shader-image-store-d16-sint
feat(shader): store D16 data to SINT storage images
2026-10-16 13:45:23 +02:00
Alex ColliniandClaude Opus 5.5 a015284ee9 fix(recompiler): ballot a spanned wave's LDS lock loop within its host subgroup
The lock loop that emulates 64-bit LDS atomics runs only on the lanes
the guest's exec mask keeps, so a spanned wave's barrier-based ballot
there was not reached by both host subgroups. When one subgroup had no
active lane the other one paired its barriers with unrelated ones and
left the loop with lanes still pending, or the GPU hung (Ghost of
Yotei, program 0x80003af600). The elect and the lock are already per
host subgroup, so each subgroup now loops until its own lanes are done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:43:36 +02:00
Alex ColliniandClaude Opus 5.5 bd6ed97f6d fix(recompiler): keep spanned wave invocations running after a BDA fault
A spanned wave64 program exchanges ballots and shuffles through
workgroup-scope barriers. When a BDA fault stopped one invocation early,
the other 63 would wait at the next barrier forever. Spanned programs
now keep every invocation running and read zeros after a fault, as
programs with wave LDS barriers already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:43:36 +02:00
Alex ColliniandClaude Opus 5.5 80e3d90ed6 feat(recompiler): run single-wave wave64 compute programs at one lane per invocation on 32-lane hosts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:43:36 +02:00
Adrià 65d56a297c Merge pull request #5804 from MarcZX100/codex/pixel-interlock-terminate-2009
fix(agc): stop pixel invocations on BDA faults when supported
2026-10-16 13:35:18 +02:00
Adrià aff725bf6d Merge pull request #5886 from ymatrix1/fix/shader-unnormalized-sampler-without-mip-filter
fix(agc): read an unnormalized sampler without a mip filter at its base level
2026-10-16 13:25:42 +02:00
Adrià 645644c488 Merge pull request #5884 from AnthonyClemens/fix/agc-geometry-line-strip-output
feat(agc): draw line-strip output of NGG geometry programs as mesh lines
2026-10-16 13:25:36 +02:00
ps54allandClaude Opus 5.5 a18d6e9a6b feat(shader): store D16 data to SINT storage images
image_store with D16 data to a storage image of a SINT format threw
"stores 16-bit data to an image of a SINT format", both when the
descriptor is decoded and in the SPIR-V image emitter, and the runtime
image modes left out the SINT conversions for such images. God of War
Ragnarok (PPSA08330) stops on it in compute shader 0x1052a17900 right
after its MFSR setup.

Each 16-bit half is now converted like the D16 format buffer stores
(EmitD16StoreComponent): sign-extended, then saturated to the
component width as for 32-bit data. The buffer form was measured on
RDNA2 in #331; the image form is not measured (TechnicalDebt).

agc_driver_image_store_sint now stores D16 data with DMASK 0xf and 0x5
to all eight SINT formats and after an image_atomic_add on 32_SINT,
instead of expecting the refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:18:38 +02:00
abnergtz 7041ba8d9a fix(recompiler): terminate pixel invocation on BDA fault when supported
Pixel invocations stopped by a BDA fault now end with OpTerminateInvocation when the target offers SPV_KHR_terminate_invocation, and keep OpKill otherwise. OpKill is not enough on AMD driver branch 21045, where a guest atomic after the kill still lands once per faulting pixel.

Based on the approach in poonasor/AnyPS5@73969879.

Refs #2009
2026-10-16 13:10:28 +02:00
Adrià FranchandClaude Fable 5.1 4aafda8e3b perf(agc): journal the pipelines of a run and build them ahead on the next one
A graphics pipeline the store builds or a compute pipeline a dispatch builds is
appended to pipelines.journal next to the shader cache entries, as the
materialized result of each stage (the specialized SPIR-V, bindings and push
constants) plus the recipe the pipeline was built from: the stages'
identities, vertex input layout, descriptor set layout keys and the state
fields the Pipeline constructor reads. When a VulkanDevice is created with a
window (a headless device waits for its first draw or dispatch, since the
window's device usually replaces it first) the journal is loaded and its
pipelines are built on a pool of threads while the title loads, so the first
draw or dispatch of a configuration seen on an earlier run finds its pipeline
resident instead of compiling it on the queue worker.

The pipeline stores key on RecompileResult::Identity, a hash of the module
words, specialization constants, subgroup width and bindings that is the same
on every run (SharedSpirv::ContentHash, computed once per shared module),
rather than on the process-lifetime variant ids; a generated stage is keyed
like any other. CachedPipeline builds outside the store's mutex and the
library parts and link are built outside the library store's mutex, so replay
threads and queue workers build in parallel; a concurrent build of the same
key keeps the first inserted. A replayed pipeline enters the store at its
least recently used end and a full store takes none, and its optimized relink
waits for the first draw that binds it, so the title's own pipelines come
first in both. The compute pipeline creation moves into
VulkanDevice::createComputePipeline, shared by dispatches and the replay. The
store key also covers the color component mapping, the depth target's sample
count and a depth bias clamp, which the constructor reads.

The file names the device it was written for (the properties the driver's
pipeline cache file is named by) and starts over for another; a torn tail is
cut at a record boundary; two runs sharing the directory take turns on a lock
file and keep each other's records; a read failure never starts the file
over. A device cancels its replay before it is replaced or destroyed, and a
replaced device destroys its pipelines then rather than at the driver's stop.

APS5_NO_PIPELINE_JOURNAL=1 disables it; APS5_PIPELINE_JOURNAL_THREADS,
APS5_PIPELINE_JOURNAL_ENTRIES (the first recorded), APS5_PIPELINE_STORE_ENTRIES
and APS5_PIPELINE_JOURNAL_MAX_MIB bound it; APS5_PROFILE_DRAW prints a
[pipeline-journal] summary. APS5_VERIFY_SET_LAYOUTS=1 now also checks a
dispatch's set layout against the one described from its shader. The lavapipe
test suite, which shares one cache directory, runs with the journal off except
for the journal's own tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P6hw3kRAuQdfcU9YCZgaoK
2026-10-16 12:52:28 +02:00
Adrià 51acb79ac4 Merge pull request #5828 from billythemenace2/fix/agc-non-image-tsharp-as-null
fix(agc): treat a TYPE 1 T# in a read-only static image slot as null
2026-10-16 12:34:28 +02:00
Adrià f8d4ce340b Merge pull request #4943 from TheAggie/perf/agc-draw-relocation-main
perf(agc): find cached draws across moved user-data pointers
2026-10-16 12:13:51 +02:00
Adrià 7758abac13 Merge pull request #5841 from simonbronk/feat/line-reads-through-2d-array
fix(shader): read explicit-LOD and level-zero 2D-array samples through 1D T#s as measured
2026-10-15 23:00:50 +02:00
billybobpicklioandClaude Opus 5.5 a0347cfed5 feat(agc): draw line-strip output of NGG geometry programs as mesh lines
A geometry program with VGT_GS_OUT_PRIM_TYPE 1 was refused as an
unsupported output assembly. Each primitive export of an NGG line-strip
program is one line whose indices are packed like a triangle's, so the
mesh module now declares OutputLinesEXT with PrimitiveLineIndicesEXT for
it. A subgroup gets VGT_GS_MAX_VERT_OUT - 1 lines per input primitive and
at least GE_MAX_OUTPUT_PER_SUBGROUP line slots; fast launch keeps using
PRIM_AMP_FACTOR. The output size is part of the cache, draw, validation
and pipeline keys, and the request serialization version becomes 31.
Triangle-strip geometry is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:39:35 -04:00
Scott SchusterandClaude Opus 5.5 2ea25c53f7 fix(recompiler): the shader disk cache carries a result's shader-data user words
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:53:53 -05:00
Scott SchusterandClaude Opus 5.5 553690c0d3 perf(recompiler): report which user-data words a resource capture only reads through
The SRT evaluator records every raw read with the user-data word its address is
based on, and marks a word used as a plain value. The result also names the
user-data word behind each shader-data dword.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:26:58 -05:00
billythemenace2andClaude Opus 5.5 01d3594c20 fix(agc): treat a TYPE 1 T# in a read-only static image slot as null
A static, read-only image slot whose T# has TYPE 1 is now bound as a null
image, like TYPE 0 since #5473 and #4779. On gfx1010, image_sample_lz,
image_sample_b, image_load and image_get_resinfo through a format-22
TYPE 1 T# return zeros without a fault, and gfx1035 reads it as zeros
too. Written, atomic and table slots still throw, and the reserved
types 2-7 stay refused.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 15:16:56 +01:00
Adrià 56f5a6eef7 Merge pull request #5757 from hypermoist/perf/vector-window-unindexed-slots
perf(recompiler): keep the vector window's unindexed slots out of the array
2026-10-15 15:58:23 +02:00
simonbronkandClaude Opus 5.5 63db31fdd1 fix(shader): read explicit-LOD and level-zero 2D-array samples through 1D T#s as measured
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:36:02 +02:00
Adrià 489466d3f9 Merge pull request #5734 from YossiYad/fix/strip-last-provoking
fix(agc): refuse last-vertex strips only for reads of a vertex slot
2026-10-15 15:03:44 +02:00
Adrià 23dcb82499 Merge pull request #5648 from Amoenus/codex/buffer-resource-vcc-tuple
fix(shader): accept buffer resource tuples ending in VCC
2026-10-15 13:55:14 +02:00
fdfawef324andClaude Opus 5.5 d353c6bccf fix(shader): fold only constant lower-half lane words of vertex programs
FoldVertexLaneBounds replaced every LaneId < 32 compare of a vertex
program on a fixed 32-lane host subgroup with true. The half-wave scan
matcher of the SPIR-V backend recognises a lane word by the select of its
low and high words on that compare. A scan keyed by the entry EXEC ballot
lost that shape, so its v_readlane_b32 of lane 63 was no longer read as a
half-wave reduction and the recompile failed (agc_shader_memory).

Fold the lane word select itself instead, and only when both words are
constants. Lane words built from ballots or other values keep their
lower-half test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:38:42 -04:00
fdfawef324andCodex dfc71c8418 fix(agc): fold bounded vertex lane masks before stencil replay
Preserve replay refusal for observable lane-dependent values, non-vertex stages, unknown subgroup widths and varying-size modules. Validate the actual native vertex subgroup contract and retain compiled single-lane targets.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-15 07:38:40 -04:00
Adrià 5050a23f38 Merge pull request #5473 from MarcZX100/type0-recompiler-followup-4779
fix(shader): accept TYPE=0 images during materialization
2026-10-15 13:37:52 +02:00
Adrià 821c69e504 Merge pull request #5509 from billythemenace2/fix/shader-cube-tsharp-2d-access
fix(shader): read cube T#s through DIM 2D image_sample and image_load as face 0
2026-10-15 13:25:34 +02:00
NikoandClaude Opus 5.5 c434467f6c fix(agc): form reversed-order blend factors from copies of the export
The reversed-order blend computed the factors Vulkan cannot apply per
channel in the pixel shader (1 - x in fp32, a clamp for UNORM targets
and, when both positions needed it, a premultiplied export) and passed
them to the blend as a dual-source second color. A plain blend converts
the export once and forms 1 - x and the products from that converted
value, so the two paths can round differently. On UNORM8 the difference
reaches one step per substituted factor: an Intel iGPU stored 161 where
the exact blend is 159.75 for SRC_COLOR + ONE_MINUS_SRC_COLOR with an
export of 0.5 over 192 (160 through SWAP_STD), and on an RTX 5080 and
lavapipe the split path differed from the same draw into a SWAP_STD
target by up to 2 steps on other inputs.

The pixel shader now only copies values. Each channel of the second
color is the exported alpha, the channel's own export or the constant 0
or 1, and a channel of the first color whose source factor is ONE may
become 1 with its export moved into the factor. Every factor, 1 - x and
product comes from the blend through SRC1_COLOR, SRC1_ALPHA and their
ONE_MINUS forms, applied to copies of the same export values that the
first color carries. TranslateReversedBlend searches for Vulkan factors
and copy routes that reproduce each channel's guest factors and throws
for combinations no routing reproduces, such as ONE_MINUS_SRC_ALPHA in
the alpha equation next to SRC_COLOR in the color equation: of the 1995
factor combinations the shader used to compute, 932 are routed and the
others throw again, as on main. GT7's 0x65010504 is among the routed
ones. The code is now four 2-bit routes for each color, the same for
every format, and the post-pass emits no arithmetic.

agc_driver_reversed_order_blend also draws each case into a SWAP_STD
target, which Vulkan blends alone, and requires identical stored bits;
the comparison with the exact blend keeps its 1-step tolerance.
agc_driver_graphics checks every factor combination TranslateReversedBlend
accepts against the guest equations and that the post-pass adds no
arithmetic instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:51:27 +02:00
NikoandClaude Opus 5.5 16ea32c97d feat(agc): blend into color targets with a reversed component order
8_8_8_8 and 16_16_16_16 targets with COMP_SWAP 2 or 3 keep the exported
alpha in their first channel and red or blue in their fourth, so a plain
Vulkan blend would run the alpha equation on a color channel. Such draws
threw "blending into a color target with a reversed component order is
not implemented" (Gran Turismo 7, #4782).

The AMD SI and CIK register references describe CB_TARGET_MASK in the
order of components after blending and before COMP_SWAP is applied, and
RADV programs CB_BLENDn_CONTROL without regard to the swap while it
renders R4G4B4A4, B4G4R4A4, R5G5B5A1 and B5G5R5A1 through SWAP_STD_REV
and SWAP_ALT_REV and passes the CTS blend tests on Navi10. The color
block is therefore taken to blend in export order: the alpha equation
and source-alpha factors use the exported alpha and the destination
alpha is the first channel.

TranslateReversedBlend keeps the factor pairs Vulkan applies per channel
in the pipeline. Other source factors are computed by the pixel shader
from its MRT0 export (clamped for UNORM targets, as BLEND_CLAMP says)
and handed to the blend as a dual-source second color, which the
fragment output post-pass adds at location 0 index 1; when both
positions need it, the export is premultiplied by its source factor.
The code is a pipeline specialization, serialized in request version
26, and stays out of the prepared shader key.

sRGB, SNORM and integer targets, constant and second-source factors,
destination alpha in the color equation, destination factors the two
equations do not share, different color and alpha operations, MIN or
MAX with factors other than ONE, other color exports when the shader
computes factors, and devices without dualSrcBlend still throw, now
with the blend control, mapping and format in the message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:51:27 +02:00
Adrià FranchandClaude 7b55c6333a fix(shader): IrResourcePlan is 712 bytes with the compact plan on libstdc++
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 11:13:38 +02:00
4651980eba perf(agc): cheaper shader-memory captures per draw
The per-draw capture of a shader's memory (the SRT walk and the guest pages it reads) cost about
15 us per draw packet in GTA V Performance mode; it now costs about 6.6.

- The SRT evaluator memoizes per plan value in a thread's reused, stamped array instead of a hash
  table allocated and grown on every walk (evaluate 5.3 -> 3.6 us per capture).
- ExtractPlan also stores the plan's values as 32-byte records with argument ids, and the walk
  evaluates that compact copy: the IR walk spent most of its time in cache misses (3.6 -> 2.7 us).
  The evaluator is a template over the node view, so both walks share every opcode's semantics, memo,
  cycle and failure rules. A plan that cannot be expressed compactly keeps the IR walk.
  APS5_VERIFY_SRT_COMPACT=1 walks both and throws on any difference.
- ShaderMemory's valid/read/recent marks are arrays of 64-bit words scanned with countr_zero instead
  of bitsets tested bit by bit (about 1 us per draw packet).
- Captured pages come from a per-thread pool, are found through a short vector with a last-page
  shortcut, and a page no recorded GPU work writes gets the flush hook a whole-page read would make,
  then has each 64-byte block copied when a word of it is first read (about 0.3 us per packet).
  Pages with pending GPU writes and unmapped pages are read as before.
- APS5_PROFILE_DRAW splits the capture time into SRT evaluation and materialization, and prints the
  [capture] line once per 10 s instead of every 500 captures (it cost about 2 us per capture).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Gjon Gojcevic <7807870+gjonn@users.noreply.github.com>
2026-10-15 11:11:24 +02:00
Adrià db81992c55 Merge pull request #5238 from MarcZX100/fix/trace-draw-program-addresses-5166
feat(agc): trace shader addresses for each draw
2026-10-15 10:06:31 +02:00
hypermist a4639ad2fb Merge upstream main into perf/vector-window-unindexed-slots 2026-10-15 16:02:16 +13:00
MarcZX100 0e7e149cce fix(shader): limit TYPE=0 null images to reads 2026-10-15 01:59:33 +00:00
MarcZX100 682b07eb03 fix(shader): track captured image descriptor words 2026-10-15 01:53:43 +00:00
Dean Galvin 5fd9c80faf test(shader): expect request version 29 with the default quad masks in the serializer replays
Requests replayed from versions 22 to 24 now re-serialize at version 29 with
the default quad pixel mask (0xf) and quad sample masks (0xffff) after the dither and front-face flags, plus the empty linked call fallback list.
2026-10-15 13:00:34 +13:00
fdfawef324andCodex dbbe282c14 fix(agc): require demote for masked subgroup reads
ReadFirstLane, Ballot and PermuteU32 can consume uncovered helper lanes after a fragment explicitly enables EXEC. Classify those operations as neighbour reads so a partial quad mask refuses their kill fallback when demote is unavailable. ReadFirstLane also stays protected when a constant whole-quad instruction folds away.

The CPU regression covers explicit EXEC, constant WQM, a comparison ballot and ds_permute. Unmasked programs still compile, supported masked programs retain demote and their subgroup operation, and constant colour keeps the kill fallback. The recovered source fails the readfirstlane and ballot checks; the corrected source passes both the focused check and shader-memory suite.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-15 13:00:34 +13:00
fdfawef324 1ffc5f672b feat(agc): emulate per-pixel multisample coverage masks
Decode the four PA_SC_AA_MASK fields at the rasterized sample count. Use the native Vulkan mask when all four pixels agree and apply varying masks in the fragment shader, preserving helpers and combining coverage with alpha-to-coverage and shader mask exports. Add the normalized masks to pipeline, draw and shader keys and the versioned replay request.

Refuse unsupported conservative-raster, centroid and early depth/stencil memory-write cases. Synthetic readbacks cover driver submission, depth/stencil suppression, fragment stores and one-sample and four-sample coverage.
2026-10-15 13:00:34 +13:00
Michon 90783f2748 fix(agc): count whole-quad mode as a neighbour-lane read for a quad mask without demote
A program that enables whole-quad mode (s_wqm_b64) and then reads a ballot or
readfirstlane sees the helper lanes, which OpKill removes.
2026-10-15 12:59:39 +13:00
Michon 90b20afac8 fix(agc): demote quad-mask pixels to helpers instead of killing them
With PA_SC_AA_MASK covering only some pixels of a quad, the uncovered pixels
run on the hardware as helper lanes, so derivatives of the covered pixels stay
defined. OpKill ends those invocations; OpDemoteToHelperInvocation keeps them
as helpers. The device enables VK_EXT_shader_demote_to_helper_invocation when
available and passes the DemoteToHelperInvocation capability and its SPIR-V
extension to the recompiler target and the graphics shader validation. A
demoted pixel also reads as a helper, so its initial EXEC bit is clear as on the
hardware. Without demote, OpKill stays for pixel programs that read no
neighbouring lanes; implicit-LOD sampling, LOD queries and cross-lane reads are
refused. The quad pixel mask execution test now also samples a mipmapped
texture with implicit LOD under the mask.
2026-10-15 12:59:39 +13:00
Michon 72518f64fb feat(agc): single-sample sample masks as a per-quad-pixel discard
With one sample, PA_SC_AA_MASK leaves one coverage bit per pixel of the 2x2 quad,
so a draw can cover only some pixels of every quad (GTA V renders a target one
quarter of the pixels at a time this way). The pixel stage info carries that 4-bit
mask; a fragment shader whose mask is not full starts by killing the invocation
unless its gl_FragCoord quad position is covered, and runs without early fragment
tests. The mask is part of the recompile cache key and the serialized request
(version 24). Sample masks of multisampled draws stay refused.
2026-10-15 12:59:39 +13:00