From 4bc7d2a589007a5f01e90a400ba371c5a646be9b Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 3 Jun 2025 15:28:25 -0500 Subject: [PATCH] cleanup --- src/gpu_dx11.c | 51 -------------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/src/gpu_dx11.c b/src/gpu_dx11.c index f6cf6999..2c0cfcff 100644 --- a/src/gpu_dx11.c +++ b/src/gpu_dx11.c @@ -1893,57 +1893,6 @@ void gpu_dispatch(struct gpu_dispatch_state gpu_dispatch_state, struct gpu_dispa } } - /* Finalize */ -#if 0 - vp_matrix = calculate_vp(XFORM_IDENT, viewport.width, viewport.height); - { - __profscope(Finalize); - __profscope_dx11(G.profiling_ctx, Finalize, RGB_F(0.5, 0.2, 0.5)); - struct dx11_shader *shader = &G.shaders[DX11_SHADER_KIND_TEXTURE]; - if (shader->valid) { - struct dx11_texture *texture = NULL; - - struct dx11_buffer *instance_buffer = store->buffers.texture.instance_buffer; - u32 instance_offset = cmd->texture.instance_offset; - u32 instance_count = cmd->texture.instance_count; - - /* Bind shader */ - ID3D11DeviceContext_VSSetShader(G.devcon, shader->vs, 0, 0); - ID3D11DeviceContext_PSSetShader(G.devcon, shader->ps, 0, 0); - - /* Fill & bind constant buffer */ - { - struct dx11_texture_uniform *uniform = dx11_buffer_push(constant_buffer, sizeof(struct dx11_texture_uniform)); - uniform->vp = vp_matrix; - uniform->instance_offset = instance_offset; - dx11_buffer_submit(constant_buffer); - } - ID3D11DeviceContext_VSSetConstantBuffers(G.devcon, 0, 1, &constant_buffer->gpu_buffer); - ID3D11DeviceContext_PSSetConstantBuffers(G.devcon, 0, 1, &constant_buffer->gpu_buffer); - - /* Bind dummy vertex buffer */ - u32 zero = 0; - ID3D11DeviceContext_IASetVertexBuffers(G.devcon, 0, 1, &G.dummy_vertex_buffer->gpu_buffer, &zero, &zero); - ID3D11DeviceContext_IASetIndexBuffer(G.devcon, G.quad_index_buffer->gpu_buffer, DXGI_FORMAT_R16_UINT, zero); - - /* Bind SRVs */ - ID3D11ShaderResourceView *srvs[] = { instance_buffer->srv, texture->srv }; - ID3D11DeviceContext_VSSetShaderResources(G.devcon, 0, ARRAY_COUNT(srvs), srvs); - ID3D11DeviceContext_PSSetShaderResources(G.devcon, 0, ARRAY_COUNT(srvs), srvs); - - /* Bind RTVs */ - ID3D11RenderTargetView *rtvs[] = { final_tex->rtv }; - ID3D11DeviceContext_OMSetRenderTargets(G.devcon, ARRAY_COUNT(rtvs), rtvs, NULL); - - /* Draw */ - ID3D11DeviceContext_IASetPrimitiveTopology(G.devcon, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); - ID3D11DeviceContext_DrawIndexedInstanced(G.devcon, 6, instance_count, 0, 0, 0); - - /* Unbind */ - dx11_unbind(DX11_UNBIND_VS | DX11_UNBIND_PS | DX11_UNBIND_CBUFF | DX11_UNBIND_VBUFF | DX11_UNBIND_IBUFF | DX11_UNBIND_SRV | DX11_UNBIND_RTV); - } -#endif - sprite_scope_end(sprite_scope); }