aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpulib/gpu.c
diff options
context:
space:
mode:
authornotaz2012-08-13 00:02:23 +0300
committernotaz2012-10-12 00:05:07 +0300
commit0b02eb7712f1272fa7f38b0af41968b53af3b5a8 (patch)
tree4669cafcabf88f0a5be798bbcca8626937767dc1 /plugins/gpulib/gpu.c
parentcb88320b4ddbfd8c1714f9a6cba31543a585a8cd (diff)
downloadpcsx_rearmed-0b02eb7712f1272fa7f38b0af41968b53af3b5a8.tar.gz
pcsx_rearmed-0b02eb7712f1272fa7f38b0af41968b53af3b5a8.tar.bz2
pcsx_rearmed-0b02eb7712f1272fa7f38b0af41968b53af3b5a8.zip
add support for software-enhanced rendering
Diffstat (limited to 'plugins/gpulib/gpu.c')
-rw-r--r--plugins/gpulib/gpu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c
index 46e92d1..462e301 100644
--- a/plugins/gpulib/gpu.c
+++ b/plugins/gpulib/gpu.c
@@ -9,6 +9,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "gpu.h"
@@ -137,8 +138,21 @@ long GPUinit(void)
{
int ret;
ret = vout_init();
+
+ gpu.state.enhancement_available = 0;
ret |= renderer_init();
+ if (gpu.state.enhancement_available) {
+ if (gpu.enhancement_bufer == NULL)
+ gpu.enhancement_bufer = malloc(2048 * 1024 * 2 + 1024 * 512 * 2);
+ if (gpu.enhancement_bufer == NULL)
+ gpu_log("OOM for enhancement buffer\n");
+ }
+ else if (gpu.enhancement_bufer != NULL) {
+ free(gpu.enhancement_bufer);
+ gpu.enhancement_bufer = NULL;
+ }
+
gpu.state.frame_count = &gpu.zero;
gpu.state.hcnt = &gpu.zero;
gpu.frameskip.active = 0;
@@ -669,6 +683,7 @@ void GPUrearmedCallbacks(const struct rearmed_cbs *cbs)
gpu.state.hcnt = cbs->gpu_hcnt;
gpu.state.frame_count = cbs->gpu_frame_count;
gpu.state.allow_interlace = cbs->gpu_neon.allow_interlace;
+ gpu.state.enhancement_enable = cbs->gpu_neon.enhancement_enable;
if (cbs->pl_vout_set_raw_vram)
cbs->pl_vout_set_raw_vram(gpu.vram);