diff options
| author | 2016-03-08 21:31:41 -0500 | |
|---|---|---|
| committer | 2016-03-08 21:31:44 -0500 | |
| commit | bf76afc68d3501e1f8c9a1460aac74438e1c64af (patch) | |
| tree | 2e34d009e02b87c927d047ab831f771ed126fa75 /src/core | |
| parent | Merge pull request #1441 from MerryMage/dsp-pipes (diff) | |
| download | yuzu-bf76afc68d3501e1f8c9a1460aac74438e1c64af.tar.gz yuzu-bf76afc68d3501e1f8c9a1460aac74438e1c64af.tar.xz yuzu-bf76afc68d3501e1f8c9a1460aac74438e1c64af.zip | |
renderer_base: Don't directly expose the rasterizer unique_ptr
There's no reason to allow direct access to the unique_ptr instance. Only
its contained pointer.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/gsp_gpu.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/y2r_u.cpp | 2 | ||||
| -rw-r--r-- | src/core/hw/gpu.cpp | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp index 5838b6d71..3d705821d 100644 --- a/src/core/hle/service/gsp_gpu.cpp +++ b/src/core/hle/service/gsp_gpu.cpp | |||
| @@ -275,7 +275,7 @@ static void FlushDataCache(Service::Interface* self) { | |||
| 275 | u32 size = cmd_buff[2]; | 275 | u32 size = cmd_buff[2]; |
| 276 | u32 process = cmd_buff[4]; | 276 | u32 process = cmd_buff[4]; |
| 277 | 277 | ||
| 278 | VideoCore::g_renderer->rasterizer->InvalidateRegion(Memory::VirtualToPhysicalAddress(address), size); | 278 | VideoCore::g_renderer->Rasterizer()->InvalidateRegion(Memory::VirtualToPhysicalAddress(address), size); |
| 279 | 279 | ||
| 280 | // TODO(purpasmart96): Verify return header on HW | 280 | // TODO(purpasmart96): Verify return header on HW |
| 281 | 281 | ||
| @@ -365,7 +365,7 @@ static void ExecuteCommand(const Command& command, u32 thread_id) { | |||
| 365 | 365 | ||
| 366 | // GX request DMA - typically used for copying memory from GSP heap to VRAM | 366 | // GX request DMA - typically used for copying memory from GSP heap to VRAM |
| 367 | case CommandId::REQUEST_DMA: | 367 | case CommandId::REQUEST_DMA: |
| 368 | VideoCore::g_renderer->rasterizer->FlushRegion(Memory::VirtualToPhysicalAddress(command.dma_request.source_address), | 368 | VideoCore::g_renderer->Rasterizer()->FlushRegion(Memory::VirtualToPhysicalAddress(command.dma_request.source_address), |
| 369 | command.dma_request.size); | 369 | command.dma_request.size); |
| 370 | 370 | ||
| 371 | memcpy(Memory::GetPointer(command.dma_request.dest_address), | 371 | memcpy(Memory::GetPointer(command.dma_request.dest_address), |
| @@ -373,7 +373,7 @@ static void ExecuteCommand(const Command& command, u32 thread_id) { | |||
| 373 | command.dma_request.size); | 373 | command.dma_request.size); |
| 374 | SignalInterrupt(InterruptId::DMA); | 374 | SignalInterrupt(InterruptId::DMA); |
| 375 | 375 | ||
| 376 | VideoCore::g_renderer->rasterizer->InvalidateRegion(Memory::VirtualToPhysicalAddress(command.dma_request.dest_address), | 376 | VideoCore::g_renderer->Rasterizer()->InvalidateRegion(Memory::VirtualToPhysicalAddress(command.dma_request.dest_address), |
| 377 | command.dma_request.size); | 377 | command.dma_request.size); |
| 378 | break; | 378 | break; |
| 379 | 379 | ||
| @@ -467,7 +467,7 @@ static void ExecuteCommand(const Command& command, u32 thread_id) { | |||
| 467 | if (region.size == 0) | 467 | if (region.size == 0) |
| 468 | break; | 468 | break; |
| 469 | 469 | ||
| 470 | VideoCore::g_renderer->rasterizer->InvalidateRegion( | 470 | VideoCore::g_renderer->Rasterizer()->InvalidateRegion( |
| 471 | Memory::VirtualToPhysicalAddress(region.address), region.size); | 471 | Memory::VirtualToPhysicalAddress(region.address), region.size); |
| 472 | } | 472 | } |
| 473 | break; | 473 | break; |
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp index bbead9344..a495441a4 100644 --- a/src/core/hle/service/y2r_u.cpp +++ b/src/core/hle/service/y2r_u.cpp | |||
| @@ -267,7 +267,7 @@ static void StartConversion(Service::Interface* self) { | |||
| 267 | // dst_image_size would seem to be perfect for this, but it doesn't include the gap :( | 267 | // dst_image_size would seem to be perfect for this, but it doesn't include the gap :( |
| 268 | u32 total_output_size = conversion.input_lines * | 268 | u32 total_output_size = conversion.input_lines * |
| 269 | (conversion.dst.transfer_unit + conversion.dst.gap); | 269 | (conversion.dst.transfer_unit + conversion.dst.gap); |
| 270 | VideoCore::g_renderer->rasterizer->InvalidateRegion( | 270 | VideoCore::g_renderer->Rasterizer()->InvalidateRegion( |
| 271 | Memory::VirtualToPhysicalAddress(conversion.dst.address), total_output_size); | 271 | Memory::VirtualToPhysicalAddress(conversion.dst.address), total_output_size); |
| 272 | 272 | ||
| 273 | LOG_DEBUG(Service_Y2R, "called"); | 273 | LOG_DEBUG(Service_Y2R, "called"); |
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 5312baa83..7e2f9cdfa 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp | |||
| @@ -140,7 +140,7 @@ inline void Write(u32 addr, const T data) { | |||
| 140 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PSC1); | 140 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PSC1); |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | VideoCore::g_renderer->rasterizer->InvalidateRegion(config.GetStartAddress(), config.GetEndAddress() - config.GetStartAddress()); | 143 | VideoCore::g_renderer->Rasterizer()->InvalidateRegion(config.GetStartAddress(), config.GetEndAddress() - config.GetStartAddress()); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | // Reset "trigger" flag and set the "finish" flag | 146 | // Reset "trigger" flag and set the "finish" flag |
| @@ -171,7 +171,7 @@ inline void Write(u32 addr, const T data) { | |||
| 171 | u32 output_gap = config.texture_copy.output_gap * 16; | 171 | u32 output_gap = config.texture_copy.output_gap * 16; |
| 172 | 172 | ||
| 173 | size_t contiguous_input_size = config.texture_copy.size / input_width * (input_width + input_gap); | 173 | size_t contiguous_input_size = config.texture_copy.size / input_width * (input_width + input_gap); |
| 174 | VideoCore::g_renderer->rasterizer->FlushRegion(config.GetPhysicalInputAddress(), contiguous_input_size); | 174 | VideoCore::g_renderer->Rasterizer()->FlushRegion(config.GetPhysicalInputAddress(), contiguous_input_size); |
| 175 | 175 | ||
| 176 | u32 remaining_size = config.texture_copy.size; | 176 | u32 remaining_size = config.texture_copy.size; |
| 177 | u32 remaining_input = input_width; | 177 | u32 remaining_input = input_width; |
| @@ -204,7 +204,7 @@ inline void Write(u32 addr, const T data) { | |||
| 204 | config.flags); | 204 | config.flags); |
| 205 | 205 | ||
| 206 | size_t contiguous_output_size = config.texture_copy.size / output_width * (output_width + output_gap); | 206 | size_t contiguous_output_size = config.texture_copy.size / output_width * (output_width + output_gap); |
| 207 | VideoCore::g_renderer->rasterizer->InvalidateRegion(config.GetPhysicalOutputAddress(), contiguous_output_size); | 207 | VideoCore::g_renderer->Rasterizer()->InvalidateRegion(config.GetPhysicalOutputAddress(), contiguous_output_size); |
| 208 | 208 | ||
| 209 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); | 209 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); |
| 210 | break; | 210 | break; |
| @@ -231,7 +231,7 @@ inline void Write(u32 addr, const T data) { | |||
| 231 | u32 input_size = config.input_width * config.input_height * GPU::Regs::BytesPerPixel(config.input_format); | 231 | u32 input_size = config.input_width * config.input_height * GPU::Regs::BytesPerPixel(config.input_format); |
| 232 | u32 output_size = output_width * output_height * GPU::Regs::BytesPerPixel(config.output_format); | 232 | u32 output_size = output_width * output_height * GPU::Regs::BytesPerPixel(config.output_format); |
| 233 | 233 | ||
| 234 | VideoCore::g_renderer->rasterizer->FlushRegion(config.GetPhysicalInputAddress(), input_size); | 234 | VideoCore::g_renderer->Rasterizer()->FlushRegion(config.GetPhysicalInputAddress(), input_size); |
| 235 | 235 | ||
| 236 | for (u32 y = 0; y < output_height; ++y) { | 236 | for (u32 y = 0; y < output_height; ++y) { |
| 237 | for (u32 x = 0; x < output_width; ++x) { | 237 | for (u32 x = 0; x < output_width; ++x) { |
| @@ -338,7 +338,7 @@ inline void Write(u32 addr, const T data) { | |||
| 338 | g_regs.display_transfer_config.trigger = 0; | 338 | g_regs.display_transfer_config.trigger = 0; |
| 339 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); | 339 | GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PPF); |
| 340 | 340 | ||
| 341 | VideoCore::g_renderer->rasterizer->InvalidateRegion(config.GetPhysicalOutputAddress(), output_size); | 341 | VideoCore::g_renderer->Rasterizer()->InvalidateRegion(config.GetPhysicalOutputAddress(), output_size); |
| 342 | } | 342 | } |
| 343 | break; | 343 | break; |
| 344 | } | 344 | } |