Fix the translator review's findings: moved color writes, cubic refusals, bicubic inferences
The translator review's work packet: a moved color write that stores nothing selects no depth or
stencil tests (with the format components it needs generated), a cubic sampler word Metal's bicubic
filter is not measured under is refused when planning, and the extended-range bicubic reading lists
its inferences.
Generate each Vulkan format's color components into its texel block:
vk::FormatBlock gains color_components: the R, G, B and A components the registry's <format>
names for the format (empty for a depth or stencil format), which a color write mask's bits name.
Vulkan writes nothing to a component the mask leaves out or the format lacks, so a plain color
attachment's write stores something exactly where its mask intersects these components; the
binder needs that to decide whether a moved writer stores anything (next part). The data comes
from the pinned registry (Vulkan-Headers vulkan-sdk-1.4.341.0) through
scripts/regen-vk-types: format_blocks reads each format's component names, render_format_blocks
writes them as `components [R G B A]`, and vk_format_blocks! builds the flags in const context.
No hand table.
Verified: the generator's unit tests pass (python3 -m unittest discover -s scripts/regen-vk-types,
9 tests, the FormatBlock expectations updated for the new column); regen_vk_types.py --check
against the pinned registry (SHA-256 verified by the script) reports generated.rs current; the
crate builds and its suites run on homelab-gem10 (with the next parts).
Select no depth or stencil tests for a moved color write that stores nothing:
What: the interlocked storage form's plan counted a moved color's write as a
store under any write mask, and the binder's moved-writer fallback
(RuntimeFact::MovableStorageWrites) ignored the pipeline's write mask. A moved
writer whose mask covers none of its attachment's channels (a depth prepass, a
stencil mask with discard) therefore had depth and stencil tests chosen for a
write that stores nothing: a slower variant, or a refusal under
FragmentTests::Any, a non-D32 depth format or a stencil-only test, and the
runtime then split the pass or ended the shadow. A declared but unused
[[color(n)]] input that is written reached the same path.
Why and how: whether a write stores is decided from the pipeline's state, the
same rule StorageView::stores_nothing applies to the storage view. fetch.rs
counts a write as storing only when its view stores something (the moved
override is gone), and bind/graphics.rs moves a color only when its ordinary
attachment state's write mask meets the format's color components
(vk::FormatBlock::color_components, generated in the previous part). The
MovableStorageWrites and module docs say so, including that a moved plain
writer takes its tests from MovableStorageWrites.
New fixture engine/smw_unread (our MSL, compiled by scripts/regen-air-fixtures
with Metal 32023.921, SDK 27.0) declares a color input it never reads; its
expectations rows and air_input printout are added.
SEMANTICS_VERSION 1694: binding-plan facts and variant choices change for
mask-none moved writers. RUNTIME_VERSION 1190: a run of such a pipeline no
longer selects tests, splits the pass or ends the shadow.
Verified:
- New CPU tests in tests::engine_moved_writers, run before the fix (debug,
homelab-gem10): a_moved_writer_that_stores_nothing_selects_no_tests failed,
864 states on 12 profiles: 96 refused (Any), 384 selected tests, 480 asked
for a variant that states a store before its tests;
an_unread_color_input_that_stores_nothing_selects_no_tests failed, 72 draws:
12 stated a store before the tests, 48 asked for a variant, 12 refused (Any).
Both pass with the fix, and the existing moved-writer test still passes.
- runtime_lane::moved_writers gains a write-mask-none case. Release,
--cfg m2v_gpu, on AMD Radeon 780M (RADV PHOENIX, Mesa 26.2.4) at the tree
rebased on fleet/round: all 9 cases keep Metal's answer in the pixel
interlock with the shadow held; the masked case counted 12 runs.
- Golden hashes are left stale for the round's single bless.
No hot-path loop is added (one write-mask check per color per plan), so no
release translation timing was taken.
Refuse a cubic sampler word Metal's bicubic filter is not measured under when planning:
What: a runtime sampler whose min or mag filter is Cubic, bound at an
extended-range slot, makes the plan name the cubic-sampler variant
(VariantKey::cubic_samplers) for any word. A word with a mip filter,
anisotropy or another reduction (or an unnamed border color, or a
MirrorClampToEdge axis) is one the variant's function always refuses
(lower::sampler::bicubic's cubic_state and check), so the refusal arrived only
after a variant compile, and since the runtime keeps only compiled variants,
every draw under that word translated the variant again.
Why and how: metal::bicubic::runtime_cubic_measured states the words Metal's
bicubic filter is measured under, whatever the function samples: no mip
filter, isotropic, the weighted-average reduction, a border color Metal names,
and address modes the bicubic readings cover. bind::plan::slots::cubic_variant
now refuses any other bound cubic word with
NotImplemented(SamplerBicubicFilter), the class the variant's compile gives,
so graphics and compute plans refuse the draw before any variant.
cubic_state applies the same rule first, so the binder and the lowering
cannot drift; the state it builds is therefore always mip-filter none,
isotropic, weighted average.
SEMANTICS_VERSION 1695: a plan for such a word is now a refusal instead of a
variant request. RUNTIME_VERSION 1191: a draw under such a word is refused at
planning, with no variant compile.
Verified (debug, homelab-gem10):
- New test tests::engine_extended_range::bicubic::
an_unmeasured_cubic_sampler_is_refused_before_any_variant (mip filter
Nearest, max anisotropy 4, reduction Minimum, at BGRA10_XR,
RGB10A8_2P_XR10 and RGBA8Unorm, on every committed profile) failed before
the fix: the plan named the variant with cubic_samplers {sampler 0: 8}. It
passes with the fix; a device without sampler anisotropy refuses the
anisotropic word earlier with SamplerAnisotropy, which the test counts and
requires to leave other refusals.
- The extended-range bicubic tests and runtime_lane::extended_range_bicubic
(release, --cfg m2v_gpu, AMD Radeon 780M, RADV PHOENIX, Mesa 26.2.4) pass.
- Golden hashes are left stale for the round's single bless.
No hot-path loop is added (one predicate per bound cubic sampler per plan),
so no release translation timing was taken.
List the inferences in the extended-range formats' bicubic reading:
What: lower/sampler/extended.rs states Metal's bicubic reading on the
extended-range formats as one paragraph, without saying which parts no reading
of those formats covers. bicubic.rs keeps such an "except inferences" list for
its own formats; this adds the same list here: a runtime Cubic sampler with a
non-Cubic other filter; a runtime sampler under another address mode, a border
color or pixel coordinates; a half result outside clamp to edge; explicit
level, bias, gradient and fragment implicit-level samples; and textures of more
than one level. Each is the other formats' reading carried to these formats'
decoded taps.
Why: a reviewer of the extended-range bicubic work asked for the inferences to
be named where a reader of the module meets them. No Metal measurement was
taken for this change.
Verified: documentation only (a module comment); cargo fmt --all is clean and
the translator suite passes at the branch tip (see the branch's last commit).
Versions: SEMANTICS_VERSION 1694 -> 1695 and RUNTIME_VERSION 1200 -> 1202. SEMANTICS_VERSION and
RUNTIME_VERSION move: translated modules and their planned refusals change under unchanged keys.
crates/metal2vulkan-validation/runtime-sources.sha256 holds
a090937f1eca50599031bb56159f5d0ece5b30d133251621f54fc645dc4f167a, the hash of this tree's runtime
inputs (runtime-pin.py, which reproduces build.rs's). Version numbers quoted above are the values
the work's branch built with. Each part's Verified lines name the tree it ran at.
This commit is contained in:
1 parent
f25dfd8ea2
commit
4079f17441
26 files changed
+1138
-451
No files matched your search
@@ -223,6 +223,7 @@ fixture seq_programs: metal: Apple metal version 32023.921 (metalfe-32023.921.6)
|
||||
fixture smp_constexpr_array: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture smp_runtime_array: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture smp_shared_sampler: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture smw_unread: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture smw_writers: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture spc_bool_index: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
fixture spc_num_samples: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425)
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
; Generated by scripts/regen-air-fixtures from smw_unread.metal (typed pointers; xcrun metal-as reassembles it). Do not edit.
|
||||
; ModuleID = '-'
|
||||
source_filename = "-"
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32"
|
||||
target triple = "air64_v29-apple-macosx27.0.0"
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
define <4 x half> @smw_unread(<4 x float> noundef %0, <4 x half> noundef %1, <4 x half> addrspace(2)* nocapture noundef readonly align 8 dereferenceable(8) "air-buffer-no-alias" %2) local_unnamed_addr #0 {
|
||||
%4 = extractelement <4 x float> %0, i64 0
|
||||
%5 = tail call i32 @air.convert.u.i32.f.f32(float %4) #3
|
||||
%6 = and i32 %5, 3
|
||||
%7 = icmp eq i32 %6, 0
|
||||
br i1 %7, label %8, label %9
|
||||
|
||||
8: ; preds = %3
|
||||
tail call void @air.discard_fragment() #4
|
||||
br label %9
|
||||
|
||||
9: ; preds = %8, %3
|
||||
%10 = load <4 x half>, <4 x half> addrspace(2)* %2, align 8, !tbaa !22, !alias.scope !26
|
||||
ret <4 x half> %10
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn
|
||||
declare i32 @air.convert.u.i32.f.f32(float) local_unnamed_addr #1
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
declare void @air.discard_fragment() local_unnamed_addr #2
|
||||
|
||||
attributes #0 = { mustprogress nounwind willreturn "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
|
||||
attributes #1 = { mustprogress nofree nosync nounwind readnone willreturn }
|
||||
attributes #2 = { mustprogress nounwind willreturn }
|
||||
attributes #3 = { nounwind readnone willreturn }
|
||||
attributes #4 = { nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!air.fragment = !{!9}
|
||||
!air.compile_options = !{!16, !17, !18}
|
||||
!llvm.ident = !{!19}
|
||||
!air.version = !{!20}
|
||||
!air.language_version = !{!21}
|
||||
|
||||
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]}
|
||||
!1 = !{i32 1, !"wchar_size", i32 4}
|
||||
!2 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!3 = !{i32 7, !"air.max_device_buffers", i32 31}
|
||||
!4 = !{i32 7, !"air.max_constant_buffers", i32 31}
|
||||
!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31}
|
||||
!6 = !{i32 7, !"air.max_textures", i32 128}
|
||||
!7 = !{i32 7, !"air.max_read_write_textures", i32 8}
|
||||
!8 = !{i32 7, !"air.max_samplers", i32 16}
|
||||
!9 = !{<4 x half> (<4 x float>, <4 x half>, <4 x half> addrspace(2)*)* @smw_unread, !10, !12}
|
||||
!10 = !{!11}
|
||||
!11 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"half4"}
|
||||
!12 = !{!13, !14, !15}
|
||||
!13 = !{i32 0, !"air.position", !"air.center", !"air.no_perspective", !"air.arg_type_name", !"float4", !"air.arg_name", !"p"}
|
||||
!14 = !{i32 1, !"air.render_target", i32 0, !"air.arg_type_name", !"half4", !"air.arg_name", !"unread", !"air.arg_unused"}
|
||||
!15 = !{i32 2, !"air.buffer", !"air.buffer_size", i32 8, !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"half4", !"air.arg_name", !"tint"}
|
||||
!16 = !{!"air.compile.denorms_disable"}
|
||||
!17 = !{!"air.compile.fast_math_disable"}
|
||||
!18 = !{!"air.compile.framebuffer_fetch_enable"}
|
||||
!19 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"}
|
||||
!20 = !{i32 2, i32 9, i32 0}
|
||||
!21 = !{!"Metal", i32 4, i32 1, i32 0}
|
||||
!22 = !{!23, !23, i64 0}
|
||||
!23 = !{!"half", !24, i64 0}
|
||||
!24 = !{!"omnipotent char", !25, i64 0}
|
||||
!25 = !{!"Simple C++ TBAA"}
|
||||
!26 = !{!27}
|
||||
!27 = distinct !{!27, !28, !"air-alias-scope-arg(2)"}
|
||||
!28 = distinct !{!28, !"air-alias-scopes(smw_unread)"}
|
||||
@@ -0,0 +1,71 @@
|
||||
; Generated by scripts/regen-air-fixtures from smw_unread.metal (llvm-dis of smw_unread.air). Do not edit.
|
||||
; ModuleID = '<stdin>'
|
||||
source_filename = "-"
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32"
|
||||
target triple = "air64_v29-apple-macosx27.0.0"
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
define <4 x half> @smw_unread(<4 x float> noundef %0, <4 x half> noundef %1, ptr addrspace(2) noundef readonly align 8 captures(none) dereferenceable(8) "air-buffer-no-alias" %2) local_unnamed_addr #0 {
|
||||
%4 = extractelement <4 x float> %0, i64 0
|
||||
%5 = tail call i32 @air.convert.u.i32.f.f32(float %4) #3
|
||||
%6 = and i32 %5, 3
|
||||
%7 = icmp eq i32 %6, 0
|
||||
br i1 %7, label %8, label %9
|
||||
|
||||
8: ; preds = %3
|
||||
tail call void @air.discard_fragment() #4
|
||||
br label %9
|
||||
|
||||
9: ; preds = %8, %3
|
||||
%10 = load <4 x half>, ptr addrspace(2) %2, align 8, !tbaa !22, !alias.scope !26
|
||||
ret <4 x half> %10
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
|
||||
declare i32 @air.convert.u.i32.f.f32(float) local_unnamed_addr #1
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
declare void @air.discard_fragment() local_unnamed_addr #2
|
||||
|
||||
attributes #0 = { mustprogress nounwind willreturn "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
|
||||
attributes #1 = { mustprogress nofree nosync nounwind willreturn memory(none) }
|
||||
attributes #2 = { mustprogress nounwind willreturn }
|
||||
attributes #3 = { nounwind willreturn memory(none) }
|
||||
attributes #4 = { nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!air.fragment = !{!9}
|
||||
!air.compile_options = !{!16, !17, !18}
|
||||
!llvm.ident = !{!19}
|
||||
!air.version = !{!20}
|
||||
!air.language_version = !{!21}
|
||||
|
||||
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]}
|
||||
!1 = !{i32 1, !"wchar_size", i32 4}
|
||||
!2 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!3 = !{i32 7, !"air.max_device_buffers", i32 31}
|
||||
!4 = !{i32 7, !"air.max_constant_buffers", i32 31}
|
||||
!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31}
|
||||
!6 = !{i32 7, !"air.max_textures", i32 128}
|
||||
!7 = !{i32 7, !"air.max_read_write_textures", i32 8}
|
||||
!8 = !{i32 7, !"air.max_samplers", i32 16}
|
||||
!9 = !{ptr @smw_unread, !10, !12}
|
||||
!10 = !{!11}
|
||||
!11 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"half4"}
|
||||
!12 = !{!13, !14, !15}
|
||||
!13 = !{i32 0, !"air.position", !"air.center", !"air.no_perspective", !"air.arg_type_name", !"float4", !"air.arg_name", !"p"}
|
||||
!14 = !{i32 1, !"air.render_target", i32 0, !"air.arg_type_name", !"half4", !"air.arg_name", !"unread", !"air.arg_unused"}
|
||||
!15 = !{i32 2, !"air.buffer", !"air.buffer_size", i32 8, !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"half4", !"air.arg_name", !"tint"}
|
||||
!16 = !{!"air.compile.denorms_disable"}
|
||||
!17 = !{!"air.compile.fast_math_disable"}
|
||||
!18 = !{!"air.compile.framebuffer_fetch_enable"}
|
||||
!19 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"}
|
||||
!20 = !{i32 2, i32 9, i32 0}
|
||||
!21 = !{!"Metal", i32 4, i32 1, i32 0}
|
||||
!22 = !{!23, !23, i64 0}
|
||||
!23 = !{!"half", !24, i64 0}
|
||||
!24 = !{!"omnipotent char", !25, i64 0}
|
||||
!25 = !{!"Simple C++ TBAA"}
|
||||
!26 = !{!27}
|
||||
!27 = distinct !{!27, !28, !"air-alias-scope-arg(2)"}
|
||||
!28 = distinct !{!28, !"air-alias-scopes(smw_unread)"}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Owned fixture: a writer of color 0 that declares color 0 as an input it never reads, and whose
|
||||
// discard alone keeps it from early fragment tests. On a device that orders fetch through the
|
||||
// pixel interlock, the declared input puts color 0 in the interlocked storage form though the
|
||||
// function reads nothing there; the write it returns to color 0 is then a storage write made
|
||||
// before the depth and stencil tests, and one under a write mask that covers no channel stores
|
||||
// nothing. It returns `tint` (buffer 0) and discards the fragments of every fourth column (`x` in
|
||||
// `[4k, 4k + 1)`), as `smw_writers`' `smw_discard` does. Loop-free.
|
||||
// metal-fast-math: off
|
||||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
|
||||
fragment half4 smw_unread(float4 p [[position]], half4 unread [[color(0)]],
|
||||
constant half4 &tint [[buffer(0)]]) {
|
||||
if ((uint(p.x) & 3u) == 0u) {
|
||||
discard_fragment();
|
||||
}
|
||||
return tint;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
d495df50a3dff8090fad17ec55742a34374aa6c32544cacd63fd9c497e64d0b1
|
||||
a090937f1eca50599031bb56159f5d0ece5b30d133251621f54fc645dc4f167a
|
||||
@@ -19,14 +19,19 @@
|
||||
//! where the fragment survives its discard and its tests, the first draw's elsewhere, and
|
||||
//! `smw_store` runs for every fragment it does not discard, those its tests then drop included (12
|
||||
//! of 16). That is Metal's answer to every case, each pixel's codes and the count (read on an Apple
|
||||
//! M3 Max, macOS 26.7, through the same fixture).
|
||||
//! M3 Max, macOS 26.7, through the same fixture). One more case draws `smw_store` under a write mask
|
||||
//! that covers none of the color's channels, which stores nothing: color 0 holds the first draw's
|
||||
//! codes everywhere, as Metal's write mask leaves it (its run count, which no reading covers, is
|
||||
//! printed and not checked).
|
||||
//!
|
||||
//! The path: a device that fetches in the pixel interlock holds the shadow through the second
|
||||
//! draw, whose variant writes it, so the third draw blends onto it and nothing announces
|
||||
//! `extended-range-blends-stored-codes`; a second draw that gave the shadow up would have the
|
||||
//! third announce it. A device with raster-order attachment access (lavapipe) holds no shadow,
|
||||
//! draws each as compiled, and announces the stored codes once, at the first case: the same
|
||||
//! answer.
|
||||
//! answer. The masked writer stores nothing, so no test bears on its write and its draw keeps the
|
||||
//! shadow under tests that may drop fragments, which a writer that stores something does not
|
||||
//! survive (its variant is refused, and the shadow ends).
|
||||
|
||||
use super::degrade_notices::counts;
|
||||
use super::extended_range_blends::STORED_CODES;
|
||||
@@ -35,7 +40,9 @@ use super::resolves::{lane, quiet, Lane};
|
||||
use crate::air_library::AirLibrary;
|
||||
use crate::runtime_lane::{buffer_with, read_buffer};
|
||||
use metal2vulkan::metal::state::DepthStencilDescriptor;
|
||||
use metal2vulkan::metal::{BlendFactor, CompareFunction, PixelFormat, PrimitiveType};
|
||||
use metal2vulkan::metal::{
|
||||
BlendFactor, ColorWriteMask, CompareFunction, PixelFormat, PrimitiveType,
|
||||
};
|
||||
use metal2vulkan::pipeline::{ColorAttachmentDescriptor, RenderPipelineDescriptor, StageSource};
|
||||
use metal2vulkan_devtools::llvm_assemble;
|
||||
use metal2vulkan_runtime::{
|
||||
@@ -67,8 +74,13 @@ fn library(lane: &Lane) -> Library {
|
||||
}
|
||||
|
||||
/// The pipeline of `smw_full` and `fragment` into the pass's attachments, blended premultiplied
|
||||
/// over where `blended`.
|
||||
fn pipeline(lane: &Lane, library: &Library, fragment: &str, blended: bool) -> RenderPipelineState {
|
||||
/// over where `blended`, under a write mask that covers no channel where `masked`.
|
||||
fn pipeline(
|
||||
lane: &Lane,
|
||||
library: &Library,
|
||||
fragment: &str,
|
||||
(blended, masked): (bool, bool),
|
||||
) -> RenderPipelineState {
|
||||
let function = |name| {
|
||||
StageSource::Function(
|
||||
library
|
||||
@@ -85,6 +97,9 @@ fn pipeline(lane: &Lane, library: &Library, fragment: &str, blended: bool) -> Re
|
||||
color.destination_rgb_blend_factor = BlendFactor::OneMinusSourceAlpha;
|
||||
color.destination_alpha_blend_factor = BlendFactor::OneMinusSourceAlpha;
|
||||
}
|
||||
if masked {
|
||||
color.write_mask = ColorWriteMask::NONE;
|
||||
}
|
||||
descriptor.color_attachments[0] = Some(color);
|
||||
descriptor.depth_format = Some(DEPTH);
|
||||
descriptor.stencil_format = Some(DEPTH);
|
||||
@@ -114,21 +129,23 @@ fn a_moved_writer_keeps_what_metals_later_tests_drop() {
|
||||
let (messages, cache, lane) = lane();
|
||||
let device = lane.device.name();
|
||||
let library = library(&lane);
|
||||
let first = pipeline(&lane, &library, "smw_plain", true);
|
||||
let first = pipeline(&lane, &library, "smw_plain", (true, false));
|
||||
let mut equal = DepthStencilDescriptor::default();
|
||||
for face in [&mut equal.front_face_stencil, &mut equal.back_face_stencil] {
|
||||
face.stencil_compare_function = CompareFunction::Equal;
|
||||
}
|
||||
// The case, the second draw's writer, its state and reference, and whether its tests pass
|
||||
// the fragments (each in a column but 0).
|
||||
// The case, the second draw's writer, its state and reference, whether it stores the
|
||||
// fragments (each in a column but 0): its tests pass them and its mask writes the color, and
|
||||
// whether its mask covers no channel.
|
||||
let cases = [
|
||||
("no state", "smw_discard", None, 0, true),
|
||||
("no state", "smw_discard", None, 0, true, false),
|
||||
(
|
||||
"depth less, unwritten",
|
||||
"smw_discard",
|
||||
Some(depth(CompareFunction::Less, false)),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
),
|
||||
(
|
||||
"depth greater, unwritten",
|
||||
@@ -136,6 +153,7 @@ fn a_moved_writer_keeps_what_metals_later_tests_drop() {
|
||||
Some(depth(CompareFunction::Greater, false)),
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
(
|
||||
"depth less, written",
|
||||
@@ -143,6 +161,7 @@ fn a_moved_writer_keeps_what_metals_later_tests_drop() {
|
||||
Some(depth(CompareFunction::Less, true)),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
),
|
||||
(
|
||||
"stencil equal, failing",
|
||||
@@ -150,6 +169,7 @@ fn a_moved_writer_keeps_what_metals_later_tests_drop() {
|
||||
Some(equal),
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
(
|
||||
"stencil equal, passing",
|
||||
@@ -157,6 +177,7 @@ fn a_moved_writer_keeps_what_metals_later_tests_drop() {
|
||||
Some(equal),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
),
|
||||
(
|
||||
"counting, depth greater, unwritten",
|
||||
@@ -164,6 +185,7 @@ fn a_moved_writer_keeps_what_metals_later_tests_drop() {
|
||||
Some(depth(CompareFunction::Greater, false)),
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
(
|
||||
"counting, depth less, written",
|
||||
@@ -171,11 +193,20 @@ fn a_moved_writer_keeps_what_metals_later_tests_drop() {
|
||||
Some(depth(CompareFunction::Less, true)),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
),
|
||||
(
|
||||
"counting, write mask none, depth greater, unwritten",
|
||||
"smw_store",
|
||||
Some(depth(CompareFunction::Greater, false)),
|
||||
0,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
];
|
||||
let mut stored_codes = 0;
|
||||
for (case, writer, ds, reference, passes) in cases {
|
||||
let second = pipeline(&lane, &library, writer, false);
|
||||
for (case, writer, ds, reference, passes, masked) in cases {
|
||||
let second = pipeline(&lane, &library, writer, (false, masked));
|
||||
let target = lane.single(COLOR);
|
||||
let depth_texture = lane.single(DEPTH);
|
||||
let mut pass = RenderPassDescriptor::new();
|
||||
@@ -241,7 +272,10 @@ fn a_moved_writer_keeps_what_metals_later_tests_drop() {
|
||||
stored_codes += notices.get(&STORED_CODES[0]).copied().unwrap_or(0);
|
||||
if writer == "smw_store" {
|
||||
let counted = u32::from_le_bytes(read_buffer(&runs, 0, 4).unwrap().try_into().unwrap());
|
||||
assert_eq!(counted, 12, "{case}: the runs counted on {device}");
|
||||
match masked {
|
||||
true => eprintln!("{case}: {counted} runs counted on {device}"),
|
||||
false => assert_eq!(counted, 12, "{case}: the runs counted on {device}"),
|
||||
}
|
||||
}
|
||||
eprintln!(
|
||||
"moved writer, {case}, on {device} {}: Metal's answer",
|
||||
|
||||
@@ -102,8 +102,12 @@
|
||||
//! - **Interlocked colors**. A draw into a render pass instance that leaves color attachments out
|
||||
//! of its subpass for other draws' interlocked storage form (`BindShape::interlocked_colors`)
|
||||
//! runs the variant whose fragment function writes those it writes through that form too
|
||||
//! (`VariantKey::interlocked_colors`), so the draw records in the instance. A mesh pipeline's is
|
||||
//! not implemented, nor a multisampled, layered or amplified draw's.
|
||||
//! (`VariantKey::interlocked_colors`), so the draw records in the instance. That variant stores
|
||||
//! them before the depth and stencil tests (tested storage writes, below), and so does the
|
||||
//! variant of a draw that holds the `half` shadow of an extended-range color the function writes
|
||||
//! (`BindShape::extended_shadows`): the plan of the pipeline as compiled selects such a moved
|
||||
//! writer's tests from `RuntimeFact::MovableStorageWrites`. A mesh pipeline's is not
|
||||
//! implemented, nor a multisampled, layered or amplified draw's.
|
||||
//! - **Depth clamp range**. A draw in depth clamp mode through a range above 0 whose Vulkan depth
|
||||
//! clamp holds 0 (`BindShape::depth_clamp_range`) runs the variant whose fragment function, where
|
||||
//! it writes its depth, clamps that depth to the draw's range itself
|
||||
@@ -120,13 +124,17 @@
|
||||
//! depth, stencil, or a sample mask, states the fact without that variant (`early_variant`): a
|
||||
//! draw whose tests drop no fragment runs it as compiled, and any other is
|
||||
//! `NotImplemented(FramebufferFetch)` at the depth attachment (the stencil one where the pipeline
|
||||
//! has no depth attachment). (A draw whose depth test alone acts, `Depth`, runs the variant whose
|
||||
//! function runs it itself, `VariantKey::shader_tests`, unless it writes nothing and the
|
||||
//! early-tests variant serves it; one whose stencil test acts and whose tests write, `Stencil`,
|
||||
//! or a `Drop` draw of a function without the early-tests variant, runs the variant whose
|
||||
//! function runs both, `VariantKey::shader_stencil`, in a pass with a depth and a stencil
|
||||
//! attachment; a pass with a stencil attachment alone is `NotImplemented(FramebufferFetch)` at
|
||||
//! it.)
|
||||
//! has no depth attachment). A draw that moves a color the function writes as an ordinary output
|
||||
//! into the storage form (interlocked colors, above) takes its tests alike from
|
||||
//! `RuntimeFact::MovableStorageWrites`, which states the `early_variant` the moved writer's
|
||||
//! variant states, where the pipeline as compiled states no `TestedStorageWrites`; a moved write
|
||||
//! whose mask names none of the attachment's components stores nothing, and takes no tests. (A
|
||||
//! draw whose depth test alone acts, `Depth`, runs the variant whose function runs it itself,
|
||||
//! `VariantKey::shader_tests`, unless it writes nothing and the early-tests variant serves it;
|
||||
//! one whose stencil test acts and whose tests write, `Stencil`, or a `Drop` draw of a function
|
||||
//! without the early-tests variant, runs the variant whose function runs both,
|
||||
//! `VariantKey::shader_stencil`, in a pass with a depth and a stencil attachment; a pass with a
|
||||
//! stencil attachment alone is `NotImplemented(FramebufferFetch)` at it.)
|
||||
//! - **Capture form**. A pipeline compiled under `VariantKey::captured_positions`
|
||||
//! (`RuntimeFact::CapturedPositions`), which a consumer asks for and no bind shape does, plans
|
||||
//! its own variant. Its draws leave `PushHole::CaptureAddress` to the consumer (the first
|
||||
@@ -741,6 +749,16 @@ fn vertex_layer(p: &RenderPipeline) -> Option<bool> {
|
||||
})
|
||||
}
|
||||
|
||||
/// Whether a draw's write to the ordinary color attachment of state `a` stores something: its
|
||||
/// mask names some of the format's color components (Vulkan writes nothing to a component the
|
||||
/// mask leaves out, nor to one the format lacks), as the storage form's write stores something
|
||||
/// where its mask covers some of the format's channels (`StorageView::stores_nothing`).
|
||||
fn stores(a: crate::pipeline::graphics::ColorAttachmentState) -> bool {
|
||||
a.format
|
||||
.block()
|
||||
.is_some_and(|b| a.write_mask.intersects(b.color_components))
|
||||
}
|
||||
|
||||
fn plan(p: &RenderPipeline, device: &Device, shape: &BindShape) -> Result<BindingPlan, BindError> {
|
||||
check_slots(shape)?;
|
||||
let records = p.graphics.mesh_records.as_ref();
|
||||
@@ -985,17 +1003,26 @@ fn plan(p: &RenderPipeline, device: &Device, shape: &BindShape) -> Result<Bindin
|
||||
// pipeline with a depth or stencil attachment: Metal's store, as compiled, where the draw's
|
||||
// tests drop no fragment; where they drop some but write and count nothing, the variant whose
|
||||
// function declares early tests, which a pipeline compiled under it states; refused
|
||||
// otherwise. A draw that moves a color the function writes into that form (an interlocked
|
||||
// color, a shadowed extended-range one) asks for the variant that stores it so: where the
|
||||
// pipeline as compiled stores no color so, the function states that variant's tests
|
||||
// (`RuntimeFact::MovableStorageWrites`), so this plan selects them, and the variant it names
|
||||
// plans itself.
|
||||
// otherwise. A draw that moves a color the function writes as an ordinary output into that
|
||||
// form (an interlocked color, a shadowed extended-range one) asks for the variant that stores
|
||||
// it so: where the pipeline as compiled stores no color so, the function states that variant's
|
||||
// tests (`RuntimeFact::MovableStorageWrites`), so this plan selects them, and the variant it
|
||||
// names plans itself. A moved write whose mask names none of its attachment's components
|
||||
// stores nothing, so no test bears on it: its variant states none, and this plan selects none
|
||||
// for it. (A color the pipeline as compiled already writes through the storage form has no
|
||||
// ordinary attachment state; its stores state their own tests.)
|
||||
let moves = interlocked_colors
|
||||
.iter()
|
||||
.chain(&extended_shadows)
|
||||
.any(|&c| {
|
||||
1u32.checked_shl(c)
|
||||
.is_some_and(|bit| p.graphics.color_outputs & bit != 0)
|
||||
&& p.graphics
|
||||
.color_attachments
|
||||
.get(c as usize)
|
||||
.copied()
|
||||
.flatten()
|
||||
.is_some_and(stores)
|
||||
});
|
||||
let tested = p
|
||||
.dependencies
|
||||
@@ -1906,7 +1933,7 @@ fn plan(p: &RenderPipeline, device: &Device, shape: &BindShape) -> Result<Bindin
|
||||
variant.srgb_textures = srgb_variant(&p.dependencies, shape, &variant.cross_class);
|
||||
variant.ycbcr_textures = ycbcr_variant(&p.dependencies, shape);
|
||||
variant.address_maps = address_map_variant(&p.dependencies, shape);
|
||||
variant.cubic_samplers = cubic_variant(&p.dependencies, shape);
|
||||
variant.cubic_samplers = cubic_variant(&p.dependencies, shape)?;
|
||||
variant.anisotropic_samplers = anisotropic_variant(&p.dependencies, shape);
|
||||
// A layout the variant newly pulls is read through a `Whole` storage slot, which declares
|
||||
// `BufferRangeLimit`: the variant's pipeline would ask for its device address when the bound
|
||||
|
||||
@@ -781,7 +781,7 @@ fn plan(p: &ComputePipeline, device: &Device, shape: &BindShape) -> Result<Bindi
|
||||
variant.srgb_textures = srgb_variant(&p.dependencies, shape, &variant.cross_class);
|
||||
variant.ycbcr_textures = ycbcr_variant(&p.dependencies, shape);
|
||||
variant.address_maps = address_map_variant(&p.dependencies, shape);
|
||||
variant.cubic_samplers = cubic_variant(&p.dependencies, shape);
|
||||
variant.cubic_samplers = cubic_variant(&p.dependencies, shape)?;
|
||||
variant.anisotropic_samplers = anisotropic_variant(&p.dependencies, shape);
|
||||
// A pipeline compiled for emulated simdgroups states its variant; a dispatch asks for it where
|
||||
// the flattened tiers cannot run its threadgroups (`dispatch_variant`).
|
||||
|
||||
@@ -1695,7 +1695,9 @@ impl ResourcePlanner<'_> {
|
||||
/// form's under every mode, measured). An unbound slot's word is 0, a nearest sampler's. A word
|
||||
/// that states a `Cubic` filter is the plan's cubic-sampler variant's
|
||||
/// (`VariantKey::cubic_samplers`), whose function samples through Metal's bicubic filter of its
|
||||
/// state and refuses what that filter's checks refuse (`lower::sampler::extended`).
|
||||
/// state: the plan refuses a word whose state that filter is not measured under before it names
|
||||
/// the variant (`slots::cubic_variant`), and the variant's function refuses what else the
|
||||
/// filter's checks refuse for its sample (`lower::sampler::extended`).
|
||||
fn extended_sampler(&self, slot: SlotRef) -> Result<(), BindError> {
|
||||
let word = self
|
||||
.stage_shape(slot.stage)
|
||||
|
||||
@@ -369,11 +369,15 @@ pub(crate) fn address_map_variant(
|
||||
/// at which `shape` binds a sampler whose min or mag filter is `Cubic`, each with the bound word
|
||||
/// masked by `SamplerWord::CUBIC_STATE`: the plan's `VariantKey::cubic_samplers`. Metal samples
|
||||
/// through such a sampler with its bicubic filter of that state (EV GSM2-bcs2-m4). The variant's
|
||||
/// compile states the same facts, so its plan for the same shape states the same key.
|
||||
/// compile states the same facts, so its plan for the same shape states the same key. A bound
|
||||
/// word whose state the bicubic filter is not measured under, whatever the function samples
|
||||
/// (`metal::bicubic::runtime_cubic_measured`: a mip filter, anisotropy, another reduction), is
|
||||
/// `NotImplemented(SamplerBicubicFilter)` here, as the variant's compile would refuse it: the
|
||||
/// draw is refused before any variant is compiled for it.
|
||||
pub(crate) fn cubic_variant(
|
||||
dependencies: &[RuntimeDependency],
|
||||
shape: &BindShape,
|
||||
) -> std::collections::BTreeMap<SlotRef, u32> {
|
||||
) -> Result<std::collections::BTreeMap<SlotRef, u32>, BindError> {
|
||||
use crate::metal::sampler::SamplerWord;
|
||||
dependencies
|
||||
.iter()
|
||||
@@ -386,10 +390,15 @@ pub(crate) fn cubic_variant(
|
||||
.stages
|
||||
.get(&slot.stage)
|
||||
.and_then(|s| s.samplers.get(&slot.index))?;
|
||||
bound
|
||||
.shape
|
||||
.cubic
|
||||
.then_some((slot, bound.word.0 & SamplerWord::CUBIC_STATE))
|
||||
let word = bound.word.0 & SamplerWord::CUBIC_STATE;
|
||||
bound.shape.cubic.then(
|
||||
|| match crate::metal::bicubic::runtime_cubic_measured(word) {
|
||||
true => Ok((slot, word)),
|
||||
false => Err(BindError::Unsupported(Unsupported::not_implemented(
|
||||
Feature::SamplerBicubicFilter,
|
||||
))),
|
||||
},
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -60,7 +60,7 @@ mod tests;
|
||||
/// unchanged version, and its bless records the version. Independent of the crate's version and of
|
||||
/// [`ARTIFACT_FORMAT_VERSION`]. The commit that bumps it says what changed; this comment keeps no
|
||||
/// history.
|
||||
pub const SEMANTICS_VERSION: u32 = 1694;
|
||||
pub const SEMANTICS_VERSION: u32 = 1695;
|
||||
|
||||
/// The byte-layout version of encoded artifacts (`CompiledFunction::to_bytes` and the
|
||||
/// [`PipelineArtifact`] encodings). Every encoded artifact carries it, and a decode under another
|
||||
@@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 399;
|
||||
/// changes no behaviour, and then updates that hash alone with the commit saying why, or changes
|
||||
/// behaviour and also bumps this version. The commit that bumps it says what changed; this comment
|
||||
/// keeps no history.
|
||||
pub const RUNTIME_VERSION: u32 = 1200;
|
||||
pub const RUNTIME_VERSION: u32 = 1202;
|
||||
|
||||
/// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex,
|
||||
/// of the manifest, the build script, and exactly the files the crate roots' module tree compiles
|
||||
|
||||
@@ -925,25 +925,15 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> {
|
||||
// Every other attachment the pipeline's state names that the function writes through its
|
||||
// first output: a color the draw moved into the storage form (above), written through it as a
|
||||
// fetched one is, or one named for Metal's 16-bit float blend alone.
|
||||
let mut moved = BTreeSet::new();
|
||||
if let Some(inputs) = &cx.inputs.framebuffer_fetch {
|
||||
let written: BTreeSet<u32> = outputs
|
||||
.iter()
|
||||
.filter_map(|o| match o.role {
|
||||
OutputRole::RenderTarget {
|
||||
attachment: AbiInt::Const(color),
|
||||
index: 0,
|
||||
..
|
||||
} if inputs.attachments.contains_key(&color) => Some(color),
|
||||
_ => None,
|
||||
})
|
||||
.collect();
|
||||
moved = written
|
||||
.difference(&read)
|
||||
.filter(|c| !inputs.half_blends.contains(c))
|
||||
.copied()
|
||||
.collect();
|
||||
read.extend(written);
|
||||
read.extend(outputs.iter().filter_map(|o| match o.role {
|
||||
OutputRole::RenderTarget {
|
||||
attachment: AbiInt::Const(color),
|
||||
index: 0,
|
||||
..
|
||||
} if inputs.attachments.contains_key(&color) => Some(color),
|
||||
_ => None,
|
||||
}));
|
||||
}
|
||||
if read.is_empty() {
|
||||
return Ok(());
|
||||
@@ -1154,15 +1144,16 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> {
|
||||
if !cx.families.fragment.fetch.is_empty() {
|
||||
cx.families.fragment.fetch_early_tests = early_tests && !declared_early;
|
||||
}
|
||||
// Whether a write stores is the draw's tests' to decide. A moved color's write counts under
|
||||
// any mask: the plan of the pipeline before the move selected its tests from the function
|
||||
// alone (`RuntimeFact::MovableStorageWrites`), and its variant states them alike.
|
||||
// Whether a write stores is the draw's tests' to decide. A write whose mask covers none of
|
||||
// its attachment's channels stores nothing, so no test bears on it: a moved color's neither,
|
||||
// for which the plan of the pipeline before the move selects no tests either
|
||||
// (`RuntimeFact::MovableStorageWrites`).
|
||||
let stores = cx
|
||||
.families
|
||||
.fragment
|
||||
.fetch
|
||||
.iter()
|
||||
.any(|(color, sc)| sc.writes && (!sc.view.stores_nothing() || moved.contains(color)));
|
||||
.values()
|
||||
.any(|sc| sc.writes && !sc.view.stores_nothing());
|
||||
if (tested || untested) && stores {
|
||||
cx.facts.insert(RuntimeFact::TestedStorageWrites {
|
||||
early_tests,
|
||||
|
||||
@@ -229,11 +229,16 @@ pub(super) fn state(r: SamplerRef) -> Result<Option<SamplerState>, Error> {
|
||||
/// lanes, nine formats, every address mode and border color, normalized and pixel coordinates,
|
||||
/// min/mag pairs `(2, 2)`, `(2, 1)`, `(1, 2)`, `(2, 0)` and `(0, 2)`, implicit, explicit and
|
||||
/// gradient levels, bit for bit; through an argument buffer alike). `clamp_to_zero` reads the
|
||||
/// sampler's border color, as a runtime sampler's does. The state is both filters bicubic with the
|
||||
/// word's mip filter, anisotropy, and reduction, which [`check`] refuses where they are not the
|
||||
/// measured ones; `MirrorClampToEdge`, which no bicubic reading covers, is refused here.
|
||||
/// sampler's border color, as a runtime sampler's does. The state is both filters bicubic, without
|
||||
/// a mip filter, isotropic, under the weighted-average reduction: a word that states anything else
|
||||
/// is not measured (a mip filter, anisotropy, another reduction, an unnamed border color, or a
|
||||
/// `MirrorClampToEdge` axis, which no bicubic reading covers), and is refused here by the rule the
|
||||
/// binder refuses it by before it names the variant (`metal::bicubic::runtime_cubic_measured`).
|
||||
pub(super) fn cubic_state(word: u32) -> Result<SamplerState, Error> {
|
||||
use crate::air::abi::{CompareFunction, Coordinates, Half, MipFilter, Reduction};
|
||||
if !crate::metal::bicubic::runtime_cubic_measured(word) {
|
||||
return Err(refuse());
|
||||
}
|
||||
let field = |shift: u32, mask: u32| (word & mask) >> shift;
|
||||
let address = |shift: u32, mask: u32| -> Result<AddressMode, Error> {
|
||||
match SamplerAddressMode::try_from(field(shift, mask)) {
|
||||
@@ -252,20 +257,6 @@ pub(super) fn cubic_state(word: u32) -> Result<SamplerState, Error> {
|
||||
Ok(SamplerBorderColor::OpaqueWhite) => BorderColor::OpaqueWhite,
|
||||
_ => return Err(refuse()),
|
||||
};
|
||||
let mip_filter = match field(SamplerWord::MIP_FILTER_SHIFT, SamplerWord::MIP_FILTER) {
|
||||
0 => MipFilter::None,
|
||||
1 => MipFilter::Nearest,
|
||||
_ => MipFilter::Linear,
|
||||
};
|
||||
let reduction = match field(SamplerWord::REDUCTION_SHIFT, SamplerWord::REDUCTION) {
|
||||
0 => Reduction::WeightedAverage,
|
||||
1 => Reduction::Minimum,
|
||||
_ => Reduction::Maximum,
|
||||
};
|
||||
// A reduction other than the weighted average is not measured through the bicubic filter.
|
||||
if reduction != Reduction::WeightedAverage {
|
||||
return Err(refuse());
|
||||
}
|
||||
let [s_shift, t_shift, r_shift] = SamplerWord::ADDRESS_SHIFT;
|
||||
let [s_mask, t_mask, r_mask] = SamplerWord::ADDRESS;
|
||||
Ok(SamplerState {
|
||||
@@ -274,22 +265,18 @@ pub(super) fn cubic_state(word: u32) -> Result<SamplerState, Error> {
|
||||
address_r: address(r_shift, r_mask)?,
|
||||
mag_filter: Filter::Bicubic,
|
||||
min_filter: Filter::Bicubic,
|
||||
mip_filter,
|
||||
mip_filter: MipFilter::None,
|
||||
coordinates: if word & SamplerWord::PIXEL_COORDINATES != 0 {
|
||||
Coordinates::Pixel
|
||||
} else {
|
||||
Coordinates::Normalized
|
||||
},
|
||||
compare: CompareFunction::Never,
|
||||
max_anisotropy: if word & SamplerWord::ANISOTROPIC != 0 {
|
||||
2
|
||||
} else {
|
||||
1
|
||||
},
|
||||
max_anisotropy: 1,
|
||||
lod_min_clamp: Half(0),
|
||||
lod_max_clamp: Half(0),
|
||||
border_color,
|
||||
reduction,
|
||||
reduction: Reduction::WeightedAverage,
|
||||
lod_bias: Half(0),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -55,6 +55,24 @@
|
||||
//! bfloat or padded form's bicubic sample, a gather through a bicubic sampler, and a swizzled
|
||||
//! texture's bicubic sample are not measured, and are refused.
|
||||
//!
|
||||
//! The bicubic paragraph above is Metal's reading on these formats, except inferences, each the
|
||||
//! other formats' bicubic reading (`bicubic`; EV GSM2-bcs2-m4 for a runtime sampler) carried to
|
||||
//! these formats' decoded taps, which no reading of them covers:
|
||||
//! - a runtime `Cubic` sampler whose other filter is not `Cubic` (the readings' runtime sampler
|
||||
//! had both filters `Cubic`): the other formats' runtime sampler answers as both filters bicubic
|
||||
//! whatever its other filter;
|
||||
//! - a runtime sampler under another address mode than clamp to edge, a border color, or pixel
|
||||
//! coordinates (the readings' runtime sampler clamped to the edge at normalized coordinates):
|
||||
//! the constexpr samplers of those states were read on these formats, and the other formats'
|
||||
//! runtime sampler answers as the constexpr sampler of its state;
|
||||
//! - a `half` result under another address mode than clamp to edge (the readings' `half` results
|
||||
//! were all under clamp to edge, constexpr and runtime): rounded as under clamp to edge;
|
||||
//! - a sample at an explicit level, with a bias or with gradients, and a fragment function's
|
||||
//! sample at its implicit level (the readings are kernels' samples, which select level 0): the
|
||||
//! other formats' bicubic filter reads the base level whatever the level asked for;
|
||||
//! - a texture of more than one level, read at its base level (the readings' textures had one
|
||||
//! level), as the other formats' bicubic filter reads it.
|
||||
//!
|
||||
//! **The bfloat formats** (EV FPV-pf5-m4, an Apple M4 under macOS 27.0.1, every code of
|
||||
//! `R16Bfloat`, `RG16Bfloat` and `RGBA16Bfloat`; EV FPV-pf8-m4, 18, 432 positions of each under
|
||||
//! every address mode and border color): a sample is nearest under either filter, Metal's linear
|
||||
|
||||
@@ -166,6 +166,40 @@ const RGB: u32 = 0b0111;
|
||||
const RGBA: u32 = 0b1111;
|
||||
const A: u32 = 0b1000;
|
||||
|
||||
/// Whether Metal's bicubic filter is measured through a runtime sampler whose min or mag filter
|
||||
/// is `Cubic` and whose word (`metal::sampler::SamplerWord`, its `CUBIC_STATE` bits or all of
|
||||
/// them) is `word`, whatever a function samples through it: no mip filter, isotropic, the
|
||||
/// weighted-average reduction, a border color Metal names, and on every axis an address mode the
|
||||
/// bicubic readings cover (not `MirrorClampToEdge`). A function that samples through such a
|
||||
/// sampler refuses any other word (`lower::sampler::bicubic`), so the binder refuses it before it
|
||||
/// names the cubic-sampler variant (`VariantKey::cubic_samplers`).
|
||||
pub(crate) fn runtime_cubic_measured(word: u32) -> bool {
|
||||
use crate::metal::sampler::SamplerWord;
|
||||
use crate::metal::{SamplerAddressMode, SamplerBorderColor};
|
||||
let field = |shift: u32, mask: u32| (word & mask) >> shift;
|
||||
let addressed = SamplerWord::ADDRESS_SHIFT
|
||||
.into_iter()
|
||||
.zip(SamplerWord::ADDRESS)
|
||||
.all(|(shift, mask)| {
|
||||
matches!(
|
||||
SamplerAddressMode::try_from(field(shift, mask)),
|
||||
Ok(SamplerAddressMode::ClampToEdge
|
||||
| SamplerAddressMode::Repeat
|
||||
| SamplerAddressMode::MirrorRepeat
|
||||
| SamplerAddressMode::ClampToZero
|
||||
| SamplerAddressMode::ClampToBorderColor)
|
||||
)
|
||||
});
|
||||
let bordered = matches!(
|
||||
SamplerBorderColor::try_from(field(SamplerWord::BORDER_SHIFT, SamplerWord::BORDER)),
|
||||
Ok(SamplerBorderColor::TransparentBlack
|
||||
| SamplerBorderColor::OpaqueBlack
|
||||
| SamplerBorderColor::OpaqueWhite)
|
||||
);
|
||||
let unfiltered = SamplerWord::MIP_FILTER | SamplerWord::ANISOTROPIC | SamplerWord::REDUCTION;
|
||||
word & unfiltered == 0 && addressed && bordered
|
||||
}
|
||||
|
||||
/// How Metal's bicubic filter treats the texels of `pf` (module docs), or `None` for a format of
|
||||
/// no measured family.
|
||||
pub fn texels(pf: PixelFormat) -> Option<BicubicTexels> {
|
||||
|
||||
@@ -491,17 +491,18 @@ pub enum RuntimeFact {
|
||||
/// such a color into the interlocked storage form (`BindShape::interlocked_colors`, or an
|
||||
/// extended-range color's `BindShape::extended_shadows`), whose variant then stores before the
|
||||
/// depth and stencil tests and states [`TestedStorageWrites`](Self::TestedStorageWrites) with
|
||||
/// this `early_variant`, under any write mask. So the plan of a pipeline that writes no color
|
||||
/// so selects the tests of such a draw from this as from that fact, and the variant it names
|
||||
/// plans itself.
|
||||
/// this `early_variant`, where the write stores something. So the plan of a pipeline that
|
||||
/// writes no color so selects the tests of such a draw from this as from that fact, and the
|
||||
/// variant it names plans itself.
|
||||
///
|
||||
/// The plan reads it only for a draw that moves a color the function writes (and only where the
|
||||
/// pipeline has a depth or stencil attachment, whose tests the variant then depends on). A
|
||||
/// write whose mask covers none of the format's channels stores nothing, but its variant
|
||||
/// selects the tests all the same: an early-tests variant or the function's own tests serve
|
||||
/// it exactly. A draw whose tests neither serves (tests the draw does not state) is refused,
|
||||
/// as any draw whose variant is refused: the runtime keeps the color out of the storage form
|
||||
/// there (the pass splits, or the shadow ends).
|
||||
/// The plan reads it only for a draw that moves a color the function writes as an ordinary
|
||||
/// output under a write mask that names some of the attachment's components (and only where
|
||||
/// the pipeline has a depth or stencil attachment, whose tests the variant then depends on). A
|
||||
/// write whose mask names none of them stores nothing: no test bears on it, its variant states
|
||||
/// no store before the tests, and the plan selects none for it, as for a draw that moves
|
||||
/// nothing. A draw whose tests neither the early-tests variant nor the function's own tests
|
||||
/// serve (tests the draw does not state) is refused, as any draw whose variant is refused: the
|
||||
/// runtime keeps the color out of the storage form there (the pass splits, or the shadow ends).
|
||||
MovableStorageWrites { early_variant: bool },
|
||||
/// On a device that samples through Metal's own sampler (`VkProperty::MetalSampler`:
|
||||
/// MoltenVK on Apple's GPU), the function samples the texture bound to the slot through a
|
||||
|
||||
@@ -276,3 +276,100 @@ fn a_bicubic_sample_s_slots_join_the_variants() {
|
||||
}
|
||||
assert!(planned > 0);
|
||||
}
|
||||
|
||||
/// A runtime sampler whose filters are `Cubic` and whose state Metal's bicubic filter is not
|
||||
/// measured under whatever a function samples (a mip filter, anisotropy, a minimum reduction) is
|
||||
/// refused by the plan of the pipeline as compiled, `NotImplemented(SamplerBicubicFilter)`, before
|
||||
/// the plan names a variant: a dispatch of it compiles nothing, where the variant it would name
|
||||
/// refuses the same word only once compiled, and the runtime keeps no compile that refused. At an
|
||||
/// extended-range slot (which refused every `Cubic` word at planning before Metal's bicubic filter
|
||||
/// of its texels was built) as at a slot of another format. On every committed profile, the
|
||||
/// lowering refuses that variant by the same rule (`metal::bicubic::runtime_cubic_measured`). A
|
||||
/// device without `samplerAnisotropy` refuses an anisotropic sampler earlier in the plan, for that
|
||||
/// lack (`vk12-bare`): no variant either.
|
||||
#[test]
|
||||
fn an_unmeasured_cubic_sampler_is_refused_before_any_variant() {
|
||||
let bc = match llvm_assemble(&engine_dir().join("xr_bicubic.ll")) {
|
||||
Ok(bc) => bc,
|
||||
Err(AssembleError::Missing(why)) => {
|
||||
eprintln!("SKIPPED: {why}");
|
||||
return;
|
||||
}
|
||||
Err(AssembleError::Rejected(why)) => panic!("llvm-as rejected xr_bicubic: {why}"),
|
||||
};
|
||||
let mut cubic = SamplerDescriptor::new();
|
||||
cubic.min_filter = SamplerMinMagFilter::Cubic;
|
||||
cubic.mag_filter = SamplerMinMagFilter::Cubic;
|
||||
cubic.s_address_mode = SamplerAddressMode::ClampToEdge;
|
||||
cubic.t_address_mode = SamplerAddressMode::ClampToEdge;
|
||||
let mut mipmapped = cubic;
|
||||
mipmapped.mip_filter = crate::metal::SamplerMipFilter::Nearest;
|
||||
let mut anisotropic = cubic;
|
||||
anisotropic.max_anisotropy = 4;
|
||||
let mut minimum = cubic;
|
||||
minimum.reduction_mode = crate::metal::SamplerReductionMode::Minimum;
|
||||
let unmeasured = [
|
||||
("a mip filter", mipmapped),
|
||||
("anisotropy", anisotropic),
|
||||
("a minimum reduction", minimum),
|
||||
];
|
||||
let formats = [
|
||||
(PixelFormat::BGRA10XR, Some(form_of("552"))),
|
||||
(PixelFormat::RGB10A82PXR10, Some(form_of("550"))),
|
||||
(PixelFormat::RGBA8Unorm, None),
|
||||
];
|
||||
let want = Unsupported::not_implemented(Feature::SamplerBicubicFilter);
|
||||
let mut refused = 0;
|
||||
let mut device_refused = 0;
|
||||
for (stem, dev) in devices() {
|
||||
let plain = pipeline_entry(&dev, &bc, "xrb_runtime", &LowerInputs::new())
|
||||
.expect("a sampling kernel");
|
||||
// The measured word plans its variant (`a_bicubic_sample_s_slots_join_the_variants`).
|
||||
let measured = sampled_state(PixelFormat::BGRA10XR, cubic).shape();
|
||||
plain
|
||||
.plan(&dev, &measured)
|
||||
.unwrap_or_else(|e| panic!("the measured cubic word on {stem}: {e}"));
|
||||
for (state, sampler) in unmeasured {
|
||||
let word = SamplerWord::of(&sampler).0;
|
||||
assert!(word & SamplerWord::CUBIC != 0, "{state}");
|
||||
for (pf, form) in formats {
|
||||
let what = format!("a cubic sampler with {state}, {pf:?}, on {stem}");
|
||||
match plain.plan(&dev, &sampled_state(pf, sampler).shape()) {
|
||||
Err(crate::error::BindError::Unsupported(u))
|
||||
if sampler.max_anisotropy > 1
|
||||
&& u.feature == Feature::SamplerAnisotropy =>
|
||||
{
|
||||
device_refused += 1;
|
||||
}
|
||||
Err(crate::error::BindError::Unsupported(u)) => {
|
||||
assert_eq!(
|
||||
(&u.feature, &u.needs),
|
||||
(&want.feature, &want.needs),
|
||||
"{what}"
|
||||
)
|
||||
}
|
||||
other => panic!("{what}: planned {:?}", other.map(|p| p.variant)),
|
||||
}
|
||||
// The variant the word would name refuses it.
|
||||
let mut inputs = LowerInputs::new();
|
||||
inputs
|
||||
.cubic_samplers
|
||||
.insert(SAMPLER, word & SamplerWord::CUBIC_STATE);
|
||||
if let Some(form) = form {
|
||||
inputs.extended_range.insert(SOURCE, form);
|
||||
}
|
||||
match typed_module_with(&bc, "xrb_runtime", dev.profile(), &inputs) {
|
||||
Err(crate::error::Error::Unsupported(u)) => assert_eq!(
|
||||
(&u.feature, &u.needs),
|
||||
(&want.feature, &want.needs),
|
||||
"{what}: the variant"
|
||||
),
|
||||
other => panic!("{what}: the variant: {:?}", other.map(|_| ())),
|
||||
}
|
||||
refused += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
eprintln!("{refused} unmeasured cubic words refused, {device_refused} of them for the device");
|
||||
assert!(refused > device_refused, "no profile checked");
|
||||
}
|
||||
@@ -15,24 +15,29 @@
|
||||
//! a depth and stencil attachment, under each kind of draw tests: the plan of the pipeline as
|
||||
//! compiled selects the variant the moved writer needs at once, and that variant, compiled, plans
|
||||
//! itself (a fixed point, which the runtime requires of every variant it compiles), or both refuse
|
||||
//! the draw. No GPU is used.
|
||||
//! the draw. A writer whose write mask covers none of the color's channels stores nothing, so no
|
||||
//! test bears on its write: its plan selects no tests under any draw tests, and its variant states
|
||||
//! no store before them. So does a writer that declares the color as an input it never reads (the
|
||||
//! owned fixture `smw_unread`), which takes the storage form as compiled. No GPU is used.
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use crate::bind::{BindState, FragmentTests};
|
||||
use crate::budget::Budget;
|
||||
use crate::cache::VariantKey;
|
||||
use crate::device::profile::FramebufferFetchPolicy;
|
||||
use crate::device::{Device, DeviceDescription, DevicePolicy};
|
||||
use crate::error::BindError;
|
||||
use crate::library::Library;
|
||||
use crate::lower::fragment::interlock_orders;
|
||||
use crate::metal::PixelFormat;
|
||||
use crate::metal::{ColorWriteMask, PixelFormat};
|
||||
use crate::pipeline::descriptor::{
|
||||
ColorAttachmentDescriptor, FunctionDescriptor, RenderPipelineDescriptor, StageSource,
|
||||
};
|
||||
use crate::pipeline::facts::RuntimeFact;
|
||||
use crate::pipeline::testing::{engine_dir, llvm_assemble, AssembleError};
|
||||
use crate::spirv::testing::{check_words_valid, committed_profiles};
|
||||
use crate::vk;
|
||||
|
||||
/// How the depth and stencil tests bear on a writer's store before them.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
@@ -72,6 +77,78 @@ const TESTS: [FragmentTests; 6] = [
|
||||
FragmentTests::Any,
|
||||
];
|
||||
|
||||
/// The library of the owned fixture `name`, assembled with `llvm-as`; `None` where the tool is
|
||||
/// missing (the test then skips visibly).
|
||||
fn fixture_library(name: &str) -> Option<Library> {
|
||||
match llvm_assemble(&engine_dir().join(format!("{name}.ll"))) {
|
||||
Ok(bc) => Some(Library::from_air(&bc).expect("library")),
|
||||
Err(AssembleError::Missing(why)) => {
|
||||
eprintln!("SKIPPED: {why}");
|
||||
None
|
||||
}
|
||||
Err(AssembleError::Rejected(why)) => panic!("llvm-as rejected {name}: {why}"),
|
||||
}
|
||||
}
|
||||
|
||||
/// The function `name` of `library`, as a stage of a render pipeline descriptor.
|
||||
fn stage(library: &Library, name: &str) -> StageSource {
|
||||
StageSource::Function(FunctionDescriptor::new(
|
||||
library.function(name).expect("function"),
|
||||
))
|
||||
}
|
||||
|
||||
/// The committed profiles that order fetch through the pixel interlock and require it ordered,
|
||||
/// each with its device.
|
||||
fn ordering_devices() -> Vec<(String, Device)> {
|
||||
let profiles = committed_profiles().expect("profiles");
|
||||
profiles
|
||||
.iter()
|
||||
.filter(|(_, profile)| {
|
||||
interlock_orders(profile)
|
||||
&& profile.fields().framebuffer_fetch == FramebufferFetchPolicy::RequireOrdered
|
||||
})
|
||||
.map(|(stem, _)| (stem.clone(), device(stem)))
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// The bind state of a draw under `tests` that moves color 0 as `moved` does (none for `None`).
|
||||
fn moving(tests: FragmentTests, moved: Option<Move>) -> BindState {
|
||||
let mut state = BindState {
|
||||
fragment_tests: tests,
|
||||
..Default::default()
|
||||
};
|
||||
match moved {
|
||||
Some(Move::Interlocked) => {
|
||||
state.interlocked_colors.insert(0);
|
||||
}
|
||||
Some(Move::Shadow) => {
|
||||
state.extended_shadows.insert(0);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
state
|
||||
}
|
||||
|
||||
/// The `early_variant` of the store before the tests `pipeline` states, if it states one.
|
||||
fn stored_before_tests(pipeline: &crate::pipeline::artifact::RenderPipeline) -> Option<bool> {
|
||||
pipeline.dependencies.iter().find_map(|d| match d.fact {
|
||||
RuntimeFact::TestedStorageWrites { early_variant, .. } => Some(early_variant),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
||||
/// Whether `pipeline` writes color 0 through the storage form, and the channels that write keeps.
|
||||
fn storage_write(
|
||||
pipeline: &crate::pipeline::artifact::RenderPipeline,
|
||||
) -> Option<vk::ColorComponentFlags> {
|
||||
pipeline
|
||||
.graphics
|
||||
.storage_attachments
|
||||
.iter()
|
||||
.find(|a| a.color_index == 0 && a.writes)
|
||||
.map(|a| a.kept)
|
||||
}
|
||||
|
||||
fn device(stem: &str) -> Device {
|
||||
let path = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join(format!("../metal2vulkan-validation/profiles/{stem}.json"));
|
||||
@@ -96,37 +173,20 @@ fn wanted(class: Class, tests: FragmentTests) -> Option<(bool, bool)> {
|
||||
|
||||
#[test]
|
||||
fn a_moved_writer_selects_its_tests_in_its_first_plan() {
|
||||
let bc = match llvm_assemble(&engine_dir().join("smw_writers.ll")) {
|
||||
Ok(bc) => bc,
|
||||
Err(AssembleError::Missing(why)) => {
|
||||
eprintln!("SKIPPED: {why}");
|
||||
return;
|
||||
}
|
||||
Err(AssembleError::Rejected(why)) => panic!("llvm-as rejected smw_writers: {why}"),
|
||||
let Some(library) = fixture_library("smw_writers") else {
|
||||
return;
|
||||
};
|
||||
let library = Library::from_air(&bc).expect("library");
|
||||
let function = |name: &str| {
|
||||
StageSource::Function(FunctionDescriptor::new(
|
||||
library.function(name).expect("function"),
|
||||
))
|
||||
};
|
||||
let profiles = committed_profiles().expect("profiles");
|
||||
let devices = ordering_devices();
|
||||
// The profiles checked, and the writers' variants that planned themselves, by the tests
|
||||
// they run (`read_only_tests`, `shader_tests`).
|
||||
let mut checked = Vec::new();
|
||||
let mut fixed_points = std::collections::BTreeSet::<(&str, (bool, bool))>::new();
|
||||
for (stem, profile) in &profiles {
|
||||
if !interlock_orders(profile)
|
||||
|| profile.fields().framebuffer_fetch != FramebufferFetchPolicy::RequireOrdered
|
||||
{
|
||||
continue;
|
||||
}
|
||||
let dev = device(stem);
|
||||
for (stem, dev) in &devices {
|
||||
checked.push(stem.as_str());
|
||||
for (writer, class) in WRITERS {
|
||||
for moved in [Move::Interlocked, Move::Shadow] {
|
||||
let mut d = RenderPipelineDescriptor::new(function("smw_full"));
|
||||
d.fragment = Some(function(writer));
|
||||
let mut d = RenderPipelineDescriptor::new(stage(&library, "smw_full"));
|
||||
d.fragment = Some(stage(&library, writer));
|
||||
d.color_attachments[0] = Some(ColorAttachmentDescriptor::new(match moved {
|
||||
Move::Interlocked => PixelFormat::RGBA16Float,
|
||||
Move::Shadow => PixelFormat::BGRA10XR,
|
||||
@@ -155,24 +215,16 @@ fn a_moved_writer_selects_its_tests_in_its_first_plan() {
|
||||
});
|
||||
assert_eq!(movable, stated, "{what}: the function's movable writes");
|
||||
for tests in TESTS {
|
||||
let mut state = BindState {
|
||||
fragment_tests: tests,
|
||||
..Default::default()
|
||||
};
|
||||
match moved {
|
||||
Move::Interlocked => state.interlocked_colors.insert(0),
|
||||
Move::Shadow => state.extended_shadows.insert(0),
|
||||
};
|
||||
let shape = state.shape();
|
||||
let shape = moving(tests, Some(moved)).shape();
|
||||
let what = format!("{what} {tests:?}");
|
||||
let planned = base.plan(&dev, &shape);
|
||||
let planned = base.plan(dev, &shape);
|
||||
// The variant the plan names, compiled, plans itself: the runtime fails a draw
|
||||
// whose compiled variant asks for another one.
|
||||
let variant = planned.as_ref().ok().map(|plan| {
|
||||
let variant = dev
|
||||
.compile_render_variant(&d, &plan.variant, &Budget::standard())
|
||||
.unwrap_or_else(|e| panic!("{what}: the variant: {e}"));
|
||||
let again = variant.plan(&dev, &shape).unwrap_or_else(|e| {
|
||||
let again = variant.plan(dev, &shape).unwrap_or_else(|e| {
|
||||
panic!("{what}: the variant planned refuses the draw: {e}")
|
||||
});
|
||||
assert_eq!(again.variant, plan.variant, "{what}: a fixed point");
|
||||
@@ -201,21 +253,12 @@ fn a_moved_writer_selects_its_tests_in_its_first_plan() {
|
||||
);
|
||||
let variant = variant.expect("compiled for the plan");
|
||||
assert!(
|
||||
variant
|
||||
.graphics
|
||||
.storage_attachments
|
||||
.iter()
|
||||
.any(|a| a.color_index == 0 && a.writes),
|
||||
storage_write(&variant).is_some(),
|
||||
"{what}: the variant writes color 0 through the storage form"
|
||||
);
|
||||
let stored_before = variant.dependencies.iter().find_map(|d| match d.fact {
|
||||
RuntimeFact::TestedStorageWrites { early_variant, .. } => {
|
||||
Some(early_variant)
|
||||
}
|
||||
_ => None,
|
||||
});
|
||||
assert_eq!(
|
||||
stored_before, stated,
|
||||
stored_before_tests(&variant),
|
||||
stated,
|
||||
"{what}: the variant's store before the tests"
|
||||
);
|
||||
for m in &variant.stages {
|
||||
@@ -243,3 +286,161 @@ fn a_moved_writer_selects_its_tests_in_its_first_plan() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A moved writer whose write mask covers none of color 0's channels stores nothing there, so the
|
||||
/// depth and stencil tests bear on nothing it stores: under every kind of draw tests, `Any`
|
||||
/// included, the plan of the pipeline as compiled names the variant that moves the color and
|
||||
/// selects no tests, and that variant, compiled, writes color 0 through the storage form keeping
|
||||
/// every channel, states no store before the tests, and plans itself. Every state is checked and
|
||||
/// the misses are counted by kind before the test fails, so its output says how far a plan strays.
|
||||
#[test]
|
||||
fn a_moved_writer_that_stores_nothing_selects_no_tests() {
|
||||
let Some(library) = fixture_library("smw_writers") else {
|
||||
return;
|
||||
};
|
||||
let devices = ordering_devices();
|
||||
let mut planned = std::collections::BTreeSet::<(&str, String, String)>::new();
|
||||
// The states that miss, by kind of miss.
|
||||
let mut misses = std::collections::BTreeMap::<&str, Vec<String>>::new();
|
||||
let mut states = 0usize;
|
||||
for (stem, dev) in &devices {
|
||||
for (writer, _) in WRITERS {
|
||||
for moved in [Move::Interlocked, Move::Shadow] {
|
||||
let mut d = RenderPipelineDescriptor::new(stage(&library, "smw_full"));
|
||||
d.fragment = Some(stage(&library, writer));
|
||||
let mut color = ColorAttachmentDescriptor::new(match moved {
|
||||
Move::Interlocked => PixelFormat::RGBA16Float,
|
||||
Move::Shadow => PixelFormat::BGRA10XR,
|
||||
});
|
||||
color.write_mask = ColorWriteMask::NONE;
|
||||
d.color_attachments[0] = Some(color);
|
||||
d.depth_format = Some(PixelFormat::Depth32FloatStencil8);
|
||||
d.stencil_format = Some(PixelFormat::Depth32FloatStencil8);
|
||||
let what = format!("{stem} {writer} {moved:?} (write mask none)");
|
||||
let base = match dev.compile_render_pipeline(&d, &Budget::standard()) {
|
||||
Ok(base) => base,
|
||||
Err(e) => {
|
||||
eprintln!("{what}: refused as compiled: {e}");
|
||||
continue;
|
||||
}
|
||||
};
|
||||
assert_eq!(stored_before_tests(&base), None, "{what}");
|
||||
for tests in TESTS {
|
||||
states += 1;
|
||||
let shape = moving(tests, Some(moved)).shape();
|
||||
let what = format!("{what} {tests:?}");
|
||||
let mut miss = |kind: &'static str| {
|
||||
misses.entry(kind).or_default().push(what.clone());
|
||||
};
|
||||
let plan = match base.plan(dev, &shape) {
|
||||
Ok(plan) => plan,
|
||||
Err(e) => {
|
||||
miss("the plan refuses the draw");
|
||||
eprintln!("{what}: the plan refuses the draw: {e}");
|
||||
continue;
|
||||
}
|
||||
};
|
||||
let key = &plan.variant;
|
||||
if key.read_only_tests || key.shader_tests || key.shader_stencil {
|
||||
miss("the plan selects tests");
|
||||
}
|
||||
let variant = dev
|
||||
.compile_render_variant(&d, key, &Budget::standard())
|
||||
.unwrap_or_else(|e| panic!("{what}: the variant: {e}"));
|
||||
assert_eq!(
|
||||
storage_write(&variant),
|
||||
Some(vk::ColorComponentFlags::known_bits()),
|
||||
"{what}: the variant's write of color 0 keeps every channel"
|
||||
);
|
||||
if stored_before_tests(&variant).is_some() {
|
||||
miss("the variant states a store before the tests");
|
||||
}
|
||||
match variant.plan(dev, &shape) {
|
||||
Ok(again) if again.variant == *key => {}
|
||||
Ok(_) => miss("the variant's plan asks for another variant"),
|
||||
Err(_) => miss("the variant's plan refuses the draw"),
|
||||
}
|
||||
planned.insert((writer, format!("{moved:?}"), format!("{tests:?}")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
eprintln!(
|
||||
"moved writers storing nothing: {states} states on {} profiles",
|
||||
devices.len()
|
||||
);
|
||||
for (kind, whats) in &misses {
|
||||
eprintln!("{} states: {kind} (first: {})", whats.len(), whats[0]);
|
||||
}
|
||||
assert!(misses.is_empty(), "{misses:#?}");
|
||||
// Not vacuous: every writer, move and kind of tests planned on some profile.
|
||||
assert_eq!(
|
||||
planned.len(),
|
||||
WRITERS.len() * 2 * TESTS.len(),
|
||||
"{planned:?}"
|
||||
);
|
||||
}
|
||||
|
||||
/// A writer that declares color 0 as an input it never reads (`smw_unread`, which discards) takes
|
||||
/// the storage form there as compiled, so it stores before the tests where its write mask stores
|
||||
/// something (`TestedStorageWrites` with the early-tests variant). Under a write mask that covers
|
||||
/// none of the color's channels it stores nothing: it states no store before the tests, and every
|
||||
/// draw, one whose tests may count what they keep (`Any`) included, runs it as compiled. The
|
||||
/// misses are counted by kind before the test fails.
|
||||
#[test]
|
||||
fn an_unread_color_input_that_stores_nothing_selects_no_tests() {
|
||||
let (Some(writers), Some(unread)) = (
|
||||
fixture_library("smw_writers"),
|
||||
fixture_library("smw_unread"),
|
||||
) else {
|
||||
return;
|
||||
};
|
||||
let devices = ordering_devices();
|
||||
let mut misses = std::collections::BTreeMap::<&str, Vec<String>>::new();
|
||||
let mut states = 0usize;
|
||||
for (stem, dev) in &devices {
|
||||
for (mask, stores) in [(ColorWriteMask::ALL, true), (ColorWriteMask::NONE, false)] {
|
||||
let mut d = RenderPipelineDescriptor::new(stage(&writers, "smw_full"));
|
||||
d.fragment = Some(stage(&unread, "smw_unread"));
|
||||
let mut color = ColorAttachmentDescriptor::new(PixelFormat::RGBA16Float);
|
||||
color.write_mask = mask;
|
||||
d.color_attachments[0] = Some(color);
|
||||
d.depth_format = Some(PixelFormat::Depth32FloatStencil8);
|
||||
d.stencil_format = Some(PixelFormat::Depth32FloatStencil8);
|
||||
let what = format!("{stem} smw_unread under {mask:?}");
|
||||
let base = dev
|
||||
.compile_render_pipeline(&d, &Budget::standard())
|
||||
.unwrap_or_else(|e| panic!("{what}: refused as compiled: {e}"));
|
||||
assert!(storage_write(&base).is_some(), "{what}: the storage form");
|
||||
if stores {
|
||||
assert_eq!(stored_before_tests(&base), Some(true), "{what}");
|
||||
continue;
|
||||
}
|
||||
if stored_before_tests(&base).is_some() {
|
||||
misses
|
||||
.entry("it states a store before the tests")
|
||||
.or_default()
|
||||
.push(what.clone());
|
||||
}
|
||||
for tests in TESTS {
|
||||
states += 1;
|
||||
let what = format!("{what} {tests:?}");
|
||||
let kind = match base.plan(dev, &moving(tests, None).shape()) {
|
||||
Ok(plan) if plan.variant == VariantKey::new() => continue,
|
||||
Ok(_) => "the plan asks for a variant",
|
||||
Err(_) => "the plan refuses the draw",
|
||||
};
|
||||
misses.entry(kind).or_default().push(what);
|
||||
}
|
||||
}
|
||||
}
|
||||
eprintln!(
|
||||
"unread color input storing nothing: {states} draws on {} profiles",
|
||||
devices.len()
|
||||
);
|
||||
for (kind, whats) in &misses {
|
||||
eprintln!("{}: {kind} (first: {})", whats.len(), whats[0]);
|
||||
}
|
||||
assert!(misses.is_empty(), "{misses:#?}");
|
||||
assert!(states > 0, "no profile checked");
|
||||
}
|
||||
@@ -1667,129 +1667,129 @@ vk_bit! {
|
||||
}
|
||||
|
||||
vk_format_blocks! {
|
||||
R4G4_UNORM_PACK8 = 1, 1, class "8-bit", packed 8, bits 4, color Unorm, core 1 0;
|
||||
R4G4B4A4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 4, color Unorm, core 1 0;
|
||||
B4G4R4A4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 4, color Unorm, core 1 0;
|
||||
R5G6B5_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, color Unorm, core 1 0;
|
||||
B5G6R5_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, color Unorm, core 1 0;
|
||||
R5G5B5A1_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, color Unorm, core 1 0;
|
||||
B5G5R5A1_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, color Unorm, core 1 0;
|
||||
A1R5G5B5_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, color Unorm, core 1 0;
|
||||
R8_UNORM = 1, 1, class "8-bit", bits 8, color Unorm, core 1 0;
|
||||
R8_SNORM = 1, 1, class "8-bit", bits 8, color Snorm, core 1 0;
|
||||
R8_USCALED = 1, 1, class "8-bit", bits 8, color Uscaled, core 1 0;
|
||||
R8_SSCALED = 1, 1, class "8-bit", bits 8, color Sscaled, core 1 0;
|
||||
R8_UINT = 1, 1, class "8-bit", bits 8, color Uint, core 1 0;
|
||||
R8_SINT = 1, 1, class "8-bit", bits 8, color Sint, core 1 0;
|
||||
R8_SRGB = 1, 1, class "8-bit", bits 8, color Srgb, core 1 0;
|
||||
R8G8_UNORM = 2, 1, class "16-bit", bits 8, color Unorm, core 1 0;
|
||||
R8G8_SNORM = 2, 1, class "16-bit", bits 8, color Snorm, core 1 0;
|
||||
R8G8_USCALED = 2, 1, class "16-bit", bits 8, color Uscaled, core 1 0;
|
||||
R8G8_SSCALED = 2, 1, class "16-bit", bits 8, color Sscaled, core 1 0;
|
||||
R8G8_UINT = 2, 1, class "16-bit", bits 8, color Uint, core 1 0;
|
||||
R8G8_SINT = 2, 1, class "16-bit", bits 8, color Sint, core 1 0;
|
||||
R8G8_SRGB = 2, 1, class "16-bit", bits 8, color Srgb, core 1 0;
|
||||
R8G8B8_UNORM = 3, 1, class "24-bit", bits 8, color Unorm, core 1 0;
|
||||
R8G8B8_SNORM = 3, 1, class "24-bit", bits 8, color Snorm, core 1 0;
|
||||
R8G8B8_USCALED = 3, 1, class "24-bit", bits 8, color Uscaled, core 1 0;
|
||||
R8G8B8_SSCALED = 3, 1, class "24-bit", bits 8, color Sscaled, core 1 0;
|
||||
R8G8B8_UINT = 3, 1, class "24-bit", bits 8, color Uint, core 1 0;
|
||||
R8G8B8_SINT = 3, 1, class "24-bit", bits 8, color Sint, core 1 0;
|
||||
R8G8B8_SRGB = 3, 1, class "24-bit", bits 8, color Srgb, core 1 0;
|
||||
B8G8R8_UNORM = 3, 1, class "24-bit", bits 8, color Unorm, core 1 0;
|
||||
B8G8R8_SNORM = 3, 1, class "24-bit", bits 8, color Snorm, core 1 0;
|
||||
B8G8R8_USCALED = 3, 1, class "24-bit", bits 8, color Uscaled, core 1 0;
|
||||
B8G8R8_SSCALED = 3, 1, class "24-bit", bits 8, color Sscaled, core 1 0;
|
||||
B8G8R8_UINT = 3, 1, class "24-bit", bits 8, color Uint, core 1 0;
|
||||
B8G8R8_SINT = 3, 1, class "24-bit", bits 8, color Sint, core 1 0;
|
||||
B8G8R8_SRGB = 3, 1, class "24-bit", bits 8, color Srgb, core 1 0;
|
||||
R8G8B8A8_UNORM = 4, 1, class "32-bit", bits 8, color Unorm, core 1 0;
|
||||
R8G8B8A8_SNORM = 4, 1, class "32-bit", bits 8, color Snorm, core 1 0;
|
||||
R8G8B8A8_USCALED = 4, 1, class "32-bit", bits 8, color Uscaled, core 1 0;
|
||||
R8G8B8A8_SSCALED = 4, 1, class "32-bit", bits 8, color Sscaled, core 1 0;
|
||||
R8G8B8A8_UINT = 4, 1, class "32-bit", bits 8, color Uint, core 1 0;
|
||||
R8G8B8A8_SINT = 4, 1, class "32-bit", bits 8, color Sint, core 1 0;
|
||||
R8G8B8A8_SRGB = 4, 1, class "32-bit", bits 8, color Srgb, core 1 0;
|
||||
B8G8R8A8_UNORM = 4, 1, class "32-bit", bits 8, color Unorm, core 1 0;
|
||||
B8G8R8A8_SNORM = 4, 1, class "32-bit", bits 8, color Snorm, core 1 0;
|
||||
B8G8R8A8_USCALED = 4, 1, class "32-bit", bits 8, color Uscaled, core 1 0;
|
||||
B8G8R8A8_SSCALED = 4, 1, class "32-bit", bits 8, color Sscaled, core 1 0;
|
||||
B8G8R8A8_UINT = 4, 1, class "32-bit", bits 8, color Uint, core 1 0;
|
||||
B8G8R8A8_SINT = 4, 1, class "32-bit", bits 8, color Sint, core 1 0;
|
||||
B8G8R8A8_SRGB = 4, 1, class "32-bit", bits 8, color Srgb, core 1 0;
|
||||
A8B8G8R8_UNORM_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, color Unorm, core 1 0;
|
||||
A8B8G8R8_SNORM_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, color Snorm, core 1 0;
|
||||
A8B8G8R8_USCALED_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, color Uscaled, core 1 0;
|
||||
A8B8G8R8_SSCALED_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, color Sscaled, core 1 0;
|
||||
A8B8G8R8_UINT_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, color Uint, core 1 0;
|
||||
A8B8G8R8_SINT_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, color Sint, core 1 0;
|
||||
A8B8G8R8_SRGB_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, color Srgb, core 1 0;
|
||||
A2R10G10B10_UNORM_PACK32 = 4, 1, class "32-bit", packed 32, color Unorm, core 1 0;
|
||||
A2R10G10B10_SNORM_PACK32 = 4, 1, class "32-bit", packed 32, color Snorm, core 1 0;
|
||||
A2R10G10B10_USCALED_PACK32 = 4, 1, class "32-bit", packed 32, color Uscaled, core 1 0;
|
||||
A2R10G10B10_SSCALED_PACK32 = 4, 1, class "32-bit", packed 32, color Sscaled, core 1 0;
|
||||
A2R10G10B10_UINT_PACK32 = 4, 1, class "32-bit", packed 32, color Uint, core 1 0;
|
||||
A2R10G10B10_SINT_PACK32 = 4, 1, class "32-bit", packed 32, color Sint, core 1 0;
|
||||
A2B10G10R10_UNORM_PACK32 = 4, 1, class "32-bit", packed 32, color Unorm, core 1 0;
|
||||
A2B10G10R10_SNORM_PACK32 = 4, 1, class "32-bit", packed 32, color Snorm, core 1 0;
|
||||
A2B10G10R10_USCALED_PACK32 = 4, 1, class "32-bit", packed 32, color Uscaled, core 1 0;
|
||||
A2B10G10R10_SSCALED_PACK32 = 4, 1, class "32-bit", packed 32, color Sscaled, core 1 0;
|
||||
A2B10G10R10_UINT_PACK32 = 4, 1, class "32-bit", packed 32, color Uint, core 1 0;
|
||||
A2B10G10R10_SINT_PACK32 = 4, 1, class "32-bit", packed 32, color Sint, core 1 0;
|
||||
R16_UNORM = 2, 1, class "16-bit", bits 16, color Unorm, core 1 0;
|
||||
R16_SNORM = 2, 1, class "16-bit", bits 16, color Snorm, core 1 0;
|
||||
R16_USCALED = 2, 1, class "16-bit", bits 16, color Uscaled, core 1 0;
|
||||
R16_SSCALED = 2, 1, class "16-bit", bits 16, color Sscaled, core 1 0;
|
||||
R16_UINT = 2, 1, class "16-bit", bits 16, color Uint, core 1 0;
|
||||
R16_SINT = 2, 1, class "16-bit", bits 16, color Sint, core 1 0;
|
||||
R16_SFLOAT = 2, 1, class "16-bit", bits 16, color Sfloat, core 1 0;
|
||||
R16G16_UNORM = 4, 1, class "32-bit", bits 16, color Unorm, core 1 0;
|
||||
R16G16_SNORM = 4, 1, class "32-bit", bits 16, color Snorm, core 1 0;
|
||||
R16G16_USCALED = 4, 1, class "32-bit", bits 16, color Uscaled, core 1 0;
|
||||
R16G16_SSCALED = 4, 1, class "32-bit", bits 16, color Sscaled, core 1 0;
|
||||
R16G16_UINT = 4, 1, class "32-bit", bits 16, color Uint, core 1 0;
|
||||
R16G16_SINT = 4, 1, class "32-bit", bits 16, color Sint, core 1 0;
|
||||
R16G16_SFLOAT = 4, 1, class "32-bit", bits 16, color Sfloat, core 1 0;
|
||||
R16G16B16_UNORM = 6, 1, class "48-bit", bits 16, color Unorm, core 1 0;
|
||||
R16G16B16_SNORM = 6, 1, class "48-bit", bits 16, color Snorm, core 1 0;
|
||||
R16G16B16_USCALED = 6, 1, class "48-bit", bits 16, color Uscaled, core 1 0;
|
||||
R16G16B16_SSCALED = 6, 1, class "48-bit", bits 16, color Sscaled, core 1 0;
|
||||
R16G16B16_UINT = 6, 1, class "48-bit", bits 16, color Uint, core 1 0;
|
||||
R16G16B16_SINT = 6, 1, class "48-bit", bits 16, color Sint, core 1 0;
|
||||
R16G16B16_SFLOAT = 6, 1, class "48-bit", bits 16, color Sfloat, core 1 0;
|
||||
R16G16B16A16_UNORM = 8, 1, class "64-bit", bits 16, color Unorm, core 1 0;
|
||||
R16G16B16A16_SNORM = 8, 1, class "64-bit", bits 16, color Snorm, core 1 0;
|
||||
R16G16B16A16_USCALED = 8, 1, class "64-bit", bits 16, color Uscaled, core 1 0;
|
||||
R16G16B16A16_SSCALED = 8, 1, class "64-bit", bits 16, color Sscaled, core 1 0;
|
||||
R16G16B16A16_UINT = 8, 1, class "64-bit", bits 16, color Uint, core 1 0;
|
||||
R16G16B16A16_SINT = 8, 1, class "64-bit", bits 16, color Sint, core 1 0;
|
||||
R16G16B16A16_SFLOAT = 8, 1, class "64-bit", bits 16, color Sfloat, core 1 0;
|
||||
R32_UINT = 4, 1, class "32-bit", bits 32, color Uint, core 1 0;
|
||||
R32_SINT = 4, 1, class "32-bit", bits 32, color Sint, core 1 0;
|
||||
R32_SFLOAT = 4, 1, class "32-bit", bits 32, color Sfloat, core 1 0;
|
||||
R32G32_UINT = 8, 1, class "64-bit", bits 32, color Uint, core 1 0;
|
||||
R32G32_SINT = 8, 1, class "64-bit", bits 32, color Sint, core 1 0;
|
||||
R32G32_SFLOAT = 8, 1, class "64-bit", bits 32, color Sfloat, core 1 0;
|
||||
R32G32B32_UINT = 12, 1, class "96-bit", bits 32, color Uint, core 1 0;
|
||||
R32G32B32_SINT = 12, 1, class "96-bit", bits 32, color Sint, core 1 0;
|
||||
R32G32B32_SFLOAT = 12, 1, class "96-bit", bits 32, color Sfloat, core 1 0;
|
||||
R32G32B32A32_UINT = 16, 1, class "128-bit", bits 32, color Uint, core 1 0;
|
||||
R32G32B32A32_SINT = 16, 1, class "128-bit", bits 32, color Sint, core 1 0;
|
||||
R32G32B32A32_SFLOAT = 16, 1, class "128-bit", bits 32, color Sfloat, core 1 0;
|
||||
R64_UINT = 8, 1, class "64-bit", bits 64, color Uint, core 1 0;
|
||||
R64_SINT = 8, 1, class "64-bit", bits 64, color Sint, core 1 0;
|
||||
R64_SFLOAT = 8, 1, class "64-bit", bits 64, color Sfloat, core 1 0;
|
||||
R64G64_UINT = 16, 1, class "128-bit", bits 64, color Uint, core 1 0;
|
||||
R64G64_SINT = 16, 1, class "128-bit", bits 64, color Sint, core 1 0;
|
||||
R64G64_SFLOAT = 16, 1, class "128-bit", bits 64, color Sfloat, core 1 0;
|
||||
R64G64B64_UINT = 24, 1, class "192-bit", bits 64, color Uint, core 1 0;
|
||||
R64G64B64_SINT = 24, 1, class "192-bit", bits 64, color Sint, core 1 0;
|
||||
R64G64B64_SFLOAT = 24, 1, class "192-bit", bits 64, color Sfloat, core 1 0;
|
||||
R64G64B64A64_UINT = 32, 1, class "256-bit", bits 64, color Uint, core 1 0;
|
||||
R64G64B64A64_SINT = 32, 1, class "256-bit", bits 64, color Sint, core 1 0;
|
||||
R64G64B64A64_SFLOAT = 32, 1, class "256-bit", bits 64, color Sfloat, core 1 0;
|
||||
B10G11R11_UFLOAT_PACK32 = 4, 1, class "32-bit", packed 32, color Ufloat, core 1 0;
|
||||
E5B9G9R9_UFLOAT_PACK32 = 4, 1, class "32-bit", packed 32, bits 9, color Ufloat, core 1 0;
|
||||
R4G4_UNORM_PACK8 = 1, 1, class "8-bit", packed 8, bits 4, components [R G], color Unorm, core 1 0;
|
||||
R4G4B4A4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 4, components [R G B A], color Unorm, core 1 0;
|
||||
B4G4R4A4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 4, components [R G B A], color Unorm, core 1 0;
|
||||
R5G6B5_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, components [R G B], color Unorm, core 1 0;
|
||||
B5G6R5_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, components [R G B], color Unorm, core 1 0;
|
||||
R5G5B5A1_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, components [R G B A], color Unorm, core 1 0;
|
||||
B5G5R5A1_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, components [R G B A], color Unorm, core 1 0;
|
||||
A1R5G5B5_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, components [R G B A], color Unorm, core 1 0;
|
||||
R8_UNORM = 1, 1, class "8-bit", bits 8, components [R], color Unorm, core 1 0;
|
||||
R8_SNORM = 1, 1, class "8-bit", bits 8, components [R], color Snorm, core 1 0;
|
||||
R8_USCALED = 1, 1, class "8-bit", bits 8, components [R], color Uscaled, core 1 0;
|
||||
R8_SSCALED = 1, 1, class "8-bit", bits 8, components [R], color Sscaled, core 1 0;
|
||||
R8_UINT = 1, 1, class "8-bit", bits 8, components [R], color Uint, core 1 0;
|
||||
R8_SINT = 1, 1, class "8-bit", bits 8, components [R], color Sint, core 1 0;
|
||||
R8_SRGB = 1, 1, class "8-bit", bits 8, components [R], color Srgb, core 1 0;
|
||||
R8G8_UNORM = 2, 1, class "16-bit", bits 8, components [R G], color Unorm, core 1 0;
|
||||
R8G8_SNORM = 2, 1, class "16-bit", bits 8, components [R G], color Snorm, core 1 0;
|
||||
R8G8_USCALED = 2, 1, class "16-bit", bits 8, components [R G], color Uscaled, core 1 0;
|
||||
R8G8_SSCALED = 2, 1, class "16-bit", bits 8, components [R G], color Sscaled, core 1 0;
|
||||
R8G8_UINT = 2, 1, class "16-bit", bits 8, components [R G], color Uint, core 1 0;
|
||||
R8G8_SINT = 2, 1, class "16-bit", bits 8, components [R G], color Sint, core 1 0;
|
||||
R8G8_SRGB = 2, 1, class "16-bit", bits 8, components [R G], color Srgb, core 1 0;
|
||||
R8G8B8_UNORM = 3, 1, class "24-bit", bits 8, components [R G B], color Unorm, core 1 0;
|
||||
R8G8B8_SNORM = 3, 1, class "24-bit", bits 8, components [R G B], color Snorm, core 1 0;
|
||||
R8G8B8_USCALED = 3, 1, class "24-bit", bits 8, components [R G B], color Uscaled, core 1 0;
|
||||
R8G8B8_SSCALED = 3, 1, class "24-bit", bits 8, components [R G B], color Sscaled, core 1 0;
|
||||
R8G8B8_UINT = 3, 1, class "24-bit", bits 8, components [R G B], color Uint, core 1 0;
|
||||
R8G8B8_SINT = 3, 1, class "24-bit", bits 8, components [R G B], color Sint, core 1 0;
|
||||
R8G8B8_SRGB = 3, 1, class "24-bit", bits 8, components [R G B], color Srgb, core 1 0;
|
||||
B8G8R8_UNORM = 3, 1, class "24-bit", bits 8, components [R G B], color Unorm, core 1 0;
|
||||
B8G8R8_SNORM = 3, 1, class "24-bit", bits 8, components [R G B], color Snorm, core 1 0;
|
||||
B8G8R8_USCALED = 3, 1, class "24-bit", bits 8, components [R G B], color Uscaled, core 1 0;
|
||||
B8G8R8_SSCALED = 3, 1, class "24-bit", bits 8, components [R G B], color Sscaled, core 1 0;
|
||||
B8G8R8_UINT = 3, 1, class "24-bit", bits 8, components [R G B], color Uint, core 1 0;
|
||||
B8G8R8_SINT = 3, 1, class "24-bit", bits 8, components [R G B], color Sint, core 1 0;
|
||||
B8G8R8_SRGB = 3, 1, class "24-bit", bits 8, components [R G B], color Srgb, core 1 0;
|
||||
R8G8B8A8_UNORM = 4, 1, class "32-bit", bits 8, components [R G B A], color Unorm, core 1 0;
|
||||
R8G8B8A8_SNORM = 4, 1, class "32-bit", bits 8, components [R G B A], color Snorm, core 1 0;
|
||||
R8G8B8A8_USCALED = 4, 1, class "32-bit", bits 8, components [R G B A], color Uscaled, core 1 0;
|
||||
R8G8B8A8_SSCALED = 4, 1, class "32-bit", bits 8, components [R G B A], color Sscaled, core 1 0;
|
||||
R8G8B8A8_UINT = 4, 1, class "32-bit", bits 8, components [R G B A], color Uint, core 1 0;
|
||||
R8G8B8A8_SINT = 4, 1, class "32-bit", bits 8, components [R G B A], color Sint, core 1 0;
|
||||
R8G8B8A8_SRGB = 4, 1, class "32-bit", bits 8, components [R G B A], color Srgb, core 1 0;
|
||||
B8G8R8A8_UNORM = 4, 1, class "32-bit", bits 8, components [R G B A], color Unorm, core 1 0;
|
||||
B8G8R8A8_SNORM = 4, 1, class "32-bit", bits 8, components [R G B A], color Snorm, core 1 0;
|
||||
B8G8R8A8_USCALED = 4, 1, class "32-bit", bits 8, components [R G B A], color Uscaled, core 1 0;
|
||||
B8G8R8A8_SSCALED = 4, 1, class "32-bit", bits 8, components [R G B A], color Sscaled, core 1 0;
|
||||
B8G8R8A8_UINT = 4, 1, class "32-bit", bits 8, components [R G B A], color Uint, core 1 0;
|
||||
B8G8R8A8_SINT = 4, 1, class "32-bit", bits 8, components [R G B A], color Sint, core 1 0;
|
||||
B8G8R8A8_SRGB = 4, 1, class "32-bit", bits 8, components [R G B A], color Srgb, core 1 0;
|
||||
A8B8G8R8_UNORM_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, components [R G B A], color Unorm, core 1 0;
|
||||
A8B8G8R8_SNORM_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, components [R G B A], color Snorm, core 1 0;
|
||||
A8B8G8R8_USCALED_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, components [R G B A], color Uscaled, core 1 0;
|
||||
A8B8G8R8_SSCALED_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, components [R G B A], color Sscaled, core 1 0;
|
||||
A8B8G8R8_UINT_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, components [R G B A], color Uint, core 1 0;
|
||||
A8B8G8R8_SINT_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, components [R G B A], color Sint, core 1 0;
|
||||
A8B8G8R8_SRGB_PACK32 = 4, 1, class "32-bit", packed 32, bits 8, components [R G B A], color Srgb, core 1 0;
|
||||
A2R10G10B10_UNORM_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Unorm, core 1 0;
|
||||
A2R10G10B10_SNORM_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Snorm, core 1 0;
|
||||
A2R10G10B10_USCALED_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Uscaled, core 1 0;
|
||||
A2R10G10B10_SSCALED_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Sscaled, core 1 0;
|
||||
A2R10G10B10_UINT_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Uint, core 1 0;
|
||||
A2R10G10B10_SINT_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Sint, core 1 0;
|
||||
A2B10G10R10_UNORM_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Unorm, core 1 0;
|
||||
A2B10G10R10_SNORM_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Snorm, core 1 0;
|
||||
A2B10G10R10_USCALED_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Uscaled, core 1 0;
|
||||
A2B10G10R10_SSCALED_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Sscaled, core 1 0;
|
||||
A2B10G10R10_UINT_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Uint, core 1 0;
|
||||
A2B10G10R10_SINT_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B A], color Sint, core 1 0;
|
||||
R16_UNORM = 2, 1, class "16-bit", bits 16, components [R], color Unorm, core 1 0;
|
||||
R16_SNORM = 2, 1, class "16-bit", bits 16, components [R], color Snorm, core 1 0;
|
||||
R16_USCALED = 2, 1, class "16-bit", bits 16, components [R], color Uscaled, core 1 0;
|
||||
R16_SSCALED = 2, 1, class "16-bit", bits 16, components [R], color Sscaled, core 1 0;
|
||||
R16_UINT = 2, 1, class "16-bit", bits 16, components [R], color Uint, core 1 0;
|
||||
R16_SINT = 2, 1, class "16-bit", bits 16, components [R], color Sint, core 1 0;
|
||||
R16_SFLOAT = 2, 1, class "16-bit", bits 16, components [R], color Sfloat, core 1 0;
|
||||
R16G16_UNORM = 4, 1, class "32-bit", bits 16, components [R G], color Unorm, core 1 0;
|
||||
R16G16_SNORM = 4, 1, class "32-bit", bits 16, components [R G], color Snorm, core 1 0;
|
||||
R16G16_USCALED = 4, 1, class "32-bit", bits 16, components [R G], color Uscaled, core 1 0;
|
||||
R16G16_SSCALED = 4, 1, class "32-bit", bits 16, components [R G], color Sscaled, core 1 0;
|
||||
R16G16_UINT = 4, 1, class "32-bit", bits 16, components [R G], color Uint, core 1 0;
|
||||
R16G16_SINT = 4, 1, class "32-bit", bits 16, components [R G], color Sint, core 1 0;
|
||||
R16G16_SFLOAT = 4, 1, class "32-bit", bits 16, components [R G], color Sfloat, core 1 0;
|
||||
R16G16B16_UNORM = 6, 1, class "48-bit", bits 16, components [R G B], color Unorm, core 1 0;
|
||||
R16G16B16_SNORM = 6, 1, class "48-bit", bits 16, components [R G B], color Snorm, core 1 0;
|
||||
R16G16B16_USCALED = 6, 1, class "48-bit", bits 16, components [R G B], color Uscaled, core 1 0;
|
||||
R16G16B16_SSCALED = 6, 1, class "48-bit", bits 16, components [R G B], color Sscaled, core 1 0;
|
||||
R16G16B16_UINT = 6, 1, class "48-bit", bits 16, components [R G B], color Uint, core 1 0;
|
||||
R16G16B16_SINT = 6, 1, class "48-bit", bits 16, components [R G B], color Sint, core 1 0;
|
||||
R16G16B16_SFLOAT = 6, 1, class "48-bit", bits 16, components [R G B], color Sfloat, core 1 0;
|
||||
R16G16B16A16_UNORM = 8, 1, class "64-bit", bits 16, components [R G B A], color Unorm, core 1 0;
|
||||
R16G16B16A16_SNORM = 8, 1, class "64-bit", bits 16, components [R G B A], color Snorm, core 1 0;
|
||||
R16G16B16A16_USCALED = 8, 1, class "64-bit", bits 16, components [R G B A], color Uscaled, core 1 0;
|
||||
R16G16B16A16_SSCALED = 8, 1, class "64-bit", bits 16, components [R G B A], color Sscaled, core 1 0;
|
||||
R16G16B16A16_UINT = 8, 1, class "64-bit", bits 16, components [R G B A], color Uint, core 1 0;
|
||||
R16G16B16A16_SINT = 8, 1, class "64-bit", bits 16, components [R G B A], color Sint, core 1 0;
|
||||
R16G16B16A16_SFLOAT = 8, 1, class "64-bit", bits 16, components [R G B A], color Sfloat, core 1 0;
|
||||
R32_UINT = 4, 1, class "32-bit", bits 32, components [R], color Uint, core 1 0;
|
||||
R32_SINT = 4, 1, class "32-bit", bits 32, components [R], color Sint, core 1 0;
|
||||
R32_SFLOAT = 4, 1, class "32-bit", bits 32, components [R], color Sfloat, core 1 0;
|
||||
R32G32_UINT = 8, 1, class "64-bit", bits 32, components [R G], color Uint, core 1 0;
|
||||
R32G32_SINT = 8, 1, class "64-bit", bits 32, components [R G], color Sint, core 1 0;
|
||||
R32G32_SFLOAT = 8, 1, class "64-bit", bits 32, components [R G], color Sfloat, core 1 0;
|
||||
R32G32B32_UINT = 12, 1, class "96-bit", bits 32, components [R G B], color Uint, core 1 0;
|
||||
R32G32B32_SINT = 12, 1, class "96-bit", bits 32, components [R G B], color Sint, core 1 0;
|
||||
R32G32B32_SFLOAT = 12, 1, class "96-bit", bits 32, components [R G B], color Sfloat, core 1 0;
|
||||
R32G32B32A32_UINT = 16, 1, class "128-bit", bits 32, components [R G B A], color Uint, core 1 0;
|
||||
R32G32B32A32_SINT = 16, 1, class "128-bit", bits 32, components [R G B A], color Sint, core 1 0;
|
||||
R32G32B32A32_SFLOAT = 16, 1, class "128-bit", bits 32, components [R G B A], color Sfloat, core 1 0;
|
||||
R64_UINT = 8, 1, class "64-bit", bits 64, components [R], color Uint, core 1 0;
|
||||
R64_SINT = 8, 1, class "64-bit", bits 64, components [R], color Sint, core 1 0;
|
||||
R64_SFLOAT = 8, 1, class "64-bit", bits 64, components [R], color Sfloat, core 1 0;
|
||||
R64G64_UINT = 16, 1, class "128-bit", bits 64, components [R G], color Uint, core 1 0;
|
||||
R64G64_SINT = 16, 1, class "128-bit", bits 64, components [R G], color Sint, core 1 0;
|
||||
R64G64_SFLOAT = 16, 1, class "128-bit", bits 64, components [R G], color Sfloat, core 1 0;
|
||||
R64G64B64_UINT = 24, 1, class "192-bit", bits 64, components [R G B], color Uint, core 1 0;
|
||||
R64G64B64_SINT = 24, 1, class "192-bit", bits 64, components [R G B], color Sint, core 1 0;
|
||||
R64G64B64_SFLOAT = 24, 1, class "192-bit", bits 64, components [R G B], color Sfloat, core 1 0;
|
||||
R64G64B64A64_UINT = 32, 1, class "256-bit", bits 64, components [R G B A], color Uint, core 1 0;
|
||||
R64G64B64A64_SINT = 32, 1, class "256-bit", bits 64, components [R G B A], color Sint, core 1 0;
|
||||
R64G64B64A64_SFLOAT = 32, 1, class "256-bit", bits 64, components [R G B A], color Sfloat, core 1 0;
|
||||
B10G11R11_UFLOAT_PACK32 = 4, 1, class "32-bit", packed 32, components [R G B], color Ufloat, core 1 0;
|
||||
E5B9G9R9_UFLOAT_PACK32 = 4, 1, class "32-bit", packed 32, bits 9, components [R G B], color Ufloat, core 1 0;
|
||||
D16_UNORM = 2, 1, class "D16", bits 16, depth Unorm, core 1 0;
|
||||
X8_D24_UNORM_PACK32 = 4, 1, class "D24", packed 32, bits 24, depth Unorm, core 1 0;
|
||||
D32_SFLOAT = 4, 1, class "D32", bits 32, depth Sfloat, core 1 0;
|
||||
@@ -1797,168 +1797,168 @@ vk_format_blocks! {
|
||||
D16_UNORM_S8_UINT = 3, 1, class "D16S8", depth Unorm, stencil Uint, core 1 0;
|
||||
D24_UNORM_S8_UINT = 4, 1, class "D24S8", depth Unorm, stencil Uint, core 1 0;
|
||||
D32_SFLOAT_S8_UINT = 5, 1, class "D32S8", depth Sfloat, stencil Uint, core 1 0;
|
||||
BC1_RGB_UNORM_BLOCK = 8, 16, class "BC1_RGB", color Unorm, core 1 0;
|
||||
BC1_RGB_SRGB_BLOCK = 8, 16, class "BC1_RGB", color Srgb, core 1 0;
|
||||
BC1_RGBA_UNORM_BLOCK = 8, 16, class "BC1_RGBA", color Unorm, core 1 0;
|
||||
BC1_RGBA_SRGB_BLOCK = 8, 16, class "BC1_RGBA", color Srgb, core 1 0;
|
||||
BC2_UNORM_BLOCK = 16, 16, class "BC2", color Unorm, core 1 0;
|
||||
BC2_SRGB_BLOCK = 16, 16, class "BC2", color Srgb, core 1 0;
|
||||
BC3_UNORM_BLOCK = 16, 16, class "BC3", color Unorm, core 1 0;
|
||||
BC3_SRGB_BLOCK = 16, 16, class "BC3", color Srgb, core 1 0;
|
||||
BC4_UNORM_BLOCK = 8, 16, class "BC4", color Unorm, core 1 0;
|
||||
BC4_SNORM_BLOCK = 8, 16, class "BC4", color Snorm, core 1 0;
|
||||
BC5_UNORM_BLOCK = 16, 16, class "BC5", color Unorm, core 1 0;
|
||||
BC5_SNORM_BLOCK = 16, 16, class "BC5", color Snorm, core 1 0;
|
||||
BC6H_UFLOAT_BLOCK = 16, 16, class "BC6H", color Ufloat, core 1 0;
|
||||
BC6H_SFLOAT_BLOCK = 16, 16, class "BC6H", color Sfloat, core 1 0;
|
||||
BC7_UNORM_BLOCK = 16, 16, class "BC7", color Unorm, core 1 0;
|
||||
BC7_SRGB_BLOCK = 16, 16, class "BC7", color Srgb, core 1 0;
|
||||
ETC2_R8G8B8_UNORM_BLOCK = 8, 16, class "ETC2_RGB", color Unorm, core 1 0;
|
||||
ETC2_R8G8B8_SRGB_BLOCK = 8, 16, class "ETC2_RGB", color Srgb, core 1 0;
|
||||
ETC2_R8G8B8A1_UNORM_BLOCK = 8, 16, class "ETC2_RGBA", color Unorm, core 1 0;
|
||||
ETC2_R8G8B8A1_SRGB_BLOCK = 8, 16, class "ETC2_RGBA", color Srgb, core 1 0;
|
||||
ETC2_R8G8B8A8_UNORM_BLOCK = 16, 16, class "ETC2_EAC_RGBA", color Unorm, core 1 0;
|
||||
ETC2_R8G8B8A8_SRGB_BLOCK = 16, 16, class "ETC2_EAC_RGBA", color Srgb, core 1 0;
|
||||
EAC_R11_UNORM_BLOCK = 8, 16, class "EAC_R", bits 11, color Unorm, core 1 0;
|
||||
EAC_R11_SNORM_BLOCK = 8, 16, class "EAC_R", bits 11, color Snorm, core 1 0;
|
||||
EAC_R11G11_UNORM_BLOCK = 16, 16, class "EAC_RG", bits 11, color Unorm, core 1 0;
|
||||
EAC_R11G11_SNORM_BLOCK = 16, 16, class "EAC_RG", bits 11, color Snorm, core 1 0;
|
||||
ASTC_4X4_UNORM_BLOCK = 16, 16, class "ASTC_4x4", color Unorm, core 1 0;
|
||||
ASTC_4X4_SRGB_BLOCK = 16, 16, class "ASTC_4x4", color Srgb, core 1 0;
|
||||
ASTC_5X4_UNORM_BLOCK = 16, 20, class "ASTC_5x4", color Unorm, core 1 0;
|
||||
ASTC_5X4_SRGB_BLOCK = 16, 20, class "ASTC_5x4", color Srgb, core 1 0;
|
||||
ASTC_5X5_UNORM_BLOCK = 16, 25, class "ASTC_5x5", color Unorm, core 1 0;
|
||||
ASTC_5X5_SRGB_BLOCK = 16, 25, class "ASTC_5x5", color Srgb, core 1 0;
|
||||
ASTC_6X5_UNORM_BLOCK = 16, 30, class "ASTC_6x5", color Unorm, core 1 0;
|
||||
ASTC_6X5_SRGB_BLOCK = 16, 30, class "ASTC_6x5", color Srgb, core 1 0;
|
||||
ASTC_6X6_UNORM_BLOCK = 16, 36, class "ASTC_6x6", color Unorm, core 1 0;
|
||||
ASTC_6X6_SRGB_BLOCK = 16, 36, class "ASTC_6x6", color Srgb, core 1 0;
|
||||
ASTC_8X5_UNORM_BLOCK = 16, 40, class "ASTC_8x5", color Unorm, core 1 0;
|
||||
ASTC_8X5_SRGB_BLOCK = 16, 40, class "ASTC_8x5", color Srgb, core 1 0;
|
||||
ASTC_8X6_UNORM_BLOCK = 16, 48, class "ASTC_8x6", color Unorm, core 1 0;
|
||||
ASTC_8X6_SRGB_BLOCK = 16, 48, class "ASTC_8x6", color Srgb, core 1 0;
|
||||
ASTC_8X8_UNORM_BLOCK = 16, 64, class "ASTC_8x8", color Unorm, core 1 0;
|
||||
ASTC_8X8_SRGB_BLOCK = 16, 64, class "ASTC_8x8", color Srgb, core 1 0;
|
||||
ASTC_10X5_UNORM_BLOCK = 16, 50, class "ASTC_10x5", color Unorm, core 1 0;
|
||||
ASTC_10X5_SRGB_BLOCK = 16, 50, class "ASTC_10x5", color Srgb, core 1 0;
|
||||
ASTC_10X6_UNORM_BLOCK = 16, 60, class "ASTC_10x6", color Unorm, core 1 0;
|
||||
ASTC_10X6_SRGB_BLOCK = 16, 60, class "ASTC_10x6", color Srgb, core 1 0;
|
||||
ASTC_10X8_UNORM_BLOCK = 16, 80, class "ASTC_10x8", color Unorm, core 1 0;
|
||||
ASTC_10X8_SRGB_BLOCK = 16, 80, class "ASTC_10x8", color Srgb, core 1 0;
|
||||
ASTC_10X10_UNORM_BLOCK = 16, 100, class "ASTC_10x10", color Unorm, core 1 0;
|
||||
ASTC_10X10_SRGB_BLOCK = 16, 100, class "ASTC_10x10", color Srgb, core 1 0;
|
||||
ASTC_12X10_UNORM_BLOCK = 16, 120, class "ASTC_12x10", color Unorm, core 1 0;
|
||||
ASTC_12X10_SRGB_BLOCK = 16, 120, class "ASTC_12x10", color Srgb, core 1 0;
|
||||
ASTC_12X12_UNORM_BLOCK = 16, 144, class "ASTC_12x12", color Unorm, core 1 0;
|
||||
ASTC_12X12_SRGB_BLOCK = 16, 144, class "ASTC_12x12", color Srgb, core 1 0;
|
||||
G8B8G8R8_422_UNORM = 4, 1, class "32-bit G8B8G8R8", bits 8, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
B8G8R8G8_422_UNORM = 4, 1, class "32-bit B8G8R8G8", bits 8, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8_R8_3PLANE_420_UNORM = 3, 1, class "8-bit 3-plane 420", bits 8, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8R8_2PLANE_420_UNORM = 3, 1, class "8-bit 2-plane 420", bits 8, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8_R8_3PLANE_422_UNORM = 3, 1, class "8-bit 3-plane 422", bits 8, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8R8_2PLANE_422_UNORM = 3, 1, class "8-bit 2-plane 422", bits 8, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8_R8_3PLANE_444_UNORM = 3, 1, class "8-bit 3-plane 444", bits 8, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R10X6_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R10X6G10X6_UNORM_2PACK16 = 4, 1, class "32-bit", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 8, 1, class "64-bit R10G10B10A10", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 8, 1, class "64-bit G10B10G10R10", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 8, 1, class "64-bit B10G10R10G10", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 6, 1, class "10-bit 3-plane 420", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 6, 1, class "10-bit 2-plane 420", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 6, 1, class "10-bit 3-plane 422", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 6, 1, class "10-bit 2-plane 422", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 6, 1, class "10-bit 3-plane 444", packed 16, bits 10, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R12X4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R12X4G12X4_UNORM_2PACK16 = 4, 1, class "32-bit", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 8, 1, class "64-bit R12G12B12A12", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 8, 1, class "64-bit G12B12G12R12", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 8, 1, class "64-bit B12G12R12G12", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 6, 1, class "12-bit 3-plane 420", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 6, 1, class "12-bit 2-plane 420", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 6, 1, class "12-bit 3-plane 422", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 6, 1, class "12-bit 2-plane 422", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 6, 1, class "12-bit 3-plane 444", packed 16, bits 12, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16B16G16R16_422_UNORM = 8, 1, class "64-bit G16B16G16R16", bits 16, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
B16G16R16G16_422_UNORM = 8, 1, class "64-bit B16G16R16G16", bits 16, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16_R16_3PLANE_420_UNORM = 6, 1, class "16-bit 3-plane 420", bits 16, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16R16_2PLANE_420_UNORM = 6, 1, class "16-bit 2-plane 420", bits 16, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16_R16_3PLANE_422_UNORM = 6, 1, class "16-bit 3-plane 422", bits 16, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16R16_2PLANE_422_UNORM = 6, 1, class "16-bit 2-plane 422", bits 16, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16_R16_3PLANE_444_UNORM = 6, 1, class "16-bit 3-plane 444", bits 16, color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8R8_2PLANE_444_UNORM = 3, 1, class "8-bit 2-plane 444", bits 8, color Unorm, core 1 3, ext "VK_EXT_ycbcr_2plane_444_formats";
|
||||
G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 6, 1, class "10-bit 2-plane 444", packed 16, bits 10, color Unorm, core 1 3, ext "VK_EXT_ycbcr_2plane_444_formats";
|
||||
G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 6, 1, class "12-bit 2-plane 444", packed 16, bits 12, color Unorm, core 1 3, ext "VK_EXT_ycbcr_2plane_444_formats";
|
||||
G16_B16R16_2PLANE_444_UNORM = 6, 1, class "16-bit 2-plane 444", bits 16, color Unorm, core 1 3, ext "VK_EXT_ycbcr_2plane_444_formats";
|
||||
A4R4G4B4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 4, color Unorm, core 1 3, ext "VK_EXT_4444_formats";
|
||||
A4B4G4R4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 4, color Unorm, core 1 3, ext "VK_EXT_4444_formats";
|
||||
ASTC_4X4_SFLOAT_BLOCK = 16, 16, class "ASTC_4x4", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_5X4_SFLOAT_BLOCK = 16, 20, class "ASTC_5x4", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_5X5_SFLOAT_BLOCK = 16, 25, class "ASTC_5x5", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_6X5_SFLOAT_BLOCK = 16, 30, class "ASTC_6x5", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_6X6_SFLOAT_BLOCK = 16, 36, class "ASTC_6x6", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_8X5_SFLOAT_BLOCK = 16, 40, class "ASTC_8x5", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_8X6_SFLOAT_BLOCK = 16, 48, class "ASTC_8x6", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_8X8_SFLOAT_BLOCK = 16, 64, class "ASTC_8x8", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_10X5_SFLOAT_BLOCK = 16, 50, class "ASTC_10x5", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_10X6_SFLOAT_BLOCK = 16, 60, class "ASTC_10x6", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_10X8_SFLOAT_BLOCK = 16, 80, class "ASTC_10x8", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_10X10_SFLOAT_BLOCK = 16, 100, class "ASTC_10x10", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_12X10_SFLOAT_BLOCK = 16, 120, class "ASTC_12x10", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_12X12_SFLOAT_BLOCK = 16, 144, class "ASTC_12x12", color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
A1B5G5R5_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, color Unorm, core 1 4, ext "VK_KHR_maintenance5";
|
||||
A8_UNORM = 1, 1, class "8-bit alpha", bits 8, color Unorm, core 1 4, ext "VK_KHR_maintenance5";
|
||||
PVRTC1_2BPP_UNORM_BLOCK_IMG = 8, 1, class "PVRTC1_2BPP", color Unorm, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC1_4BPP_UNORM_BLOCK_IMG = 8, 1, class "PVRTC1_4BPP", color Unorm, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC2_2BPP_UNORM_BLOCK_IMG = 8, 1, class "PVRTC2_2BPP", color Unorm, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC2_4BPP_UNORM_BLOCK_IMG = 8, 1, class "PVRTC2_4BPP", color Unorm, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC1_2BPP_SRGB_BLOCK_IMG = 8, 1, class "PVRTC1_2BPP", color Srgb, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC1_4BPP_SRGB_BLOCK_IMG = 8, 1, class "PVRTC1_4BPP", color Srgb, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC2_2BPP_SRGB_BLOCK_IMG = 8, 1, class "PVRTC2_2BPP", color Srgb, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC2_4BPP_SRGB_BLOCK_IMG = 8, 1, class "PVRTC2_4BPP", color Srgb, ext "VK_IMG_format_pvrtc";
|
||||
ASTC_3X3X3_UNORM_BLOCK_EXT = 16, 27, class "ASTC_3x3x3", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_3X3X3_SRGB_BLOCK_EXT = 16, 27, class "ASTC_3x3x3", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_3X3X3_SFLOAT_BLOCK_EXT = 16, 27, class "ASTC_3x3x3", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X3X3_UNORM_BLOCK_EXT = 16, 36, class "ASTC_4x3x3", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X3X3_SRGB_BLOCK_EXT = 16, 36, class "ASTC_4x3x3", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X3X3_SFLOAT_BLOCK_EXT = 16, 36, class "ASTC_4x3x3", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X3_UNORM_BLOCK_EXT = 16, 48, class "ASTC_4x4x3", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X3_SRGB_BLOCK_EXT = 16, 48, class "ASTC_4x4x3", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X3_SFLOAT_BLOCK_EXT = 16, 48, class "ASTC_4x4x3", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X4_UNORM_BLOCK_EXT = 16, 64, class "ASTC_4x4x4", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X4_SRGB_BLOCK_EXT = 16, 64, class "ASTC_4x4x4", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X4_SFLOAT_BLOCK_EXT = 16, 64, class "ASTC_4x4x4", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X4X4_UNORM_BLOCK_EXT = 16, 80, class "ASTC_5x4x4", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X4X4_SRGB_BLOCK_EXT = 16, 80, class "ASTC_5x4x4", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X4X4_SFLOAT_BLOCK_EXT = 16, 80, class "ASTC_5x4x4", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X4_UNORM_BLOCK_EXT = 16, 100, class "ASTC_5x5x4", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X4_SRGB_BLOCK_EXT = 16, 100, class "ASTC_5x5x4", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X4_SFLOAT_BLOCK_EXT = 16, 100, class "ASTC_5x5x4", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X5_UNORM_BLOCK_EXT = 16, 125, class "ASTC_5x5x5", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X5_SRGB_BLOCK_EXT = 16, 125, class "ASTC_5x5x5", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X5_SFLOAT_BLOCK_EXT = 16, 125, class "ASTC_5x5x5", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X5X5_UNORM_BLOCK_EXT = 16, 150, class "ASTC_6x5x5", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X5X5_SRGB_BLOCK_EXT = 16, 150, class "ASTC_6x5x5", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X5X5_SFLOAT_BLOCK_EXT = 16, 150, class "ASTC_6x5x5", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X5_UNORM_BLOCK_EXT = 16, 180, class "ASTC_6x6x5", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X5_SRGB_BLOCK_EXT = 16, 180, class "ASTC_6x6x5", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X5_SFLOAT_BLOCK_EXT = 16, 180, class "ASTC_6x6x5", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X6_UNORM_BLOCK_EXT = 16, 216, class "ASTC_6x6x6", color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X6_SRGB_BLOCK_EXT = 16, 216, class "ASTC_6x6x6", color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X6_SFLOAT_BLOCK_EXT = 16, 216, class "ASTC_6x6x6", color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
R8_BOOL_ARM = 1, 1, class "8-bit", bits 8, color Bool, ext "VK_ARM_tensors";
|
||||
R16G16_SFIXED5_NV = 4, 1, class "32-bit", bits 16, color Sfixed5, ext "VK_NV_optical_flow";
|
||||
R10X6_UINT_PACK16_ARM = 2, 1, class "16-bit", packed 16, bits 10, color Uint, ext "VK_ARM_format_pack";
|
||||
R10X6G10X6_UINT_2PACK16_ARM = 4, 1, class "32-bit", packed 16, bits 10, color Uint, ext "VK_ARM_format_pack";
|
||||
R10X6G10X6B10X6A10X6_UINT_4PACK16_ARM = 8, 1, class "64-bit R10G10B10A10", packed 16, bits 10, color Uint, ext "VK_ARM_format_pack";
|
||||
R12X4_UINT_PACK16_ARM = 2, 1, class "16-bit", packed 16, bits 12, color Uint, ext "VK_ARM_format_pack";
|
||||
R12X4G12X4_UINT_2PACK16_ARM = 4, 1, class "32-bit", packed 16, bits 12, color Uint, ext "VK_ARM_format_pack";
|
||||
R12X4G12X4B12X4A12X4_UINT_4PACK16_ARM = 8, 1, class "64-bit R12G12B12A12", packed 16, bits 12, color Uint, ext "VK_ARM_format_pack";
|
||||
R14X2_UINT_PACK16_ARM = 2, 1, class "16-bit", packed 16, bits 14, color Uint, ext "VK_ARM_format_pack";
|
||||
R14X2G14X2_UINT_2PACK16_ARM = 4, 1, class "32-bit", packed 16, bits 14, color Uint, ext "VK_ARM_format_pack";
|
||||
R14X2G14X2B14X2A14X2_UINT_4PACK16_ARM = 8, 1, class "64-bit R14G14B14A14", packed 16, bits 14, color Uint, ext "VK_ARM_format_pack";
|
||||
R14X2_UNORM_PACK16_ARM = 2, 1, class "16-bit", packed 16, bits 14, color Unorm, ext "VK_ARM_format_pack";
|
||||
R14X2G14X2_UNORM_2PACK16_ARM = 4, 1, class "32-bit", packed 16, bits 14, color Unorm, ext "VK_ARM_format_pack";
|
||||
R14X2G14X2B14X2A14X2_UNORM_4PACK16_ARM = 8, 1, class "64-bit R14G14B14A14", packed 16, bits 14, color Unorm, ext "VK_ARM_format_pack";
|
||||
G14X2_B14X2R14X2_2PLANE_420_UNORM_3PACK16_ARM = 6, 1, class "14-bit 2-plane 420", packed 16, bits 14, color Unorm, ext "VK_ARM_format_pack";
|
||||
G14X2_B14X2R14X2_2PLANE_422_UNORM_3PACK16_ARM = 6, 1, class "14-bit 2-plane 422", packed 16, bits 14, color Unorm, ext "VK_ARM_format_pack";
|
||||
BC1_RGB_UNORM_BLOCK = 8, 16, class "BC1_RGB", components [R G B], color Unorm, core 1 0;
|
||||
BC1_RGB_SRGB_BLOCK = 8, 16, class "BC1_RGB", components [R G B], color Srgb, core 1 0;
|
||||
BC1_RGBA_UNORM_BLOCK = 8, 16, class "BC1_RGBA", components [R G B A], color Unorm, core 1 0;
|
||||
BC1_RGBA_SRGB_BLOCK = 8, 16, class "BC1_RGBA", components [R G B A], color Srgb, core 1 0;
|
||||
BC2_UNORM_BLOCK = 16, 16, class "BC2", components [R G B A], color Unorm, core 1 0;
|
||||
BC2_SRGB_BLOCK = 16, 16, class "BC2", components [R G B A], color Srgb, core 1 0;
|
||||
BC3_UNORM_BLOCK = 16, 16, class "BC3", components [R G B A], color Unorm, core 1 0;
|
||||
BC3_SRGB_BLOCK = 16, 16, class "BC3", components [R G B A], color Srgb, core 1 0;
|
||||
BC4_UNORM_BLOCK = 8, 16, class "BC4", components [R], color Unorm, core 1 0;
|
||||
BC4_SNORM_BLOCK = 8, 16, class "BC4", components [R], color Snorm, core 1 0;
|
||||
BC5_UNORM_BLOCK = 16, 16, class "BC5", components [R G], color Unorm, core 1 0;
|
||||
BC5_SNORM_BLOCK = 16, 16, class "BC5", components [R G], color Snorm, core 1 0;
|
||||
BC6H_UFLOAT_BLOCK = 16, 16, class "BC6H", components [R G B], color Ufloat, core 1 0;
|
||||
BC6H_SFLOAT_BLOCK = 16, 16, class "BC6H", components [R G B], color Sfloat, core 1 0;
|
||||
BC7_UNORM_BLOCK = 16, 16, class "BC7", components [R G B A], color Unorm, core 1 0;
|
||||
BC7_SRGB_BLOCK = 16, 16, class "BC7", components [R G B A], color Srgb, core 1 0;
|
||||
ETC2_R8G8B8_UNORM_BLOCK = 8, 16, class "ETC2_RGB", components [R G B], color Unorm, core 1 0;
|
||||
ETC2_R8G8B8_SRGB_BLOCK = 8, 16, class "ETC2_RGB", components [R G B], color Srgb, core 1 0;
|
||||
ETC2_R8G8B8A1_UNORM_BLOCK = 8, 16, class "ETC2_RGBA", components [R G B A], color Unorm, core 1 0;
|
||||
ETC2_R8G8B8A1_SRGB_BLOCK = 8, 16, class "ETC2_RGBA", components [R G B A], color Srgb, core 1 0;
|
||||
ETC2_R8G8B8A8_UNORM_BLOCK = 16, 16, class "ETC2_EAC_RGBA", components [R G B A], color Unorm, core 1 0;
|
||||
ETC2_R8G8B8A8_SRGB_BLOCK = 16, 16, class "ETC2_EAC_RGBA", components [R G B A], color Srgb, core 1 0;
|
||||
EAC_R11_UNORM_BLOCK = 8, 16, class "EAC_R", bits 11, components [R], color Unorm, core 1 0;
|
||||
EAC_R11_SNORM_BLOCK = 8, 16, class "EAC_R", bits 11, components [R], color Snorm, core 1 0;
|
||||
EAC_R11G11_UNORM_BLOCK = 16, 16, class "EAC_RG", bits 11, components [R G], color Unorm, core 1 0;
|
||||
EAC_R11G11_SNORM_BLOCK = 16, 16, class "EAC_RG", bits 11, components [R G], color Snorm, core 1 0;
|
||||
ASTC_4X4_UNORM_BLOCK = 16, 16, class "ASTC_4x4", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_4X4_SRGB_BLOCK = 16, 16, class "ASTC_4x4", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_5X4_UNORM_BLOCK = 16, 20, class "ASTC_5x4", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_5X4_SRGB_BLOCK = 16, 20, class "ASTC_5x4", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_5X5_UNORM_BLOCK = 16, 25, class "ASTC_5x5", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_5X5_SRGB_BLOCK = 16, 25, class "ASTC_5x5", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_6X5_UNORM_BLOCK = 16, 30, class "ASTC_6x5", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_6X5_SRGB_BLOCK = 16, 30, class "ASTC_6x5", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_6X6_UNORM_BLOCK = 16, 36, class "ASTC_6x6", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_6X6_SRGB_BLOCK = 16, 36, class "ASTC_6x6", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_8X5_UNORM_BLOCK = 16, 40, class "ASTC_8x5", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_8X5_SRGB_BLOCK = 16, 40, class "ASTC_8x5", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_8X6_UNORM_BLOCK = 16, 48, class "ASTC_8x6", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_8X6_SRGB_BLOCK = 16, 48, class "ASTC_8x6", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_8X8_UNORM_BLOCK = 16, 64, class "ASTC_8x8", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_8X8_SRGB_BLOCK = 16, 64, class "ASTC_8x8", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_10X5_UNORM_BLOCK = 16, 50, class "ASTC_10x5", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_10X5_SRGB_BLOCK = 16, 50, class "ASTC_10x5", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_10X6_UNORM_BLOCK = 16, 60, class "ASTC_10x6", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_10X6_SRGB_BLOCK = 16, 60, class "ASTC_10x6", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_10X8_UNORM_BLOCK = 16, 80, class "ASTC_10x8", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_10X8_SRGB_BLOCK = 16, 80, class "ASTC_10x8", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_10X10_UNORM_BLOCK = 16, 100, class "ASTC_10x10", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_10X10_SRGB_BLOCK = 16, 100, class "ASTC_10x10", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_12X10_UNORM_BLOCK = 16, 120, class "ASTC_12x10", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_12X10_SRGB_BLOCK = 16, 120, class "ASTC_12x10", components [R G B A], color Srgb, core 1 0;
|
||||
ASTC_12X12_UNORM_BLOCK = 16, 144, class "ASTC_12x12", components [R G B A], color Unorm, core 1 0;
|
||||
ASTC_12X12_SRGB_BLOCK = 16, 144, class "ASTC_12x12", components [R G B A], color Srgb, core 1 0;
|
||||
G8B8G8R8_422_UNORM = 4, 1, class "32-bit G8B8G8R8", bits 8, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
B8G8R8G8_422_UNORM = 4, 1, class "32-bit B8G8R8G8", bits 8, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8_R8_3PLANE_420_UNORM = 3, 1, class "8-bit 3-plane 420", bits 8, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8R8_2PLANE_420_UNORM = 3, 1, class "8-bit 2-plane 420", bits 8, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8_R8_3PLANE_422_UNORM = 3, 1, class "8-bit 3-plane 422", bits 8, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8R8_2PLANE_422_UNORM = 3, 1, class "8-bit 2-plane 422", bits 8, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8_R8_3PLANE_444_UNORM = 3, 1, class "8-bit 3-plane 444", bits 8, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R10X6_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 10, components [R], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R10X6G10X6_UNORM_2PACK16 = 4, 1, class "32-bit", packed 16, bits 10, components [R G], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 8, 1, class "64-bit R10G10B10A10", packed 16, bits 10, components [R G B A], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 8, 1, class "64-bit G10B10G10R10", packed 16, bits 10, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 8, 1, class "64-bit B10G10R10G10", packed 16, bits 10, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 6, 1, class "10-bit 3-plane 420", packed 16, bits 10, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 6, 1, class "10-bit 2-plane 420", packed 16, bits 10, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 6, 1, class "10-bit 3-plane 422", packed 16, bits 10, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 6, 1, class "10-bit 2-plane 422", packed 16, bits 10, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 6, 1, class "10-bit 3-plane 444", packed 16, bits 10, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R12X4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 12, components [R], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R12X4G12X4_UNORM_2PACK16 = 4, 1, class "32-bit", packed 16, bits 12, components [R G], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 8, 1, class "64-bit R12G12B12A12", packed 16, bits 12, components [R G B A], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 8, 1, class "64-bit G12B12G12R12", packed 16, bits 12, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 8, 1, class "64-bit B12G12R12G12", packed 16, bits 12, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 6, 1, class "12-bit 3-plane 420", packed 16, bits 12, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 6, 1, class "12-bit 2-plane 420", packed 16, bits 12, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 6, 1, class "12-bit 3-plane 422", packed 16, bits 12, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 6, 1, class "12-bit 2-plane 422", packed 16, bits 12, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 6, 1, class "12-bit 3-plane 444", packed 16, bits 12, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16B16G16R16_422_UNORM = 8, 1, class "64-bit G16B16G16R16", bits 16, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
B16G16R16G16_422_UNORM = 8, 1, class "64-bit B16G16R16G16", bits 16, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16_R16_3PLANE_420_UNORM = 6, 1, class "16-bit 3-plane 420", bits 16, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16R16_2PLANE_420_UNORM = 6, 1, class "16-bit 2-plane 420", bits 16, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16_R16_3PLANE_422_UNORM = 6, 1, class "16-bit 3-plane 422", bits 16, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16R16_2PLANE_422_UNORM = 6, 1, class "16-bit 2-plane 422", bits 16, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G16_B16_R16_3PLANE_444_UNORM = 6, 1, class "16-bit 3-plane 444", bits 16, components [R G B], color Unorm, core 1 1, ext "VK_KHR_sampler_ycbcr_conversion";
|
||||
G8_B8R8_2PLANE_444_UNORM = 3, 1, class "8-bit 2-plane 444", bits 8, components [R G B], color Unorm, core 1 3, ext "VK_EXT_ycbcr_2plane_444_formats";
|
||||
G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 6, 1, class "10-bit 2-plane 444", packed 16, bits 10, components [R G B], color Unorm, core 1 3, ext "VK_EXT_ycbcr_2plane_444_formats";
|
||||
G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 6, 1, class "12-bit 2-plane 444", packed 16, bits 12, components [R G B], color Unorm, core 1 3, ext "VK_EXT_ycbcr_2plane_444_formats";
|
||||
G16_B16R16_2PLANE_444_UNORM = 6, 1, class "16-bit 2-plane 444", bits 16, components [R G B], color Unorm, core 1 3, ext "VK_EXT_ycbcr_2plane_444_formats";
|
||||
A4R4G4B4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 4, components [R G B A], color Unorm, core 1 3, ext "VK_EXT_4444_formats";
|
||||
A4B4G4R4_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, bits 4, components [R G B A], color Unorm, core 1 3, ext "VK_EXT_4444_formats";
|
||||
ASTC_4X4_SFLOAT_BLOCK = 16, 16, class "ASTC_4x4", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_5X4_SFLOAT_BLOCK = 16, 20, class "ASTC_5x4", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_5X5_SFLOAT_BLOCK = 16, 25, class "ASTC_5x5", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_6X5_SFLOAT_BLOCK = 16, 30, class "ASTC_6x5", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_6X6_SFLOAT_BLOCK = 16, 36, class "ASTC_6x6", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_8X5_SFLOAT_BLOCK = 16, 40, class "ASTC_8x5", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_8X6_SFLOAT_BLOCK = 16, 48, class "ASTC_8x6", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_8X8_SFLOAT_BLOCK = 16, 64, class "ASTC_8x8", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_10X5_SFLOAT_BLOCK = 16, 50, class "ASTC_10x5", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_10X6_SFLOAT_BLOCK = 16, 60, class "ASTC_10x6", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_10X8_SFLOAT_BLOCK = 16, 80, class "ASTC_10x8", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_10X10_SFLOAT_BLOCK = 16, 100, class "ASTC_10x10", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_12X10_SFLOAT_BLOCK = 16, 120, class "ASTC_12x10", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
ASTC_12X12_SFLOAT_BLOCK = 16, 144, class "ASTC_12x12", components [R G B A], color Sfloat, core 1 3, ext "VK_EXT_texture_compression_astc_hdr";
|
||||
A1B5G5R5_UNORM_PACK16 = 2, 1, class "16-bit", packed 16, components [R G B A], color Unorm, core 1 4, ext "VK_KHR_maintenance5";
|
||||
A8_UNORM = 1, 1, class "8-bit alpha", bits 8, components [A], color Unorm, core 1 4, ext "VK_KHR_maintenance5";
|
||||
PVRTC1_2BPP_UNORM_BLOCK_IMG = 8, 1, class "PVRTC1_2BPP", components [R G B A], color Unorm, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC1_4BPP_UNORM_BLOCK_IMG = 8, 1, class "PVRTC1_4BPP", components [R G B A], color Unorm, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC2_2BPP_UNORM_BLOCK_IMG = 8, 1, class "PVRTC2_2BPP", components [R G B A], color Unorm, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC2_4BPP_UNORM_BLOCK_IMG = 8, 1, class "PVRTC2_4BPP", components [R G B A], color Unorm, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC1_2BPP_SRGB_BLOCK_IMG = 8, 1, class "PVRTC1_2BPP", components [R G B A], color Srgb, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC1_4BPP_SRGB_BLOCK_IMG = 8, 1, class "PVRTC1_4BPP", components [R G B A], color Srgb, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC2_2BPP_SRGB_BLOCK_IMG = 8, 1, class "PVRTC2_2BPP", components [R G B A], color Srgb, ext "VK_IMG_format_pvrtc";
|
||||
PVRTC2_4BPP_SRGB_BLOCK_IMG = 8, 1, class "PVRTC2_4BPP", components [R G B A], color Srgb, ext "VK_IMG_format_pvrtc";
|
||||
ASTC_3X3X3_UNORM_BLOCK_EXT = 16, 27, class "ASTC_3x3x3", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_3X3X3_SRGB_BLOCK_EXT = 16, 27, class "ASTC_3x3x3", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_3X3X3_SFLOAT_BLOCK_EXT = 16, 27, class "ASTC_3x3x3", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X3X3_UNORM_BLOCK_EXT = 16, 36, class "ASTC_4x3x3", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X3X3_SRGB_BLOCK_EXT = 16, 36, class "ASTC_4x3x3", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X3X3_SFLOAT_BLOCK_EXT = 16, 36, class "ASTC_4x3x3", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X3_UNORM_BLOCK_EXT = 16, 48, class "ASTC_4x4x3", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X3_SRGB_BLOCK_EXT = 16, 48, class "ASTC_4x4x3", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X3_SFLOAT_BLOCK_EXT = 16, 48, class "ASTC_4x4x3", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X4_UNORM_BLOCK_EXT = 16, 64, class "ASTC_4x4x4", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X4_SRGB_BLOCK_EXT = 16, 64, class "ASTC_4x4x4", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_4X4X4_SFLOAT_BLOCK_EXT = 16, 64, class "ASTC_4x4x4", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X4X4_UNORM_BLOCK_EXT = 16, 80, class "ASTC_5x4x4", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X4X4_SRGB_BLOCK_EXT = 16, 80, class "ASTC_5x4x4", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X4X4_SFLOAT_BLOCK_EXT = 16, 80, class "ASTC_5x4x4", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X4_UNORM_BLOCK_EXT = 16, 100, class "ASTC_5x5x4", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X4_SRGB_BLOCK_EXT = 16, 100, class "ASTC_5x5x4", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X4_SFLOAT_BLOCK_EXT = 16, 100, class "ASTC_5x5x4", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X5_UNORM_BLOCK_EXT = 16, 125, class "ASTC_5x5x5", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X5_SRGB_BLOCK_EXT = 16, 125, class "ASTC_5x5x5", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_5X5X5_SFLOAT_BLOCK_EXT = 16, 125, class "ASTC_5x5x5", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X5X5_UNORM_BLOCK_EXT = 16, 150, class "ASTC_6x5x5", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X5X5_SRGB_BLOCK_EXT = 16, 150, class "ASTC_6x5x5", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X5X5_SFLOAT_BLOCK_EXT = 16, 150, class "ASTC_6x5x5", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X5_UNORM_BLOCK_EXT = 16, 180, class "ASTC_6x6x5", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X5_SRGB_BLOCK_EXT = 16, 180, class "ASTC_6x6x5", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X5_SFLOAT_BLOCK_EXT = 16, 180, class "ASTC_6x6x5", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X6_UNORM_BLOCK_EXT = 16, 216, class "ASTC_6x6x6", components [R G B A], color Unorm, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X6_SRGB_BLOCK_EXT = 16, 216, class "ASTC_6x6x6", components [R G B A], color Srgb, ext "VK_EXT_texture_compression_astc_3d";
|
||||
ASTC_6X6X6_SFLOAT_BLOCK_EXT = 16, 216, class "ASTC_6x6x6", components [R G B A], color Sfloat, ext "VK_EXT_texture_compression_astc_3d";
|
||||
R8_BOOL_ARM = 1, 1, class "8-bit", bits 8, components [R], color Bool, ext "VK_ARM_tensors";
|
||||
R16G16_SFIXED5_NV = 4, 1, class "32-bit", bits 16, components [R G], color Sfixed5, ext "VK_NV_optical_flow";
|
||||
R10X6_UINT_PACK16_ARM = 2, 1, class "16-bit", packed 16, bits 10, components [R], color Uint, ext "VK_ARM_format_pack";
|
||||
R10X6G10X6_UINT_2PACK16_ARM = 4, 1, class "32-bit", packed 16, bits 10, components [R G], color Uint, ext "VK_ARM_format_pack";
|
||||
R10X6G10X6B10X6A10X6_UINT_4PACK16_ARM = 8, 1, class "64-bit R10G10B10A10", packed 16, bits 10, components [R G B A], color Uint, ext "VK_ARM_format_pack";
|
||||
R12X4_UINT_PACK16_ARM = 2, 1, class "16-bit", packed 16, bits 12, components [R], color Uint, ext "VK_ARM_format_pack";
|
||||
R12X4G12X4_UINT_2PACK16_ARM = 4, 1, class "32-bit", packed 16, bits 12, components [R G], color Uint, ext "VK_ARM_format_pack";
|
||||
R12X4G12X4B12X4A12X4_UINT_4PACK16_ARM = 8, 1, class "64-bit R12G12B12A12", packed 16, bits 12, components [R G B A], color Uint, ext "VK_ARM_format_pack";
|
||||
R14X2_UINT_PACK16_ARM = 2, 1, class "16-bit", packed 16, bits 14, components [R], color Uint, ext "VK_ARM_format_pack";
|
||||
R14X2G14X2_UINT_2PACK16_ARM = 4, 1, class "32-bit", packed 16, bits 14, components [R G], color Uint, ext "VK_ARM_format_pack";
|
||||
R14X2G14X2B14X2A14X2_UINT_4PACK16_ARM = 8, 1, class "64-bit R14G14B14A14", packed 16, bits 14, components [R G B A], color Uint, ext "VK_ARM_format_pack";
|
||||
R14X2_UNORM_PACK16_ARM = 2, 1, class "16-bit", packed 16, bits 14, components [R], color Unorm, ext "VK_ARM_format_pack";
|
||||
R14X2G14X2_UNORM_2PACK16_ARM = 4, 1, class "32-bit", packed 16, bits 14, components [R G], color Unorm, ext "VK_ARM_format_pack";
|
||||
R14X2G14X2B14X2A14X2_UNORM_4PACK16_ARM = 8, 1, class "64-bit R14G14B14A14", packed 16, bits 14, components [R G B A], color Unorm, ext "VK_ARM_format_pack";
|
||||
G14X2_B14X2R14X2_2PLANE_420_UNORM_3PACK16_ARM = 6, 1, class "14-bit 2-plane 420", packed 16, bits 14, components [R G B], color Unorm, ext "VK_ARM_format_pack";
|
||||
G14X2_B14X2R14X2_2PLANE_422_UNORM_3PACK16_ARM = 6, 1, class "14-bit 2-plane 422", packed 16, bits 14, components [R G B], color Unorm, ext "VK_ARM_format_pack";
|
||||
}
|
||||
@@ -401,11 +401,16 @@ macro_rules! vk_bit {
|
||||
|
||||
/// Defines [`Format::block`] and [`Format::exposure`] from the registry's `<formats>`: per
|
||||
/// format, `blockSize`, `texelsPerBlock`, its compatibility `class`, the `packed` width when
|
||||
/// present, the bit width every component shares when there is one, the `numericFormat` of each
|
||||
/// aspect it has, and the core version and extensions that define the enum value.
|
||||
/// present, the bit width every component shares when there is one, its color components, the
|
||||
/// `numericFormat` of each aspect it has, and the core version and extensions that define the enum
|
||||
/// value.
|
||||
macro_rules! vk_format_blocks {
|
||||
(@opt) => { None };
|
||||
(@opt $v:literal) => { Some($v) };
|
||||
(@components) => { $crate::vk::ColorComponentFlags::empty() };
|
||||
(@components $($c:ident)*) => {
|
||||
$crate::vk::ColorComponentFlags::empty()$(.union($crate::vk::ColorComponentFlags::$c))*
|
||||
};
|
||||
(@numeric) => { None };
|
||||
(@numeric $v:ident) => { Some($crate::vk::NumericFormat::$v) };
|
||||
(@core) => { None };
|
||||
@@ -415,6 +420,7 @@ macro_rules! vk_format_blocks {
|
||||
(
|
||||
$($konst:ident = $size:literal, $texels:literal, class $class:literal
|
||||
$(, packed $packed:literal)? $(, bits $bits:literal)?
|
||||
$(, components [$($component:ident)*])?
|
||||
$(, color $color:ident)? $(, depth $depth:ident)? $(, stencil $stencil:ident)?
|
||||
$(, core $major:literal $minor:literal)? $(, ext $ext:literal)*;)*
|
||||
) => {
|
||||
@@ -430,6 +436,7 @@ macro_rules! vk_format_blocks {
|
||||
class: $class,
|
||||
packed_bits: vk_format_blocks!(@opt $($packed)?),
|
||||
component_bits: vk_format_blocks!(@opt $($bits)?),
|
||||
color_components: vk_format_blocks!(@components $($($component)*)?),
|
||||
color: vk_format_blocks!(@numeric $($color)?),
|
||||
depth: vk_format_blocks!(@numeric $($depth)?),
|
||||
stencil: vk_format_blocks!(@numeric $($stencil)?),
|
||||
|
||||
@@ -36,6 +36,10 @@ pub struct FormatBlock {
|
||||
/// The bit width every component has, when they share one (none for compressed formats and
|
||||
/// mixed widths such as `D24_UNORM_S8_UINT`).
|
||||
pub component_bits: Option<u32>,
|
||||
/// The color components the format has (`R`, `G`, `B`, `A`, as the registry's `<component>`s
|
||||
/// name them), which a color write mask's bits name: a write whose mask names none of them
|
||||
/// stores nothing. Empty for a depth or stencil format.
|
||||
pub color_components: super::ColorComponentFlags,
|
||||
/// The numeric format of the color components (`R`, `G`, `B`, `A`), for a color format. The
|
||||
/// registry records an sRGB format's alpha as `UNORM`; the spec's `SRGB` numeric format covers
|
||||
/// that, so such a format is `Srgb`.
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
target triple = "air64_v29-apple-macosx27.0.0"
|
||||
source_filename = "-"
|
||||
; datalayout DataLayout { endian: Little, pointers: {0: PointerSpec { size_bits: 64, abi_bits: 64, pref_bits: 64, index_bits: 64 }}, ints: {1: AlignSpec { abi_bits: 8, pref_bits: 8 }, 8: AlignSpec { abi_bits: 8, pref_bits: 8 }, 16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }}, floats: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }}, vectors: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 24: AlignSpec { abi_bits: 32, pref_bits: 32 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 48: AlignSpec { abi_bits: 64, pref_bits: 64 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 96: AlignSpec { abi_bits: 128, pref_bits: 128 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }, 192: AlignSpec { abi_bits: 256, pref_bits: 256 }, 256: AlignSpec { abi_bits: 256, pref_bits: 256 }, 512: AlignSpec { abi_bits: 512, pref_bits: 512 }, 1024: AlignSpec { abi_bits: 1024, pref_bits: 1024 }}, aggregate: AlignSpec { abi_bits: 0, pref_bits: 64 }, native_ints: [8, 16, 32], stack_align_bits: None, alloca_space: 0, program_space: 0, globals_space: 0, mangling: None, fn_ptr_align: None, non_integral: [] }
|
||||
%t6 = type <4 x half> (<4 x float>, <4 x half>, ptr addrspace(2))
|
||||
%t8 = type i32 (float)
|
||||
%t10 = type void ()
|
||||
%t12 = type [2 x i32]
|
||||
c6 = %t12 [27, 0]
|
||||
|
||||
define %t6 @f0 "smw_unread" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins"="" "no-trapping-math"="true" "stack-protector-buffer-size"="8" %a2( align 8 dereferenceable(8) Ref nocapture "air-buffer-no-alias"="" ) {
|
||||
bb0:
|
||||
%i0 = extractelement %a0, i64 0
|
||||
%i1 = tail call i32 @f1 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 1 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 1 }, src_kind: Float, src_fp8: None })](%i0)
|
||||
%i2 = and i32 %i1, i32 3
|
||||
%i3 = icmp eq %i2, i32 0
|
||||
br %i3, bb1, bb2
|
||||
bb1:
|
||||
tail call void @f2 [air Fragment(Discard)]()
|
||||
br bb2
|
||||
bb2:
|
||||
%i7 = load <4 x half>, %a2, align 8
|
||||
ret %i7
|
||||
}
|
||||
|
||||
declare %t8 @f1 "air.convert.u.i32.f.f32" memory(NoModRef, NoModRef, NoModRef)
|
||||
|
||||
declare %t10 @f2 "air.discard_fragment"
|
||||
!md0 = !"SDK Version"
|
||||
!md1 = !"wchar_size"
|
||||
!md2 = !"frame-pointer"
|
||||
!md3 = !"air.max_device_buffers"
|
||||
!md4 = !"air.max_constant_buffers"
|
||||
!md5 = !"air.max_threadgroup_buffers"
|
||||
!md6 = !"air.max_textures"
|
||||
!md7 = !"air.max_read_write_textures"
|
||||
!md8 = !"air.max_samplers"
|
||||
!md9 = !"air.render_target"
|
||||
!md10 = !"air.arg_type_name"
|
||||
!md11 = !"half4"
|
||||
!md12 = !"air.position"
|
||||
!md13 = !"air.center"
|
||||
!md14 = !"air.no_perspective"
|
||||
!md15 = !"float4"
|
||||
!md16 = !"air.arg_name"
|
||||
!md17 = !"p"
|
||||
!md18 = !"unread"
|
||||
!md19 = !"air.arg_unused"
|
||||
!md20 = !"air.buffer"
|
||||
!md21 = !"air.buffer_size"
|
||||
!md22 = !"air.location_index"
|
||||
!md23 = !"air.read"
|
||||
!md24 = !"air.address_space"
|
||||
!md25 = !"air.arg_type_size"
|
||||
!md26 = !"air.arg_type_align_size"
|
||||
!md27 = !"tint"
|
||||
!md28 = !"air.compile.denorms_disable"
|
||||
!md29 = !"air.compile.fast_math_disable"
|
||||
!md30 = !"air.compile.framebuffer_fetch_enable"
|
||||
!md31 = !"Apple metal version 32023.921 (metalfe-32023.921.6)"
|
||||
!md32 = !"Metal"
|
||||
!md33 = i32 2
|
||||
!md34 = %t12 c6
|
||||
!md35 = i32 1
|
||||
!md36 = i32 4
|
||||
!md37 = i32 7
|
||||
!md38 = i32 31
|
||||
!md39 = i32 128
|
||||
!md40 = i32 8
|
||||
!md41 = i32 16
|
||||
!md42 = ptr addrspace(0) @f0
|
||||
!md43 = i32 0
|
||||
!md44 = i32 9
|
||||
!md45 = !{!md33, !md0, !md34}
|
||||
!md46 = !{!md35, !md1, !md36}
|
||||
!md47 = !{!md37, !md2, !md33}
|
||||
!md48 = !{!md37, !md3, !md38}
|
||||
!md49 = !{!md37, !md4, !md38}
|
||||
!md50 = !{!md37, !md5, !md38}
|
||||
!md51 = !{!md37, !md6, !md39}
|
||||
!md52 = !{!md37, !md7, !md40}
|
||||
!md53 = !{!md37, !md8, !md41}
|
||||
!md54 = !{!md9, !md43, !md43, !md10, !md11}
|
||||
!md55 = !{!md54}
|
||||
!md56 = !{!md43, !md12, !md13, !md14, !md10, !md15, !md16, !md17}
|
||||
!md57 = !{!md35, !md9, !md43, !md10, !md11, !md16, !md18, !md19}
|
||||
!md58 = !{!md33, !md20, !md21, !md40, !md22, !md43, !md35, !md23, !md24, !md33, !md25, !md40, !md26, !md40, !md10, !md11, !md16, !md27}
|
||||
!md59 = !{!md56, !md57, !md58}
|
||||
!md60 = !{!md42, !md55, !md59}
|
||||
!md61 = !{!md28}
|
||||
!md62 = !{!md29}
|
||||
!md63 = !{!md30}
|
||||
!md64 = !{!md31}
|
||||
!md65 = !{!md33, !md44, !md43}
|
||||
!md66 = !{!md32, !md36, !md35, !md43}
|
||||
!"llvm.module.flags" = !{!md45, !md46, !md47, !md48, !md49, !md50, !md51, !md52, !md53}
|
||||
!"air.fragment" = !{!md60}
|
||||
!"air.compile_options" = !{!md61, !md62, !md63}
|
||||
!"llvm.ident" = !{!md64}
|
||||
!"air.version" = !{!md65}
|
||||
!"air.language_version" = !{!md66}
|
||||
@@ -1867,6 +1867,8 @@ engine/smp_runtime_array.air.ll smp_runtime_array ok ok ok ok ok ok ok ok ok ok
|
||||
engine/smp_runtime_array.ll smp_runtime_array ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{DescriptorCount; AnyOf[[Limit { limit: MaxPerStageDescriptorSampledImages, required: 32, available: 16 }]]} Unsupported{DescriptorCount; AnyOf[[Limit { limit: MaxPerStageDescriptorSampledImages, required: 32, available: 16 }]]}
|
||||
engine/smp_shared_sampler.air.ll smp_shared_sampler ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{DescriptorCount; AnyOf[[Limit { limit: MaxPerStageDescriptorSampledImages, required: 32, available: 16 }]]} Unsupported{DescriptorCount; AnyOf[[Limit { limit: MaxPerStageDescriptorSampledImages, required: 32, available: 16 }]]}
|
||||
engine/smp_shared_sampler.ll smp_shared_sampler ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{DescriptorCount; AnyOf[[Limit { limit: MaxPerStageDescriptorSampledImages, required: 32, available: 16 }]]} Unsupported{DescriptorCount; AnyOf[[Limit { limit: MaxPerStageDescriptorSampledImages, required: 32, available: 16 }]]}
|
||||
engine/smw_unread.air.ll smw_unread ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/smw_unread.ll smw_unread ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/smw_writers.air.ll smw_full ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/smw_writers.air.ll smw_plain ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
engine/smw_writers.air.ll smw_discard ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -17,7 +17,8 @@ the non-beta C header. Unknown registry forms and conflicting redefinitions fail
|
||||
The registry's `<formats>` element becomes one `vk_format_blocks!` invocation, which defines
|
||||
`vk::Format::block`: per named format its `blockSize`, `texelsPerBlock`, compatibility `class`
|
||||
(which a view's format must share), `packed` width, the bit width every component
|
||||
shares (when one does), and the `numericFormat` of each aspect (color, depth, stencil; an sRGB
|
||||
shares (when one does), its color components (the `R`, `G`, `B` and `A` it has, which a color
|
||||
write mask names), and the `numericFormat` of each aspect (color, depth, stencil; an sRGB
|
||||
format's `UNORM` alpha belongs to its `SRGB` color numeric format, as the spec's numeric-format
|
||||
table defines). The binder counts texel-buffer elements and aligns vertex
|
||||
attributes with it, and `vk::Format::numeric_type` reads the numeric formats. The same invocation defines `vk::Format::exposure`: the lowest core version whose
|
||||
|
||||
@@ -452,8 +452,9 @@ def aspect_numeric_formats(name, components):
|
||||
|
||||
def format_blocks(registry):
|
||||
"""(const, blockSize, texelsPerBlock, class, packed bits or None, shared component bits or
|
||||
None, color, depth, stencil numeric format or None, core version or None, extension names)
|
||||
for every canonical `VkFormat` value the registry's `<formats>` describes, in enum order.
|
||||
None, color components, color, depth, stencil numeric format or None, core version or None,
|
||||
extension names) for every canonical `VkFormat` value the registry's `<formats>` describes,
|
||||
in enum order.
|
||||
|
||||
The class is the format's compatibility class (the spec's "Compatible Formats" table, the
|
||||
registry's `class`): a view's format must share its image's, so a format of the same block
|
||||
@@ -464,7 +465,9 @@ def format_blocks(registry):
|
||||
|
||||
The shared component width is the one bit count every `<component>` has, when there is one
|
||||
and it is a number (compressed formats and mixed widths such as `D24_UNORM_S8_UINT` have
|
||||
none). The numeric formats are each aspect's `numericFormat` ([`aspect_numeric_formats`]).
|
||||
none). The color components are the names of its `R`, `G`, `B` and `A` `<component>`s, in
|
||||
that order (`""` for a depth or stencil format): those a color write mask's bits name. The
|
||||
numeric formats are each aspect's `numericFormat` ([`aspect_numeric_formats`]).
|
||||
A `<format>` of a value the enum excludes (beta, disabled) is skipped; one naming an alias, a
|
||||
duplicate, or an unknown attribute or child fails generation.
|
||||
"""
|
||||
@@ -508,7 +511,9 @@ def format_blocks(registry):
|
||||
shared = int(width)
|
||||
if name in described:
|
||||
raise ValueError(f"{name} described twice")
|
||||
described[name] = (size, texels, cls, packed, shared,
|
||||
named = {component for component, _ in numerics}
|
||||
components = "".join(c for c in "RGBA" if c in named)
|
||||
described[name] = (size, texels, cls, packed, shared, components,
|
||||
*aspect_numeric_formats(name, numerics))
|
||||
rows, aliases = registry.entries("VkFormat", is_bits=False)
|
||||
for alias, _ in aliases:
|
||||
@@ -523,15 +528,18 @@ def format_blocks(registry):
|
||||
|
||||
def render_format_blocks(registry):
|
||||
"""One `vk_format_blocks!` invocation: `Format::block` and `Format::exposure` for every
|
||||
described format: its texel block, each aspect's numeric format, and where it is defined."""
|
||||
described format: its texel block, its color components, each aspect's numeric format, and
|
||||
where it is defined."""
|
||||
out = ["vk_format_blocks! {"]
|
||||
for (const, size, texels, cls, packed, shared, color, depth, stencil, core,
|
||||
for (const, size, texels, cls, packed, shared, components, color, depth, stencil, core,
|
||||
extensions) in format_blocks(registry):
|
||||
row = f' {const} = {size}, {texels}, class "{cls}"'
|
||||
if packed is not None:
|
||||
row += f", packed {packed}"
|
||||
if shared is not None:
|
||||
row += f", bits {shared}"
|
||||
if components:
|
||||
row += f", components [{' '.join(components)}]"
|
||||
for aspect, numeric in (("color", color), ("depth", depth), ("stencil", stencil)):
|
||||
if numeric is not None:
|
||||
row += f", {aspect} {numeric}"
|
||||
|
||||
@@ -181,24 +181,27 @@ class FormatBlockTests(unittest.TestCase):
|
||||
rows = format_blocks(Registry(format_registry(BLOCKS)))
|
||||
core = (1, 0)
|
||||
self.assertEqual(rows, [
|
||||
("R8_UNORM", 1, 1, "8-bit", None, 8, "Unorm", None, None, core, []),
|
||||
("A2B10G10R10_UNORM_PACK32", 4, 1, "32-bit", 32, None, "Unorm", None, None, core,
|
||||
("R8_UNORM", 1, 1, "8-bit", None, 8, "R", "Unorm", None, None, core, []),
|
||||
("A2B10G10R10_UNORM_PACK32", 4, 1, "32-bit", 32, None, "BA", "Unorm", None, None,
|
||||
core, []),
|
||||
("BC1_RGB_UNORM_BLOCK", 8, 16, "BC1_RGB", None, None, "R", "Unorm", None, None, core,
|
||||
[]),
|
||||
("BC1_RGB_UNORM_BLOCK", 8, 16, "BC1_RGB", None, None, "Unorm", None, None, core, []),
|
||||
("D16_UNORM_S8_UINT", 3, 1, "D16S8", None, None, None, "Unorm", "Uint", core, []),
|
||||
("R8G8B8A8_SRGB", 4, 1, "32-bit", None, 8, "Srgb", None, None, (1, 4),
|
||||
("D16_UNORM_S8_UINT", 3, 1, "D16S8", None, None, "", None, "Unorm", "Uint", core, []),
|
||||
("R8G8B8A8_SRGB", 4, 1, "32-bit", None, 8, "RGBA", "Srgb", None, None, (1, 4),
|
||||
["VK_KHR_srgb"]),
|
||||
("BC_IMG", 8, 16, "BC", None, None, "Unorm", None, None, None, ["VK_IMG_bc"]),
|
||||
("BC_IMG", 8, 16, "BC", None, None, "R", "Unorm", None, None, None, ["VK_IMG_bc"]),
|
||||
])
|
||||
self.assertEqual(render_format_blocks(Registry(format_registry(BLOCKS))), [
|
||||
"vk_format_blocks! {",
|
||||
' R8_UNORM = 1, 1, class "8-bit", bits 8, color Unorm, core 1 0;',
|
||||
' A2B10G10R10_UNORM_PACK32 = 4, 1, class "32-bit", packed 32, color Unorm, core 1 0;',
|
||||
' BC1_RGB_UNORM_BLOCK = 8, 16, class "BC1_RGB", color Unorm, core 1 0;',
|
||||
' R8_UNORM = 1, 1, class "8-bit", bits 8, components [R], color Unorm, core 1 0;',
|
||||
' A2B10G10R10_UNORM_PACK32 = 4, 1, class "32-bit", packed 32, components [B A],'
|
||||
' color Unorm, core 1 0;',
|
||||
' BC1_RGB_UNORM_BLOCK = 8, 16, class "BC1_RGB", components [R], color Unorm,'
|
||||
' core 1 0;',
|
||||
' D16_UNORM_S8_UINT = 3, 1, class "D16S8", depth Unorm, stencil Uint, core 1 0;',
|
||||
' R8G8B8A8_SRGB = 4, 1, class "32-bit", bits 8, color Srgb, core 1 4,'
|
||||
' ext "VK_KHR_srgb";',
|
||||
' BC_IMG = 8, 16, class "BC", color Unorm, ext "VK_IMG_bc";',
|
||||
' R8G8B8A8_SRGB = 4, 1, class "32-bit", bits 8, components [R G B A], color Srgb,'
|
||||
' core 1 4, ext "VK_KHR_srgb";',
|
||||
' BC_IMG = 8, 16, class "BC", components [R], color Unorm, ext "VK_IMG_bc";',
|
||||
"}",
|
||||
"",
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user