sys_rsx: Improve allocations and error checks

* allow sys_rsx_device_map to be called twice: in this case the DEVICE address retrived from the previous call returned
* Add ENOMEM checks for sys_rsx_memory_allocate and sys_rsx_context_allocate
* add EINVAL check for sys_rsx_context_allocate if memory handle is not found
* Separate sys_rsx_device_map allocation from sys_rsx_context_allocate's
* Implement sys_rsx_memory_free; used by cellGcmInit upon failure
* Added context_id checks
* Throw if sys_rsx_context_allocate was called twice.
This commit is contained in:
eladash 2018-10-31 04:40:04 +02:00 committed by kd-11
parent 90aaaceba0
commit 730e9cde84
8 changed files with 96 additions and 50 deletions

View file

@ -91,10 +91,10 @@ namespace rsx
return get_current_renderer()->label_addr + offset;
case CELL_GCM_CONTEXT_DMA_DEVICE_RW:
return get_current_renderer()->ctxt_addr + offset;
return get_current_renderer()->device_addr + offset;
case CELL_GCM_CONTEXT_DMA_DEVICE_R:
return get_current_renderer()->ctxt_addr + offset;
return get_current_renderer()->device_addr + offset;
default:
{