From 826c195f053234d56cd869f5d585b12148f18ce7 Mon Sep 17 00:00:00 2001 From: Mark Callow Date: Wed, 1 Apr 2026 12:49:22 +0900 Subject: [PATCH 1/2] Permit KHR_DF_SAMPLE_DATATYPE_LINEAR to vary from format definition. Fixes issue #231. --- ktxspec.adoc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/ktxspec.adoc b/ktxspec.adoc index 6dca661..6804ea5 100644 --- a/ktxspec.adoc +++ b/ktxspec.adoc @@ -964,13 +964,15 @@ _dfDescriptorBlock_. * If <<_vkformat,`vkFormat`>> is not `VK_FORMAT_UNDEFINED`, the DFD's `texelBlockDimension*`, `bytesPlane*` and sample information - fields must match the format's definition. The `colorModel` must - be `KHR_DF_MODEL_RGBSDA`, `KHR_DF_MODEL_YUVSDA` or the matching - block compressed color model listed in <> - {url-df-spec}#CompressedFormatModels[Section 5.6] or its successors, - currently `KHR_DF_MODEL_BC1A` to `KHR_DF_MODEL_UASTC`. - `KHR_DF_MODEL_YUVSDA` should be used for all non-prohibited - `+*_422_*+` formats. + fields must match the format's definition except that the + `KHR_DF_SAMPLE_DATATYPE_LINEAR` bit of a sample's `qualifiers` + field may differ, if required by the following bullets. +* The `colorModel` must be `KHR_DF_MODEL_RGBSDA`, + `KHR_DF_MODEL_YUVSDA` or the matching block compressed color model + listed in <> {url-df-spec}#CompressedFormatModels[Section + 5.6] or its successors, currently `KHR_DF_MODEL_BC1A` to + `KHR_DF_MODEL_UASTC`. `KHR_DF_MODEL_YUVSDA` should be used for + all non-prohibited `+*_422_*+` formats. * If <<_vkformat,`vkFormat`>> is one of the `+*_SRGB{,_*}+` formats, `transferFunction` must be `KHR_DF_TRANSFER_SRGB`. * If <<_vkformat,`vkFormat`>> is not one of the `+*_SRGB{,_*}+` formats @@ -985,6 +987,10 @@ _dfDescriptorBlock_. - If <<_vkformat,`vkFormat`>> is not one of the `+*_HLG{,_*}+` formats and an HLG variant of that format exists, `transferFunction` should not be `KHR_DF_TRANSFER_HLG`. +* If `transferFunction` is not `KHR_DF_TRANSFER_LINEAR` or ` + `KHR_DF_TRANSFER_UNSPECIFIED` and an alpha channel exists, + `KHR_DF_SAMPLE_DATATYPE_LINEAR` must be set in the `qualifiers` + field of the alpha sample. * If <<_vkformat,`vkFormat`>> is one of the `+*_[SU]INT{,_*}+` formats or one of the depth, stencil, or combined depth/stencil formats `colorPrimaries` must be `KHR_DF_PRIMARIES_UNSPECIFIED` and `transferFunction` From 5adb27ee93565689619ec94fb31b2567b14ce4da Mon Sep 17 00:00:00 2001 From: Mark Callow Date: Fri, 3 Apr 2026 09:18:42 +0900 Subject: [PATCH 2/2] Update revision history. --- ktxspec.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ktxspec.adoc b/ktxspec.adoc index 6804ea5..50765b0 100644 --- a/ktxspec.adoc +++ b/ktxspec.adoc @@ -2548,6 +2548,8 @@ include::appendices/vendor-metadata.adoc[] functions. - Update KDFS references to 1.4 and make the links active. + - Clarify that KHR_DF_SAMPLE_DATATYPE_LINEAR + can vary from format definition. |=== [discrete]