5#include "testing/testing.h"
73 if (
ssbo !=
nullptr) {
84 data.resize(data_len);
127GPU_TEST(specialization_constants_compute)
133GPU_TEST(specialization_constants_graphic)
constexpr bool is_empty() const
#define EXPECT_NE(result, expect)
#define GPU_TEST(test_name)
static void test_specialization_constants_graphic()
static void test_specialization_constants_compute()
void GPU_framebuffer_bind(gpu::FrameBuffer *fb)
gpu::Batch * GPU_batch_create_procedural(GPUPrimType primitive_type, int32_t vertex_count)
void GPU_framebuffer_free(gpu::FrameBuffer *fb)
gpu::StorageBuf * GPU_storagebuf_create_ex(size_t size, const void *data, GPUUsageType usage, const char *name)
BLI_INLINE float fb(float length, float L)
int GPU_shader_get_constant(gpu::Shader *shader, const char *name)
gpu::Shader * GPU_shader_create_from_info_name(const char *info_name)
void GPU_batch_discard(gpu::Batch *batch)
void GPU_batch_set_shader(gpu::Batch *batch, gpu::Shader *shader, const gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_compute_dispatch(gpu::Shader *shader, uint groups_x_len, uint groups_y_len, uint groups_z_len, const gpu::shader::SpecializationConstants *constants_state=nullptr)
int GPU_shader_get_ssbo_binding(gpu::Shader *shader, const char *name)
void GPU_memory_barrier(GPUBarrier barrier)
@ GPU_BARRIER_BUFFER_UPDATE
void GPU_storagebuf_bind(gpu::StorageBuf *ssbo, int slot)
gpu::FrameBuffer * GPU_framebuffer_create(const char *name)
const GPUShaderCreateInfo * gpu_shader_create_info_get(const char *info_name)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
void GPU_framebuffer_default_size(gpu::FrameBuffer *fb, int width, int height)
void GPU_batch_draw_advanced(gpu::Batch *batch, int vertex_first, int vertex_count, int instance_first, int instance_count)
void GPU_shader_free(gpu::Shader *shader)
void GPU_storagebuf_free(gpu::StorageBuf *ssbo)
void GPU_storagebuf_read(gpu::StorageBuf *ssbo, void *data)
const gpu::shader::SpecializationConstants & GPU_shader_get_default_constant_state(gpu::Shader *sh)
Describe inputs & outputs, stage interfaces, resources and sources of a shader. If all data is correc...
StringRefNull compute_source_
void set_value(int index, uint32_t value)
void init_shader(const char *info_name)
ShaderSpecializationConst(const char *info_name)
~ShaderSpecializationConst()
void validate(shader::SpecializationConstants &constants)