19#define RUN_UNSUPPORTED false
23#define RUN_SRGB_UNIMPLEMENTED false
24#define RUN_NON_STANDARD_UNIMPLEMENTED false
25#define RUN_COMPONENT_UNIMPLEMENTED false
38 const float4 fcol = {0.0f, 1.3f, -231.0f, 1000.0f};
39 const uint4 ucol = {0, 1, 2, 12223};
71 GTEST_SKIP() <<
"OpenGL texture clearing workaround doesn't support 1d textures.";
79 float4 clear_color(0.9f, 0.7f, 0.2f, 1.0f);
99 GTEST_SKIP() <<
"Read back of 1d texture arrays not supported by OpenGL";
101 const int LAYERS = 8;
109 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
129 GTEST_SKIP() <<
"Read back of 1d texture arrays not supported by OpenGL";
131 const int LAYERS = 8;
135 int total_size = LAYERS *
SIZE * 4;
136 float *data_in = (
float *)
MEM_callocN(
sizeof(
float) * total_size, __func__);
147 EXPECT_EQ(memcmp(data_in, data_out,
sizeof(
float) * total_size), 0);
157 const int LAYERS = 8;
164 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
183 const int LAYERS = 8;
187 int total_size = LAYERS *
SIZE *
SIZE * 4;
188 float *data_in = (
float *)
MEM_callocN(
sizeof(
float) * total_size, __func__);
199 EXPECT_EQ(memcmp(data_in, data_out,
sizeof(
float) * total_size), 0);
214 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
233 const int LAYERS = 2;
240 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
262 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
281 const int SIZE = 128;
288 const float4 color(0.0, 1.0f, 2.0f, 123.0f);
289 const float4 clear_color(0.0f);
314 if (std::is_same<DataType, float>()) {
330 static_assert(!std::is_same<DataType, float>());
334 "texture", Size, Size, 1, DeviceFormat, usage,
nullptr);
335 if (texture ==
nullptr) {
336 GTEST_SKIP() <<
"Platform doesn't support texture format [" <<
STRINGIFY(DeviceFormat) <<
"]";
339 size_t data_len = Size * Size *
350 bool ok = (read_data[i] - data[i]) == 0;
353 EXPECT_FALSE(failed);
361template<eGPUTextureFormat DeviceFormat, eGPUDataFormat HostFormat,
int Size = 16>
367 "texture", Size, Size, 1, DeviceFormat, usage,
nullptr);
368 if (texture ==
nullptr) {
369 GTEST_SKIP() <<
"Platform doesn't support texture format [" <<
STRINGIFY(DeviceFormat) <<
"]";
376 float *read_data =
static_cast<float *
>(
GPU_texture_read(texture, HostFormat, 0));
377 float max_used_bias = 0.0f;
379 float bias =
abs(read_data[i] - data[i]);
380 max_used_bias =
max_ff(max_used_bias, bias);
382 EXPECT_LE(max_used_bias, max_allowed_bias);
392template<eGPUTextureFormat DeviceFormat, eGPUDataFormat HostFormat,
int Size = 16>
399 "texture", Size, Size, 1, DeviceFormat, usage,
nullptr);
400 ASSERT_NE(texture,
nullptr);
402 size_t data_len = Size *
Size;
409 bool ok = (read_data[i] - data[i]) == 0;
412 EXPECT_FALSE(failed);
427GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8);
433GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16F);
439GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16);
445GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA32F);
451GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG8);
457GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16F);
463GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16);
469GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG32F);
475GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R8);
481GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R16F);
487GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R16);
493GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R32F);
495#if RUN_NON_STANDARD_UNIMPLEMENTED
496static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB10_A2()
500GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB10_A2);
502static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB10_A2UI()
506GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB10_A2UI);
513GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R11F_G11F_B10F);
519GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8);
525GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_SNORM);
531GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16_SNORM);
534static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB8()
538GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB8);
540static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB8_SNORM()
544GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB8_SNORM);
546static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16F()
550GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16F);
552static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16()
556GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16);
557static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16_SNORM()
561GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16_SNORM);
563static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB32F()
567GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB32F);
574GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG8_SNORM);
580GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16_SNORM);
586GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R8_SNORM);
592GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R16_SNORM);
594#if RUN_NON_STANDARD_UNIMPLEMENTED
595static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT1()
599GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT1);
601static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT3()
605GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT3);
607static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT5()
611GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT5);
613static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT1()
617GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT1);
619static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT3()
623GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT3);
625static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT5()
629GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT5);
632#if RUN_SRGB_UNIMPLEMENTED
633static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8()
637GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8);
640#if RUN_NON_STANDARD_UNIMPLEMENTED
641static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB9_E5()
645GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB9_E5);
652GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT32F);
654#if RUN_COMPONENT_UNIMPLEMENTED
655static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT24()
659GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT24);
661static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT16()
665GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT16);
678GPU_TEST(texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RGBA16F);
684GPU_TEST(texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RG16F);
690GPU_TEST(texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_R16F);
693static void test_texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RGB16F()
697GPU_TEST(texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RGB16F);
710GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGBA8I);
716GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGBA16I);
722GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGBA32I);
728GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RG8I);
731static void test_texture_roundtrip__GPU_DATA_INT__GPU_RG16I()
735GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RG16I);
742GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RG32I);
754GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_R16I);
760GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_R32I);
763static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGB8I()
767GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGB8I);
769static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGB16I()
773GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGB16I);
775static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGB32I()
779GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGB32I);
792GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGBA8UI);
798GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGBA16UI);
804GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGBA32UI);
810GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RG8UI);
816GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RG16UI);
822GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RG32UI);
828GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_R8UI);
834GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_R16UI);
840GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_R32UI);
843static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH32F_STENCIL8()
847GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH32F_STENCIL8);
849static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH24_STENCIL8()
853GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH24_STENCIL8);
855static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGB8UI()
859GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGB8UI);
861static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGB16UI()
865GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGB16UI);
867static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGB32UI()
871GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGB32UI);
873static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT32F()
877GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT32F);
879static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT24()
883GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT24);
886#if RUN_COMPONENT_UNIMPLEMENTED
887static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT16()
891GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT16);
904GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RGBA8UI);
910GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RGBA8);
916GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RG8UI);
922GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RG8);
928GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_R8UI);
934GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_R8);
940GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_SRGB8_A8);
943static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_RGB8I()
947GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RGB8I);
949static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_RGB8()
953GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RGB8);
955static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_SRGB8()
959GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_SRGB8);
968static void test_texture_roundtrip__GPU_DATA_UINT_24_8__GPU_DEPTH32F_STENCIL8()
972GPU_TEST(texture_roundtrip__GPU_DATA_UINT_24_8__GPU_DEPTH32F_STENCIL8);
974static void test_texture_roundtrip__GPU_DATA_UINT_24_8__GPU_DEPTH24_STENCIL8()
978GPU_TEST(texture_roundtrip__GPU_DATA_UINT_24_8__GPU_DEPTH24_STENCIL8);
991GPU_TEST(texture_roundtrip__GPU_DATA_10_11_11_REV__GPU_R11F_G11F_B10F);
1003GPU_TEST(texture_roundtrip__GPU_DATA_2_10_10_10_REV__GPU_RGB10_A2);
1008 GTEST_SKIP() <<
"Texture readback not supported on OpenGL";
1012GPU_TEST(texture_roundtrip__GPU_DATA_2_10_10_10_REV__GPU_RGB10_A2UI);
@ G_DEBUG_GPU_FORCE_WORKAROUNDS
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
MINLINE float max_ff(float a, float b)
eGPUBackendType GPU_backend_get_type()
void GPU_memory_barrier(eGPUBarrier barrier)
@ GPU_BARRIER_TEXTURE_UPDATE
GPUTexture * GPU_texture_create_2d(const char *name, int width, int height, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data)
GPUTexture * GPU_texture_create_1d(const char *name, int width, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data)
void GPU_texture_free(GPUTexture *texture)
void GPU_texture_clear(GPUTexture *texture, eGPUDataFormat data_format, const void *data)
void GPU_texture_copy(GPUTexture *dst, GPUTexture *src)
void * GPU_texture_read(GPUTexture *texture, eGPUDataFormat data_format, int mip_level)
GPUTexture * GPU_texture_create_cube_array(const char *name, int width, int layer_len, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data)
@ GPU_TEXTURE_USAGE_SHADER_WRITE
@ GPU_TEXTURE_USAGE_HOST_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
GPUTexture * GPU_texture_create_2d_array(const char *name, int width, int height, int layer_len, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data)
GPUTexture * GPU_texture_create_3d(const char *name, int width, int height, int depth, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const void *data)
GPUTexture * GPU_texture_create_cube(const char *name, int width, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data)
GPUTexture * GPU_texture_create_1d_array(const char *name, int width, int layer_len, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data)
void GPU_texture_update(GPUTexture *texture, eGPUDataFormat data_format, const void *data)
Read Guarded memory(de)allocation.
additional_info("compositor_sum_float_shared") .push_constant(Type additional_info("compositor_sum_float_shared") .push_constant(Type GPU_RGBA32F
#define GPU_TEST(test_name)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_R8()
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_R32UI()
static void test_texture_roundtrip__GPU_DATA_INT__GPU_R16I()
static void test_texture_1d()
static void test_texture_1d_array_upload()
static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGBA32I()
static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_RG8UI()
static void test_texture_cube()
static void test_texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RGBA16F()
static void test_texture_3d()
static constexpr int Size
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGBA16UI()
static DataType * generate_test_data(size_t data_len)
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RG8UI()
static void test_texture_roundtrip__GPU_DATA_INT__GPU_RG32I()
static void test_texture_copy()
static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_R8UI()
static void test_texture_2d_array_upload()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16F()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA32F()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_R32F()
static void test_texture_roundtrip__GPU_DATA_INT__GPU_R8I()
static void texture_create_upload_read_with_bias(float max_allowed_bias)
static void test_texture_roundtrip__GPU_DATA_2_10_10_10_REV__GPU_RGB10_A2UI()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_R16F()
static void test_texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_R16F()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_R16()
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGBA32UI()
static void test_texture_roundtrip__GPU_DATA_10_11_11_REV__GPU_R11F_G11F_B10F()
static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_RG8()
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_R8UI()
static void test_texture_1d_array()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_R16_SNORM()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT32F()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16_SNORM()
static void test_texture_read()
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_R16UI()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_R11F_G11F_B10F()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_SNORM()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16()
static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGBA8I()
static void test_texture_2d_array()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RG32F()
static void test_texture_cube_array()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16()
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGBA8UI()
static void texture_create_upload_read_pixel()
static void test_texture_roundtrip__GPU_DATA_INT__GPU_R32I()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8()
static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_RGBA8UI()
static void test_texture_roundtrip__GPU_DATA_INT__GPU_RG8I()
static void texture_create_upload_read()
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RG16UI()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16F()
static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_SRGB8_A8()
static void test_texture_roundtrip__GPU_DATA_2_10_10_10_REV__GPU_RGB10_A2()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_R8()
static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_RGBA8()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RG8_SNORM()
static void test_texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RG16F()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RG8()
static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGBA16I()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_R8_SNORM()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16_SNORM()
static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RG32UI()
constexpr bool validate_data_format(eGPUTextureFormat tex_format, eGPUDataFormat data_format)
size_t to_bytesize(GPUIndexBufType type)
int to_component_len(eGPUTextureFormat format)
ccl_device_inline int abs(int x)