6#include "testing/testing.h"
21template<GPUBlend blend_type>
27 TextureFormat::SFLOAT_16_16_16_16,
61 float4(0.0f, 1.0f, 0.0f, 0.5f),
62 float4(0.0f, 1.0f, 0.0f, 0.5f));
69 float4(0.0f, 1.0f, 0.0f, 0.5f),
70 float4(0.5f, 0.5f, 0.5f, 1.0f));
77 float4(0.0f, 1.0f, 0.0f, 0.5f),
78 float4(0.5f, 1.0f, 0.5f, 1.0f));
85 float4(0.0f, 1.0f, 0.0f, 0.5f),
86 float4(1.0f, 0.5f, 1.0f, 1.0f));
93 float4(0.0f, 1.0f, 0.0f, 0.5f),
94 float4(1.0f, 1.0f, 1.0f, 1.5f));
101 float4(0.0f, 1.0f, 0.0f, 0.5f),
102 float4(0.0f, 0.0f, 0.0f, 0.5f));
109 float4(0.0f, 1.0f, 0.0f, 0.5f),
110 float4(1.0f, 0.0f, 1.0f, 0.5f));
117 float4(0.0f, 1.0f, 0.0f, 0.5f),
118 float4(0.0f, 0.0f, 0.0f, 1.0f));
125 float4(0.0f, 1.0f, 0.0f, 0.5f),
126 float4(1.0f, 2.0f, 1.0f, 0.5f));
133 float4(0.0f, 1.0f, 0.0f, 0.5f),
134 float4(0.5f, 0.5f, 0.5f, 0.5f));
141 float4(4.0f, 3.0f, 2.0f, 1.0f),
142 float4(1.0f, 2.0f, 2.0f, 1.0f));
149 float4(4.0f, 3.0f, 2.0f, 1.0f),
150 float4(4.0f, 3.0f, 3.0f, 4.0f));
#define GPU_batch_uniform_4fv(batch, name, val)
#define GPU_TEST(test_name)
static void test_blend_none()
static void test_blend_alpha()
static void test_blend_background()
static void test_blend_alpha_premult()
void blend_test(float4 source_a, float4 source_b, float4 expected_result)
static void test_blend_multiply()
static void test_blend_invert()
static void test_blend_additive_premult()
static void test_blend_subtract()
static void test_blend_min()
static void test_blend_additive()
static void test_blend_max()
static void test_blend_oit()
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void GPU_offscreen_free(GPUOffScreen *offscreen)
void GPU_offscreen_unbind(GPUOffScreen *offscreen, bool restore)
@ GPU_TEXTURE_USAGE_HOST_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
void GPU_memory_barrier(GPUBarrier barrier)
@ GPU_SHADER_3D_UNIFORM_COLOR
void GPU_batch_draw(gpu::Batch *batch)
@ GPU_BARRIER_TEXTURE_FETCH
void GPU_offscreen_bind(GPUOffScreen *offscreen, bool save)
void GPU_batch_program_set_builtin(gpu::Batch *batch, GPUBuiltinShader shader_id)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
gpu::Batch * GPU_batch_preset_quad()
gpu::Texture * GPU_offscreen_color_texture(const GPUOffScreen *offscreen)
void GPU_texture_clear(gpu::Texture *texture, eGPUDataFormat data_format, const void *data)
GPUOffScreen * GPU_offscreen_create(int width, int height, bool with_depth_buffer, gpu::TextureFormat format, eGPUTextureUsage usage, bool clear, char err_out[256])
void GPU_blend(GPUBlend blend)
void GPU_offscreen_read_color(GPUOffScreen *offscreen, eGPUDataFormat data_format, void *r_data)