vulkan: deduplicate shorthand casting defines to common.comp

This commit is contained in:
Lynne
2025-12-22 16:37:29 +01:00
parent 6eced88188
commit cfcf52a08c
3 changed files with 10 additions and 6 deletions

View File

@@ -50,6 +50,16 @@ layout(buffer_reference, buffer_reference_align = 8) buffer u64buf {
uint64_t v;
};
#define U8(x) uint8_t(x)
#define U16(x) uint16_t(x)
#define U32(x) uint32_t(x)
#define U64(x) uint64_t(x)
#define I8(x) int8_t(x)
#define I16(x) int16_t(x)
#define I32(x) int32_t(x)
#define I64(x) int64_t(x)
#define OFFBUF(type, b, l) \
type(uint64_t(b) + uint64_t(l))

View File

@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define U8(x) (uint8_t(x))
#define I16(x) (int16_t(x))
#define COMP_ID (gl_LocalInvocationID.x)
GetBitContext gb;

View File

@@ -16,9 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define U8(x) (uint8_t (x))
#define U16(x) (uint16_t(x))
/**
* Table 9, encoded as (last_rice_q << 0) | (krice or kexp << 4) | ((kexp or kexp + 1) << 8)
* According to the SMPTE document, abs(prev_dc_diff) should be used