mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-16 17:12:23 -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
@@ -319,7 +319,7 @@ tex_xfer_thread__entry_point(void *p)
|
||||
R_Handle texture = {0};
|
||||
if(got_task && top.dim.x > 0 && top.dim.y > 0 && data.size >= (U64)top.dim.x*(U64)top.dim.y*(U64)r_tex2d_format_bytes_per_pixel_table[top.fmt])
|
||||
{
|
||||
texture = r_tex2d_alloc(R_Tex2DKind_Static, v2s32(top.dim.x, top.dim.y), top.fmt, data.str);
|
||||
texture = r_tex2d_alloc(R_ResourceKind_Static, v2s32(top.dim.x, top.dim.y), top.fmt, data.str);
|
||||
}
|
||||
|
||||
//- rjf: commit results to cache
|
||||
|
||||
Reference in New Issue
Block a user