mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 03:40:24 +00:00
exynos: remove G2D safety zone
Extensive tests have shown that this is no longer necessary.
This commit is contained in:
parent
34e1b6921f
commit
2dcac8cbd4
@ -45,11 +45,6 @@
|
|||||||
extern void *memcpy_neon(void *dst, const void *src, size_t n);
|
extern void *memcpy_neon(void *dst, const void *src, size_t n);
|
||||||
|
|
||||||
|
|
||||||
/* When scaling the G2D seems to need a small 'safety zone' towards the borders of *
|
|
||||||
* the destination buffer, otherwise leading to execution errors. This needs further *
|
|
||||||
* investigation, but for now we just stay 4 (= 8 / 2) pixels away from the border. */
|
|
||||||
static const unsigned g2d_safety_zone = 8;
|
|
||||||
|
|
||||||
/* We use two GEM buffers (main and aux) to handle 'data' from the frontend. */
|
/* We use two GEM buffers (main and aux) to handle 'data' from the frontend. */
|
||||||
enum exynos_buffer_type {
|
enum exynos_buffer_type {
|
||||||
exynos_buffer_main = 0,
|
exynos_buffer_main = 0,
|
||||||
@ -897,9 +892,6 @@ static void exynos_setup_scale(struct exynos_data *pdata, unsigned width,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
w -= g2d_safety_zone;
|
|
||||||
h -= g2d_safety_zone;
|
|
||||||
|
|
||||||
pdata->blit_params[0] = (pdata->width - w) / 2;
|
pdata->blit_params[0] = (pdata->width - w) / 2;
|
||||||
pdata->blit_params[1] = (pdata->height - h) / 2;
|
pdata->blit_params[1] = (pdata->height - h) / 2;
|
||||||
pdata->blit_params[2] = w;
|
pdata->blit_params[2] = w;
|
||||||
@ -912,13 +904,12 @@ static void exynos_setup_scale(struct exynos_data *pdata, unsigned width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void exynos_set_fake_blit(struct exynos_data *pdata) {
|
static void exynos_set_fake_blit(struct exynos_data *pdata) {
|
||||||
const unsigned offset = g2d_safety_zone / 2;
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
pdata->blit_params[0] = offset;
|
pdata->blit_params[0] = 0;
|
||||||
pdata->blit_params[1] = offset;
|
pdata->blit_params[1] = 0;
|
||||||
pdata->blit_params[2] = pdata->width - offset;
|
pdata->blit_params[2] = pdata->width;
|
||||||
pdata->blit_params[3] = pdata->height - offset;
|
pdata->blit_params[3] = pdata->height;
|
||||||
|
|
||||||
for (i = 0; i < pdata->num_pages; ++i)
|
for (i = 0; i < pdata->num_pages; ++i)
|
||||||
pdata->pages[i].clear = true;
|
pdata->pages[i].clear = true;
|
||||||
@ -992,16 +983,14 @@ static int exynos_blend_menu(struct exynos_data *pdata,
|
|||||||
|
|
||||||
static int exynos_blend_font(struct exynos_data *pdata) {
|
static int exynos_blend_font(struct exynos_data *pdata) {
|
||||||
struct g2d_image *src = pdata->src[exynos_image_font];
|
struct g2d_image *src = pdata->src[exynos_image_font];
|
||||||
const unsigned offset = g2d_safety_zone / 2;
|
|
||||||
|
|
||||||
#if (EXYNOS_GFX_DEBUG_PERF == 1)
|
#if (EXYNOS_GFX_DEBUG_PERF == 1)
|
||||||
perf_g2d(&pdata->perf, true);
|
perf_g2d(&pdata->perf, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (g2d_scale_and_blend(pdata->g2d, src, pdata->dst, 0, 0,
|
if (g2d_scale_and_blend(pdata->g2d, src, pdata->dst, 0, 0, src->width,
|
||||||
src->width, src->height, offset,
|
src->height, 0, 0, pdata->width, pdata->height,
|
||||||
offset, pdata->width - offset,
|
G2D_OP_INTERPOLATE) ||
|
||||||
pdata->height - offset, G2D_OP_INTERPOLATE) ||
|
|
||||||
g2d_exec(pdata->g2d)) {
|
g2d_exec(pdata->g2d)) {
|
||||||
RARCH_ERR("video_exynos: failed to blend font\n");
|
RARCH_ERR("video_exynos: failed to blend font\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user