mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 23:43:34 +00:00
fixing descriptor sets, adding buffer compute write test
This commit is contained in:
@@ -29,7 +29,7 @@ void SetupPulse(PulseBackend* backend)
|
||||
void SetupDevice(PulseBackend backend, PulseDevice* device)
|
||||
{
|
||||
*device = PulseCreateDevice(backend, NULL, 0);
|
||||
TEST_ASSERT_NOT_EQUAL_MESSAGE(device, PULSE_NULL_HANDLE, PulseVerbaliseErrorType(PulseGetLastErrorType()));
|
||||
TEST_ASSERT_NOT_EQUAL_MESSAGE(*device, PULSE_NULL_HANDLE, PulseVerbaliseErrorType(PulseGetLastErrorType()));
|
||||
}
|
||||
|
||||
void CleanupDevice(PulseDevice device)
|
||||
@@ -41,3 +41,30 @@ void CleanupPulse(PulseBackend backend)
|
||||
{
|
||||
PulseUnloadBackend(backend);
|
||||
}
|
||||
|
||||
void LoadComputePipeline(PulseDevice device, PulseComputePipeline* pipeline, const uint8_t* code, uint32_t code_size,
|
||||
uint32_t num_readonly_storage_images,
|
||||
uint32_t num_readonly_storage_buffers,
|
||||
uint32_t num_readwrite_storage_images,
|
||||
uint32_t num_readwrite_storage_buffers,
|
||||
uint32_t num_uniform_buffers)
|
||||
{
|
||||
PulseComputePipelineCreateInfo info = { 0 };
|
||||
info.code_size = code_size;
|
||||
info.code = code;
|
||||
info.entrypoint = "main";
|
||||
info.format = PULSE_SHADER_FORMAT_SPIRV_BIT;
|
||||
info.num_readonly_storage_images = num_readonly_storage_images;
|
||||
info.num_readonly_storage_buffers = num_readonly_storage_buffers;
|
||||
info.num_readwrite_storage_buffers = num_readwrite_storage_buffers;
|
||||
info.num_readwrite_storage_images = num_readwrite_storage_images;
|
||||
info.num_uniform_buffers = num_uniform_buffers;
|
||||
|
||||
*pipeline = PulseCreateComputePipeline(device, &info);
|
||||
TEST_ASSERT_NOT_EQUAL_MESSAGE(*pipeline, PULSE_NULL_HANDLE, PulseVerbaliseErrorType(PulseGetLastErrorType()));
|
||||
}
|
||||
|
||||
void CleanupPipeline(PulseDevice device, PulseComputePipeline pipeline)
|
||||
{
|
||||
PulseDestroyComputePipeline(device, pipeline);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user