Cleanup
This commit is contained in:
@@ -1059,10 +1059,6 @@ void gpu_constant_buffer_init(gpu_buffer_t *buffer, int size) {
|
||||
_gpu_buffer_init(&buffer->impl.buffer, size, D3D12_HEAP_TYPE_UPLOAD);
|
||||
}
|
||||
|
||||
void gpu_constant_buffer_destroy(gpu_buffer_t *buffer) {
|
||||
buffer->impl.buffer->lpVtbl->Release(buffer->impl.buffer);
|
||||
}
|
||||
|
||||
void gpu_constant_buffer_lock(gpu_buffer_t *buffer, int start, int count) {
|
||||
buffer->impl.last_start = start;
|
||||
buffer->impl.last_count = count;
|
||||
|
||||
@@ -596,12 +596,6 @@ void gpu_constant_buffer_init(gpu_buffer_t *buffer, int size) {
|
||||
buffer->impl.metal_buffer = (__bridge_retained void *)[get_metal_device() newBufferWithLength:size options:MTLResourceOptionCPUCacheModeDefault];
|
||||
}
|
||||
|
||||
void gpu_constant_buffer_destroy(gpu_buffer_t *buffer) {
|
||||
id<MTLBuffer> buf = (__bridge_transfer id<MTLBuffer>)buffer->impl.metal_buffer;
|
||||
buf = nil;
|
||||
buffer->impl.metal_buffer = NULL;
|
||||
}
|
||||
|
||||
void gpu_constant_buffer_lock(gpu_buffer_t *buffer, int start, int count) {
|
||||
id<MTLBuffer> buf = (__bridge id<MTLBuffer>)buffer->impl.metal_buffer;
|
||||
uint8_t *data = (uint8_t *)[buf contents];
|
||||
|
||||
@@ -109,7 +109,6 @@ void gpu_vertex_buffer_unlock(gpu_buffer_t *buffer) {
|
||||
}
|
||||
|
||||
void gpu_constant_buffer_init(gpu_buffer_t *buffer, int size) {}
|
||||
void gpu_constant_buffer_destroy(gpu_buffer_t *buffer) {}
|
||||
void gpu_constant_buffer_lock(gpu_buffer_t *buffer, int start, int count) {}
|
||||
void gpu_constant_buffer_unlock(gpu_buffer_t *buffer) {}
|
||||
|
||||
|
||||
+1
-1
@@ -2043,7 +2043,7 @@ void iron_ml_unload() {
|
||||
|
||||
void iron_raytrace_init(buffer_t *shader) {
|
||||
if (rt_created) {
|
||||
gpu_constant_buffer_destroy(&rt_constant_buffer);
|
||||
gpu_buffer_destroy(&rt_constant_buffer);
|
||||
gpu_raytrace_pipeline_destroy(&rt_pipeline);
|
||||
}
|
||||
rt_created = true;
|
||||
|
||||
@@ -183,7 +183,6 @@ void gpu_vertex_buffer_init(gpu_buffer_t *buffer, int count, gpu_vertex_structur
|
||||
void *gpu_vertex_buffer_lock(gpu_buffer_t *buffer);
|
||||
void gpu_vertex_buffer_unlock(gpu_buffer_t *buffer);
|
||||
void gpu_constant_buffer_init(gpu_buffer_t *buffer, int size);
|
||||
void gpu_constant_buffer_destroy(gpu_buffer_t *buffer);
|
||||
void gpu_constant_buffer_lock(gpu_buffer_t *buffer, int start, int count);
|
||||
void gpu_constant_buffer_unlock(gpu_buffer_t *buffer);
|
||||
void gpu_index_buffer_init(gpu_buffer_t *buffer, int count);
|
||||
|
||||
Reference in New Issue
Block a user