Commit Graph

11 Commits

Author SHA1 Message Date
63b0b680ba Merge upstream main into PR #2494 2026-11-28 13:59:12 +00:00
5acf0fa3fc scripts: the short form v_add_co_ci_u32 vD, src0, src1 reads src0 (SCRIPTS-SHORT-CO-CI-OPERANDS)
audit_shader4_regs.rbw_registers and vs_input_survey.read_before_write took every VOP `_co_` op with a scalar
second operand as vdst + carry-out. The assembler's short form v_add_co_ci_u32 vD, src0, src1 (also sub and subrev)
has VCC as its carry-out and carry-in and names neither, so its second operand is src0, a read: an SGPR there was
counted as written and dropped from the read-before-write sets. For audit_shader4_regs that hid exactly the s3 read
the audit looks for. The same fix #2357 makes in lane_masks, wave64_halves and writes_exec (wavehs's follow-up there).

Tests: test_short_form_carry_in_reads_s3_in_the_audit and test_short_form_carry_in_reads_its_scalar_src0 fail on
main (s3 missing from the read-before-write sets) and pass here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-27 18:30:50 +00:00
51e47a68a4 vs_input_survey: validate index.json filenames, accept UTF-8 BOM, guard all inputs, and write --json atomically 2026-11-25 19:43:23 +08:00
05b6338fc4 Merge pull request #3338 from kapitche
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:18 -05:00
6535919f47 vs_input_survey: a vertex-shader index entry without a string file is a one-line error 2026-11-22 20:32:28 -05:00
7c0cd1ba6a Merge pull request #3669 from WALID1618Y 2026-11-22 17:03:19 -05:00
09941b8cf5 vs_input_survey: classify ds_ordered_count as returning, drop redundant ds_store, expand RBW tests 2026-11-22 22:32:13 +01:00
9d1225a288 vs_input_survey: fix read-before-write operand classification for dual-dst, v_cmp, lists, stores, and atomics 2026-11-22 22:16:14 +01:00
63ff788e91 vs_input_survey: one error line for a bad <dxbc> folder, index.json or --json path 2026-11-22 15:09:56 -05:00
15f5b2fbc0 Fix what the round-41 merges broke
- tests/semantic: BaseVertex/BaseInstance read 0 in the wave interpreter; the LDS MockGens follow
  SHADER-309 (lds_bound, lds_access, lds_atomic); abs emission tests load their operand, since
  SHADER-315 folds scalar ALU on constants.
- test_translate: the dynamic gather sampler is a loaded word, not s16 + 0 (SHADER-315 folds it).
- test_world_build: DDS downscale weights colours by alpha (62804d0d).
- test_fspx_shaders_stage: the fake disassembler writes the listing make_game now checks.
- xgameruntime_test: re-read the package id after clearing the LEONIDA_PACKAGE_ID override.
- docs: one row per topic again in design.md (72 topics) and README.md; one Other languages line;
  embedded_shaders.md keeps one copy of each bullet; animation.md links the heading anchor.
- tools/scripts: character_textures uses report_paths.same_report_path; stdout guard on six programs;
  LF write in vs_input_survey; the cl.exe fallback compiles winhttp_offline.cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:30:33 -05:00
07bd05fa95 Translator: zero-based VS v0/v3 (VertexIndex - BaseVertex, InstanceIndex - BaseInstance); VS is legacy, not NGG (SHADER-33)
Corpus (scripts/vs_input_survey.py, all 2,236 VS): no exp prim, no s_sendmsg, no v_mbcnt, every
VS exports pos0/param, so the console runs them as legacy hardware VS. Their input VGPRs are
Mesa's GFX10 legacy layout (radv_shader_args.c, declare_vs_input_vgprs, not is_ngg): v0 vertex
id, v1 unused, v2 primitive id, v3 instance id; no VS reads v1/v2 on entry, 788 start with the
fetch call and read attributes from v4.

Those ids are zero-based on the hardware (ac_nir_lower_intrinsics_to_args.c: vertex_id is
load_vertex_id_zero_base, instance_id is load_instance_id; the bases come in SGPRs), while
Vulkan's VertexIndex/InstanceIndex include firstVertex|vertexOffset/firstInstance. The
translator now seeds v0 = VertexIndex - BaseVertex and v3 = InstanceIndex - BaseInstance
(DrawParameters; feature shaderDrawParameters in every VS's metadata).

GPU test vs_base_ids.asm, drawn with VKH_DRAW=16,7 (new vk_harness option): 0x101 on every
pixel, where before it was 0x7111. Run by check.py and run_gpu_tests.py. vk_harness,
vk_pipeline_check, vk_bindless_test, vk_texture_test and the runtime's Vulkan device enable
shaderDrawParameters. design.md's "Inputs and outputs" row replaces the "unverified" note.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:59:04 +01:00