mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-13 00:03:35 +00:00
working on images, adding unit tests for image and buffers
This commit is contained in:
30
Tests/Vulkan/Image.c
git.filemode.normal_file
30
Tests/Vulkan/Image.c
git.filemode.normal_file
@@ -0,0 +1,30 @@
|
||||
#include "Common.h"
|
||||
|
||||
#include <unity/unity.h>
|
||||
#include <Pulse.h>
|
||||
|
||||
void TestImageCreation()
|
||||
{
|
||||
PulseBackend backend;
|
||||
SetupPulse(&backend);
|
||||
PulseDevice device;
|
||||
SetupDevice(backend, &device);
|
||||
|
||||
PulseImageCreateInfo image_create_info = { 0 };
|
||||
image_create_info.type = PULSE_IMAGE_TYPE_2D;
|
||||
image_create_info.format = PULSE_IMAGE_FORMAT_R8G8B8A8_UNORM;
|
||||
image_create_info.usage = PULSE_IMAGE_USAGE_STORAGE_READ;
|
||||
image_create_info.width = 256;
|
||||
image_create_info.height = 256;
|
||||
PulseImage image = PulseCreateImage(device, &image_create_info);
|
||||
TEST_ASSERT_NOT_EQUAL_MESSAGE(image, PULSE_NULL_HANDLE, PulseVerbaliseErrorType(PulseGetLastErrorType()));
|
||||
PulseDestroyImage(device, image);
|
||||
|
||||
CleanupDevice(device);
|
||||
CleanupPulse(backend);
|
||||
}
|
||||
|
||||
void TestImage()
|
||||
{
|
||||
RUN_TEST(TestImageCreation);
|
||||
}
|
||||
Reference in New Issue
Block a user