mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-16 06:21:25 -07:00
Fixes bad resource usage in rendering
D3D11 is quite strict about how resources are supposed to be used - read/write & CPU access. This changes Tex2DKind and BufferKind into one uniform ResourceKind (because it's the same thing really). And it is more strict about usage: 1) Static is not allowed to update, resource is immutable, data provided at creation 2) Dynamic allows CPU to update GPU resource occasionally via UpdateSubresource 3) Stream allows CPU to update GPU resource often via Map/Unmap (currently unused)
This commit is contained in:
committed by
Ryan Fleury
parent
7e0611e7f1
commit
fd982d38fc
@@ -221,15 +221,15 @@ r_hook R_Handle r_window_equip(OS_Handle window);
|
||||
r_hook void r_window_unequip(OS_Handle window, R_Handle window_equip);
|
||||
|
||||
//- rjf: textures
|
||||
r_hook R_Handle r_tex2d_alloc(R_Tex2DKind kind, Vec2S32 size, R_Tex2DFormat format, void *data);
|
||||
r_hook R_Handle r_tex2d_alloc(R_ResourceKind kind, Vec2S32 size, R_Tex2DFormat format, void *data);
|
||||
r_hook void r_tex2d_release(R_Handle texture);
|
||||
r_hook R_Tex2DKind r_kind_from_tex2d(R_Handle texture);
|
||||
r_hook R_ResourceKind r_kind_from_tex2d(R_Handle texture);
|
||||
r_hook Vec2S32 r_size_from_tex2d(R_Handle texture);
|
||||
r_hook R_Tex2DFormat r_format_from_tex2d(R_Handle texture);
|
||||
r_hook void r_fill_tex2d_region(R_Handle texture, Rng2S32 subrect, void *data);
|
||||
|
||||
//- rjf: buffers
|
||||
r_hook R_Handle r_buffer_alloc(R_BufferKind kind, U64 size, void *data);
|
||||
r_hook R_Handle r_buffer_alloc(R_ResourceKind kind, U64 size, void *data);
|
||||
r_hook void r_buffer_release(R_Handle buffer);
|
||||
|
||||
//- rjf: frame markers
|
||||
|
||||
Reference in New Issue
Block a user