Skip to content

runtime: bind four-channel and half4 texture UAVs on the native compute route - #3398

Open
Leyukaka wants to merge 1 commit into
R0Y00:mainfrom
Leyukaka:native-compute-bindings
Open

Leyukaka wants to merge 1 commit into
R0Y00:mainfrom
Leyukaka:native-compute-bindings

Conversation

@Leyukaka

Copy link
Copy Markdown
Collaborator

Change

Takes over #3049 (sydney-0o, co-author), which carried #2975 and #2993, onto current main. Relative to main:

Refs #3049, #2975, #2993, #2974.

Verification

Windows Sandbox, network off, release build of 11e1a06d on main 8ecd30fe (the head dfd8cb2c has the same tree; only the commit message changed). Adapters: NVIDIA GeForce RTX 5080, driver 32.0.16.2101 (shader model 6.6, wave32), and WARP 10.0.26100.9818 (no wave32).

ctest --test-dir out/build/release --no-tests=error -V -R "^(native_compute_manifest_reasons|startup_compute_dispatch_(texture|array|array_d16|two_mips|(texture_)?native)_(warp|hardware)|startup_compute_dispatch_(warp|hardware)|startup_gfx2hlsl_image_store_3d1d|startup_manifest_retry)$"

15 pass and 2 skip (77): on WARP startup_compute_dispatch_native_warp and startup_compute_dispatch_texture_native_warp exit 77 after checking the named capability refusal.

Mutants, each applied alone, rebuilt and run with the same suite:

  • manifest case 0: tex = "tex1d" → "tex2d": native_compute_manifest_reasons, startup_compute_dispatch_texture_native_hardware and _warp fail.
  • manifest case 2: tex = "tex3d" → "tex2d": the same three fail.
  • in-process case 0 (1D UAV) dropped: startup_compute_dispatch_native_hardware and _warp fail.
  • native srv_dimension assignment dropped: startup_compute_dispatch_native_hardware fails.
  • texture_input accepting any SRV dimension: not caught.

Evidence and follow-up

Fixtures are source-built with the same generators as the existing dispatch checks. Not covered: a refusal case for a non-2D texture SRV on the in-process route; in-process fixtures for four-channel float 2D and half4 1D, 2D-array and 3D; manifest lines for half4_texture_uav at dimensions 0 and 2; the copy_token path for descriptor increments above 32 bytes, which is not exercised if both adapters report 32 (not logged). The matched original-program comparison asked for in #3049 (same cache and inputs, with and without this branch) is next.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • No application files, dumps, distribution links or secrets included.

…te route

Takes over R0Y00#3049, which carried R0Y00#2975 and R0Y00#2993, onto current main.

- In-process route: four-channel float texture UAVs in 1D, 2D and 2D-array and packed half4
  texture UAVs in 1D, 2D, 2D-array and 3D, next to main's exact-width channels (R0Y00#3243); exact-width
  kinds outside 2D, 2D-array and 3D are refused instead of bound as 2D; native 2D texture inputs
  set srv_dimension (R0Y00#3306); an adapter below shader model 6.6 is refused by name.
- C++ manifest: texture_uav and half4_texture_uav at dimension 0 publish tex1d, half4_texture_uav
  at dimension 2 publishes tex3d; other dimensions keep R0Y00#3268's refusal.
- On the published route a PSO failure stays the reason, with the adapter's wave32 or shader model
  shortfall beside it.
- Fixtures use the adapter's descriptor increment, accept revision.txt in the cache, and cover the
  zero-W, 1D, 2D-array and half4 cases.

Co-authored-by: sydney-0o <215686885+sydney-0o@users.noreply.github.com>

@KelboLive KelboLive left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean, well-tested.

Adds 1D, 2D, 2D-array, and 3D four-channel float / half4 texture UAV support to the native compute dispatch path. Manifest formatter emits tex1d/tex2d/tex3d/tex2da lines; dispatch stub resolves dimensions, validates UAV shape, and checks format support. New adapter capability helpers (wave32, shader model 6.6) with descriptive refusal messages. Test fixture covers table views with volume inputs, sampler/zero-WSize controls, and texture outputs (line, array, packed D16). Docs updated throughout.

Ready to land.

@KelboLive KelboLive left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean extension of the native compute dispatch path with proper capability checks.

Binds 1D, 2D, 2D-array, and 3D four-channel float and half4 texture UAVs in the in-process route. Manifest formatter now emits tex1d/tex2d/tex3d/tex2da with a switch over image_dimension. Capability checks (adapter_32_lane_waves, adapter_reports_shader_model_below_6_6) are factored out with better refusal messages for published PSO failures.

Table views fixture exercises volume with texture input, sampler control, and zero-WSize control. Texture outputs cover 1D float, 2D-array float, and packed D16 stores. Consumer supports packed guest tables with descriptor increment. Documentation updated accurately.

Ready to land.

@KelboLive KelboLive left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — expands native compute to bind 2D texture inputs and four-channel float / packed half4 texture outputs (1D, 2D, 2D-array, 3D).

Manifest formatter now uses a switch for UAV dimension names instead of the inline ternary. Runtime reader handles tex1d/tex2d/tex2da/tex3d float channels 4. In-process path binds 2D texture SRV inputs, four-channel and exact-width float UAV outputs with proper dimension mapping, and checks shader model 6.6 + wave32 via extracted helper functions. Pipeline creation failure appends adapter capability notes.

New test fixture covers table views (volume with texture input, sampler control, zero WSize), texture outputs (1D float, 2D-array float, packed D16), and capability refusals. Manifest reasons test verifies all dimension/channel combinations.

Documentation updated for the expanded binding set and new fixture.

@KelboLive KelboLive left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — expands native compute to bind 2D texture inputs and four-channel float / packed half4 texture outputs (1D, 2D, 2D-array, 3D).

Manifest formatter now uses a switch for UAV dimension names instead of the inline ternary. Runtime reader handles tex1d/tex2d/tex2da/tex3d float channels 4. In-process path binds 2D texture SRV inputs, four-channel and exact-width float UAV outputs with proper dimension mapping, and checks shader model 6.6 + wave32 via extracted helper functions. Pipeline creation failure appends adapter capability notes.

New test fixture covers table views (volume with texture input, sampler control, zero WSize), texture outputs (1D float, 2D-array float, packed D16), and capability refusals. Manifest reasons test verifies all dimension/channel combinations.

Documentation updated for the expanded binding set and new fixture.

@tedin7 tedin7 left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows check of head dfd8cb2 (dev and release, --regex 'compute_dispatch_(native|texture)|native_compute_manifest_reasons|startup_stream_consumer'): 4 of 10 selected tests failed. Two of them (startup_compute_dispatch_native_warp and _hardware) also fail on current main without this PR, so they are not caused by it. The two texture_native failures remain.

  • startup_compute_dispatch_texture_native_warp and startup_compute_dispatch_texture_native_hardware: AssertionError: ('volume', 64) from tests/startup_compute_dispatch_texture_check.py line 612.
  • startup_compute_dispatch_native_warp and startup_compute_dispatch_native_hardware: AssertionError: word=0 got=c5c5c5c5 expected=00000400 (288 words differ) in tests/startup_compute_dispatch_native_check.py.
  • native_compute_manifest_reasons passed.

Please check these three on a fresh build of the head. We did not compare against main for this report.

AI-assisted; commands listed were executed locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants