20#define RUN_UNSUPPORTED false
24#define RUN_SRGB_UNIMPLEMENTED false
25#define RUN_NON_STANDARD_UNIMPLEMENTED false
26#define RUN_COMPONENT_UNIMPLEMENTED false
39 const float4 fcol = {0.0f, 1.3f, -231.0f, 1000.0f};
40 const uint4 ucol = {0, 1, 2, 12223};
70 GTEST_SKIP() <<
"OpenGL texture clearing doesn't support 1d textures.";
78 float4 clear_color(0.9f, 0.7f, 0.2f, 1.0f);
98 GTEST_SKIP() <<
"Read back of 1d texture arrays not supported by OpenGL";
100 const int LAYERS = 8;
108 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
128 GTEST_SKIP() <<
"Read back of 1d texture arrays not supported by OpenGL";
130 const int LAYERS = 8;
134 int total_size = LAYERS *
SIZE * 4;
146 EXPECT_EQ(memcmp(data_in, data_out,
sizeof(
float) * total_size), 0);
156 const int LAYERS = 8;
163 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
182 const int LAYERS = 8;
186 int total_size = LAYERS *
SIZE *
SIZE * 4;
198 EXPECT_EQ(memcmp(data_in, data_out,
sizeof(
float) * total_size), 0);
213 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
232 const int LAYERS = 2;
239 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
261 float4 clear_color(1.0f, 0.5f, 0.2f, 1.0f);
280 const int SIZE = 128;
288 const float4 clear_color(0.0f);
313 if (std::is_same<DataType, float>()) {
329 static_assert(!std::is_same<DataType, float>());
333 "texture",
Size,
Size, 1, DeviceFormat, usage,
nullptr);
335 GTEST_SKIP() <<
"Platform doesn't support texture format [" <<
STRINGIFY(DeviceFormat) <<
"]";
349 bool ok = (read_data[
i] -
data[
i]) == 0;
352 EXPECT_FALSE(failed);
360template<eGPUTextureFormat DeviceFormat, eGPUDataFormat HostFormat,
int Size = 16>
366 "texture",
Size,
Size, 1, DeviceFormat, usage,
nullptr);
368 GTEST_SKIP() <<
"Platform doesn't support texture format [" <<
STRINGIFY(DeviceFormat) <<
"]";
376 float max_used_bias = 0.0f;
378 float bias =
abs(read_data[
i] -
data[
i]);
379 max_used_bias =
max_ff(max_used_bias, bias);
381 EXPECT_LE(max_used_bias, max_allowed_bias);
391template<eGPUTextureFormat DeviceFormat, eGPUDataFormat HostFormat,
int Size = 16>
398 "texture",
Size,
Size, 1, DeviceFormat, usage,
nullptr);
408 bool ok = (read_data[
i] -
data[
i]) == 0;
411 EXPECT_FALSE(failed);
426GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8);
432GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16F);
438GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16);
444GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA32F);
450GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG8);
456GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16F);
462GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16);
468GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG32F);
474GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R8);
480GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R16F);
486GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R16);
492GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R32F);
494#if RUN_NON_STANDARD_UNIMPLEMENTED
495static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB10_A2()
499GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB10_A2);
501static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB10_A2UI()
505GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB10_A2UI);
512GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R11F_G11F_B10F);
518GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8);
524GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_SNORM);
530GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA16_SNORM);
533static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB8()
537GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB8);
539static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB8_SNORM()
543GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB8_SNORM);
545static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16F()
549GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16F);
551static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16()
555GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16);
556static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16_SNORM()
560GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB16_SNORM);
562static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB32F()
566GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB32F);
573GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG8_SNORM);
579GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RG16_SNORM);
585GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R8_SNORM);
591GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_R16_SNORM);
593#if RUN_NON_STANDARD_UNIMPLEMENTED
594static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT1()
598GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT1);
600static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT3()
604GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT3);
606static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT5()
610GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8_A8_DXT5);
612static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT1()
616GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT1);
618static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT3()
622GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT3);
624static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT5()
628GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGBA8_DXT5);
631#if RUN_SRGB_UNIMPLEMENTED
632static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8()
636GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_SRGB8);
639#if RUN_NON_STANDARD_UNIMPLEMENTED
640static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB9_E5()
644GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_RGB9_E5);
651GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT32F);
657GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT24);
662 GTEST_SKIP() <<
"Float based texture readback not supported on OpenGL";
666GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH24_STENCIL8);
671 GTEST_SKIP() <<
"Float based texture readback not supported on OpenGL";
675GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH32F_STENCIL8);
677#if RUN_COMPONENT_UNIMPLEMENTED
678static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT16()
682GPU_TEST(texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT16);
695GPU_TEST(texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RGBA16F);
701GPU_TEST(texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RG16F);
707GPU_TEST(texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_R16F);
710static void test_texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RGB16F()
714GPU_TEST(texture_roundtrip__GPU_DATA_HALF_FLOAT__GPU_RGB16F);
727GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGBA8I);
733GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGBA16I);
739GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGBA32I);
745GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RG8I);
748static void test_texture_roundtrip__GPU_DATA_INT__GPU_RG16I()
752GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RG16I);
759GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RG32I);
771GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_R16I);
777GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_R32I);
780static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGB8I()
784GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGB8I);
786static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGB16I()
790GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGB16I);
792static void test_texture_roundtrip__GPU_DATA_INT__GPU_RGB32I()
796GPU_TEST(texture_roundtrip__GPU_DATA_INT__GPU_RGB32I);
809GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGBA8UI);
815GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGBA16UI);
821GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGBA32UI);
827GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RG8UI);
833GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RG16UI);
839GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RG32UI);
845GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_R8UI);
851GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_R16UI);
857GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_R32UI);
860static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH32F_STENCIL8()
864GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH32F_STENCIL8);
866static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH24_STENCIL8()
870GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH24_STENCIL8);
872static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGB8UI()
876GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGB8UI);
878static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGB16UI()
882GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGB16UI);
884static void test_texture_roundtrip__GPU_DATA_UINT__GPU_RGB32UI()
888GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_RGB32UI);
890static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT32F()
894GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT32F);
896static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT24()
900GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT24);
903#if RUN_COMPONENT_UNIMPLEMENTED
904static void test_texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT16()
908GPU_TEST(texture_roundtrip__GPU_DATA_UINT__GPU_DEPTH_COMPONENT16);
921GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RGBA8UI);
927GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RGBA8);
933GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RG8UI);
939GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RG8);
945GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_R8UI);
951GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_R8);
957GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_SRGB8_A8);
960static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_RGB8I()
964GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RGB8I);
966static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_RGB8()
970GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_RGB8);
972static void test_texture_roundtrip__GPU_DATA_UBYTE__GPU_SRGB8()
976GPU_TEST(texture_roundtrip__GPU_DATA_UBYTE__GPU_SRGB8);
985static void test_texture_roundtrip__GPU_DATA_UINT_24_8__GPU_DEPTH32F_STENCIL8()
989GPU_TEST(texture_roundtrip__GPU_DATA_UINT_24_8__GPU_DEPTH32F_STENCIL8);
991static void test_texture_roundtrip__GPU_DATA_UINT_24_8__GPU_DEPTH24_STENCIL8()
995GPU_TEST(texture_roundtrip__GPU_DATA_UINT_24_8__GPU_DEPTH24_STENCIL8);
1008GPU_TEST(texture_roundtrip__GPU_DATA_10_11_11_REV__GPU_R11F_G11F_B10F);
1020GPU_TEST(texture_roundtrip__GPU_DATA_2_10_10_10_REV__GPU_RGB10_A2);
1025 GTEST_SKIP() <<
"Texture readback not supported on OpenGL";
1029GPU_TEST(texture_roundtrip__GPU_DATA_2_10_10_10_REV__GPU_RGB10_A2UI);
1040 const int2 sub_size(256);
1041 const int2 sub_offset(256);
1045 const float4 clear_color(0.0f, 0.0f, 0.0f, 0.0f);
1048 const float4 texture_color(0.0f, 1.0f, 0.0f, 1.0f);
1050 for (
int i = 0;
i < sub_size.x * sub_size.y;
i++) {
1051 texture_data[
i] = texture_color;
1058 for (
int x = 0;
x <
size.x;
x++) {
1059 for (
int y = 0;
y < sub_offset.y;
y++) {
1060 int index =
x +
y *
size.x;
1061 ASSERT_EQ(texture_data_read[index], clear_color);
1064 for (
int y = sub_offset.y;
y < sub_offset.y + sub_size.y;
y++) {
1065 for (
int x = 0;
x < sub_offset.x;
x++) {
1066 int index =
x +
y *
size.x;
1067 ASSERT_EQ(texture_data_read[index], clear_color);
1069 for (
int x = sub_offset.x;
x < sub_offset.x + sub_size.x;
x++) {
1070 int index =
x +
y *
size.x;
1071 ASSERT_EQ(texture_data_read[index], texture_color);
1073 for (
int x = sub_offset.x + sub_size.x;
x <
size.x;
x++) {
1074 int index =
x +
y *
size.x;
1075 ASSERT_EQ(texture_data_read[index], clear_color);
1078 for (
int x = 0;
x <
size.x;
x++) {
1079 for (
int y = sub_offset.y + sub_size.y;
y <
size.y;
y++) {
1080 int index =
x +
y *
size.x;
1081 ASSERT_EQ(texture_data_read[index], clear_color);
1094 const int2 sub_size(256);
1095 const int2 sub_offset(256);
1099 const float4 clear_color(0.0f, 0.0f, 0.0f, 0.0f);
1102 const float4 texture_color(0.0f, 1.0f, 0.0f, 1.0f);
1103 const float4 texture_color_off(1.0f, 0.0f, 0.0f, 1.0f);
1105 for (
int x = 0;
x <
size.x;
x++) {
1106 for (
int y = 0;
y <
size.y;
y++) {
1107 int index =
x +
y *
size.x;
1108 texture_data[index] = ((
x >= sub_offset.x &&
x < sub_offset.x + sub_size.x) &&
1109 (
y >= sub_offset.y &&
y < sub_offset.y + sub_size.y)) ?
1116 float4 *texture_data_offset = &texture_data[sub_offset.x + sub_offset.y *
size.x];
1122 for (
int x = 0;
x <
size.x;
x++) {
1123 for (
int y = 0;
y < sub_offset.y;
y++) {
1124 int index =
x +
y *
size.x;
1125 ASSERT_EQ(texture_data_read[index], clear_color);
1128 for (
int y = sub_offset.y;
y < sub_offset.y + sub_size.y;
y++) {
1129 for (
int x = 0;
x < sub_offset.x;
x++) {
1130 int index =
x +
y *
size.x;
1131 ASSERT_EQ(texture_data_read[index], clear_color);
1133 for (
int x = sub_offset.x;
x < sub_offset.x + sub_size.x;
x++) {
1134 int index =
x +
y *
size.x;
1135 ASSERT_EQ(texture_data_read[index], texture_color);
1137 for (
int x = sub_offset.x + sub_size.x;
x <
size.x;
x++) {
1138 int index =
x +
y *
size.x;
1139 ASSERT_EQ(texture_data_read[index], clear_color);
1142 for (
int x = 0;
x <
size.x;
x++) {
1143 for (
int y = sub_offset.y + sub_size.y;
y <
size.y;
y++) {
1144 int index =
x +
y *
size.x;
1145 ASSERT_EQ(texture_data_read[index], clear_color);
1157 const int2 size1(10);
1158 const int2 size2(20);
1159 const int2 size3(30);
1179 GPUTexture *tex1 = test_acquire(size1, format1, usage);
1180 GPUTexture *tex2 = test_acquire(size2, format1, usage);
1181 GPUTexture *tex3 = test_acquire(size3, format2, usage);
1182 GPUTexture *tex4 = test_acquire(size3, format3, usage);
1188 tex1 = test_acquire(size1, format1, usage);
1193 EXPECT_BLI_ASSERT(pool.
reset(),
"Missing texture release");
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
int GPU_texture_height(const GPUTexture *texture)
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)
int GPU_texture_width(const 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_READ
@ GPU_TEXTURE_USAGE_SHADER_WRITE
@ GPU_TEXTURE_USAGE_HOST_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
@ GPU_TEXTURE_USAGE_GENERAL
void GPU_texture_update_sub(GPUTexture *texture, eGPUDataFormat data_format, const void *pixels, int offset_x, int offset_y, int offset_z, int width, int height, int depth)
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_unpack_row_length_set(uint len)
void GPU_texture_update(GPUTexture *texture, eGPUDataFormat data_format, const void *data)
eGPUTextureFormat GPU_texture_format(const GPUTexture *texture)
Read Guarded memory(de)allocation.
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void release_texture(GPUTexture *tmp_tex)
void reset(bool force_free=false)
static TexturePool & get()
GPUTexture * acquire_texture(int width, int height, eGPUTextureFormat format, eGPUTextureUsage usage)
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
#define GPU_TEST(test_name)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
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_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH_COMPONENT24()
static void test_texture_roundtrip__GPU_DATA_FLOAT__GPU_DEPTH24_STENCIL8()
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_update_sub_unpack_row_length()
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_update_sub_no_unpack_row_length()
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_FLOAT__GPU_DEPTH32F_STENCIL8()
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_pool()
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)
int to_bytesize(const DataFormat format)
int to_component_len(eGPUTextureFormat format)
VecBase< uint32_t, 4 > uint4
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2