@@ -98,19 +98,19 @@ static CommandBuffer *acquireCommandBuffer(const RenderDevice *self) {
9898static CommandBuffer * beginFrame (RenderDevice * self ) {
9999
100100 GPU_Assert (self -> framebuffer , "no framebuffer set; call setFramebuffer first" );
101- GPU_Assert (self -> commandBuffer == NULL , "beginFrame called with a frame already in flight" );
101+ GPU_Assert (self -> commands == NULL , "beginFrame called with a frame already in flight" );
102102
103- self -> commandBuffer = $ (self , acquireCommandBuffer );
103+ self -> commands = $ (self , acquireCommandBuffer );
104104
105- const bool ok = $ (self -> commandBuffer , waitAndAcquireSwapchainTexture , & self -> swapchain );
105+ const bool ok = $ (self -> commands , waitAndAcquireSwapchainTexture , & self -> swapchain );
106106 if (ok ) {
107107 $ (self -> framebuffer , resize , & self -> swapchain .size );
108108 } else {
109- $ (self -> commandBuffer , cancel );
110- self -> commandBuffer = release (self -> commandBuffer );
109+ $ (self -> commands , cancel );
110+ self -> commands = release (self -> commands );
111111 }
112112
113- return self -> commandBuffer ;
113+ return self -> commands ;
114114}
115115
116116/**
@@ -119,12 +119,12 @@ static CommandBuffer *beginFrame(RenderDevice *self) {
119119 */
120120static void endFrame (RenderDevice * self ) {
121121
122- GPU_Assert (self -> commandBuffer , "endFrame called without a frame in flight" );
122+ GPU_Assert (self -> commands , "endFrame called without a frame in flight" );
123123
124124 Texture * color = $ (self -> framebuffer , resolvedColorTexture , 0 );
125125 GPU_Assert (color , "framebuffer has no color attachment to present" );
126126
127- $ (self -> commandBuffer , blitTexture , & (SDL_GPUBlitInfo ) {
127+ $ (self -> commands , blitTexture , & (SDL_GPUBlitInfo ) {
128128 .source = {
129129 .texture = color -> texture ,
130130 .w = (Uint32 ) self -> swapchain .size .w ,
@@ -139,9 +139,9 @@ static void endFrame(RenderDevice *self) {
139139 .filter = SDL_GPU_FILTER_NEAREST ,
140140 });
141141
142- $ (self -> commandBuffer , submit );
142+ $ (self -> commands , submit );
143143
144- self -> commandBuffer = release (self -> commandBuffer );
144+ self -> commands = release (self -> commands );
145145
146146 self -> swapchain = (SwapchainTexture ) { 0 };
147147}
0 commit comments