Gpu cleanup
This commit is contained in:
@@ -363,7 +363,7 @@ void gpu_init_internal(int depth_buffer_bits, bool vsync) {
|
||||
device->lpVtbl->CreateCommandList(device, 0, D3D12_COMMAND_LIST_TYPE_DIRECT, command_allocator, NULL, &IID_ID3D12CommandList, &command_list);
|
||||
}
|
||||
|
||||
void gpu_begin_internal(unsigned flags, unsigned color, float depth) {
|
||||
void gpu_begin_internal(gpu_clear_t flags, unsigned color, float depth) {
|
||||
for (int i = 0; i < current_render_targets_count; ++i) {
|
||||
current_render_targets[i]->impl.rtv_descriptor_heap->lpVtbl->GetCPUDescriptorHandleForHeapStart(current_render_targets[i]->impl.rtv_descriptor_heap, &target_descriptors[i]);
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ void gpu_init_internal(int depth_buffer_bits, bool vsync) {
|
||||
next_drawable();
|
||||
}
|
||||
|
||||
void gpu_begin_internal(unsigned flags, unsigned color, float depth) {
|
||||
void gpu_begin_internal(gpu_clear_t flags, unsigned color, float depth) {
|
||||
render_pass_desc = [MTLRenderPassDescriptor renderPassDescriptor];
|
||||
for (int i = 0; i < current_render_targets_count; ++i) {
|
||||
render_pass_desc.colorAttachments[i].texture = (__bridge id<MTLTexture>)current_render_targets[i]->impl._tex;
|
||||
|
||||
@@ -1018,7 +1018,7 @@ bool iron_vulkan_get_size(int *width, int *height) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void gpu_begin_internal(unsigned flags, unsigned color, float depth) {
|
||||
void gpu_begin_internal(gpu_clear_t flags, unsigned color, float depth) {
|
||||
if (!framebuffer_acquired) {
|
||||
acquire_next_image();
|
||||
framebuffer_acquired = true;
|
||||
|
||||
@@ -50,7 +50,7 @@ void gpu_init_internal(int depth_bits, bool vsync) {
|
||||
swapChain = wgpuDeviceCreateSwapChain(device, surface, &scDesc);
|
||||
}
|
||||
|
||||
void gpu_begin_internal(unsigned flags, unsigned color, float depth) {
|
||||
void gpu_begin_internal(gpu_clear_t flags, unsigned color, float depth) {
|
||||
WGPUCommandEncoderDescriptor ceDesc;
|
||||
memset(&ceDesc, 0, sizeof(ceDesc));
|
||||
encoder = wgpuDeviceCreateCommandEncoder(device, &ceDesc);
|
||||
|
||||
Reference in New Issue
Block a user