extend constructed type info with 'pointer depth', to distinguish between inline-depths; use in symbolizing & call stack expression formation

This commit is contained in:
Ryan Fleury
2025-02-11 16:16:44 -08:00
parent 312ddd5899
commit 98ec6ee3bb
13 changed files with 140 additions and 58 deletions
+18 -12
View File
@@ -672,8 +672,11 @@ r_tex2d_release(R_Handle handle)
ProfBeginFunction();
OS_MutexScopeW(r_d3d11_state->device_rw_mutex)
{
R_D3D11_Tex2D *texture = r_d3d11_tex2d_from_handle(handle);
SLLStackPush(r_d3d11_state->first_to_free_tex2d, texture);
R_D3D11_Tex2D *texture = r_d3d11_tex2d_from_handle(handle);
if(texture != &r_d3d11_tex2d_nil)
{
SLLStackPush(r_d3d11_state->first_to_free_tex2d, texture);
}
}
ProfEnd();
}
@@ -705,16 +708,19 @@ r_fill_tex2d_region(R_Handle handle, Rng2S32 subrect, void *data)
ProfBeginFunction();
OS_MutexScopeW(r_d3d11_state->device_rw_mutex)
{
R_D3D11_Tex2D *texture = r_d3d11_tex2d_from_handle(handle);
Assert(texture->kind == R_ResourceKind_Dynamic && "only dynamic texture can update region");
U64 bytes_per_pixel = r_tex2d_format_bytes_per_pixel_table[texture->format];
Vec2S32 dim = v2s32(subrect.x1 - subrect.x0, subrect.y1 - subrect.y0);
D3D11_BOX dst_box =
{
(UINT)subrect.x0, (UINT)subrect.y0, 0,
(UINT)subrect.x1, (UINT)subrect.y1, 1,
};
r_d3d11_state->device_ctx->lpVtbl->UpdateSubresource(r_d3d11_state->device_ctx, (ID3D11Resource *)texture->texture, 0, &dst_box, data, dim.x*bytes_per_pixel, 0);
R_D3D11_Tex2D *texture = r_d3d11_tex2d_from_handle(handle);
if(texture != &r_d3d11_tex2d_nil)
{
Assert(texture->kind == R_ResourceKind_Dynamic && "only dynamic texture can update region");
U64 bytes_per_pixel = r_tex2d_format_bytes_per_pixel_table[texture->format];
Vec2S32 dim = v2s32(subrect.x1 - subrect.x0, subrect.y1 - subrect.y0);
D3D11_BOX dst_box =
{
(UINT)subrect.x0, (UINT)subrect.y0, 0,
(UINT)subrect.x1, (UINT)subrect.y1, 1,
};
r_d3d11_state->device_ctx->lpVtbl->UpdateSubresource(r_d3d11_state->device_ctx, (ID3D11Resource *)texture->texture, 0, &dst_box, data, dim.x*bytes_per_pixel, 0);
}
}
ProfEnd();
}
+3 -3
View File
@@ -171,9 +171,9 @@ struct R_D3D11_State
//~ rjf: Globals
global R_D3D11_State *r_d3d11_state = 0;
global R_D3D11_Window r_d3d11_window_nil = {&r_d3d11_window_nil};
global R_D3D11_Tex2D r_d3d11_tex2d_nil = {&r_d3d11_tex2d_nil};
global R_D3D11_Buffer r_d3d11_buffer_nil = {&r_d3d11_buffer_nil};
global read_only R_D3D11_Window r_d3d11_window_nil = {&r_d3d11_window_nil};
global read_only R_D3D11_Tex2D r_d3d11_tex2d_nil = {&r_d3d11_tex2d_nil};
global read_only R_D3D11_Buffer r_d3d11_buffer_nil = {&r_d3d11_buffer_nil};
////////////////////////////////
//~ rjf: Helpers