Wouter Wijsman
515b5f2a39
Fix build errors in PSP port
2022-01-06 10:17:05 -08:00
Wouter Wijsman
34e34ad5a5
Remove debug code from PSP renderer
2022-01-06 10:17:05 -08:00
stdgregwar
520c89a00a
cleaning
2022-01-06 10:17:05 -08:00
stdgregwar
09f4711f40
Fix LRU when destroying texture.
2022-01-06 10:17:05 -08:00
stdgregwar
c3ec62d6a6
PSP lazier blend states, display mode report with 16bit option
2022-01-06 10:17:05 -08:00
stdgregwar
0f5368fe11
PSP cached blending and texturing state, ABGR1555 stencil hack
2022-01-06 10:17:05 -08:00
stdgregwar
fe405eb27b
fixed LRU cache code
2022-01-06 10:17:05 -08:00
stdgregwar
c1f152292b
Spill render targets to ram on PSP
2022-01-06 10:17:05 -08:00
stdgregwar
77d874e3c0
Attempt to make render to texture work on PSP
2022-01-06 10:17:05 -08:00
Sam Lantinga
120c76c84b
Updated copyright for 2022
2022-01-03 09:40:21 -08:00
Sylvain
8622eda9e9
SDL_RenderGeometry / software: TRIANGLE_GET_TEXTCOORD interpolates up to the max values included, so reduce by 1
2022-01-02 22:34:56 +01:00
Alex Szpakowski
724468ae2c
GL renderer uses glDrawArrays instead of glBegin/glEnd.
...
Also change internal colors sent to GL to use unorm8 components instead of float, for improved performance.
2021-12-27 10:52:47 -05:00
Sylvain
44c84c0d8e
GLES2/Big-endian: don´t swap datas for yuv textures (Thanks 0x1F9F1 !)
2021-12-17 17:44:34 +01:00
Sylvain
3a69828e87
Fixed GLES2 back-end on Big Endian Platform (see #5093 )
2021-12-17 13:15:39 +01:00
Sylvain
3d5fcb5da6
Fix warning
2021-12-16 09:19:53 -08:00
Sylvain
4342e6bd21
SDL_render.c: lighten the cast syntax
2021-12-16 09:19:53 -08:00
Sylvain
50d49c63ed
GLES2 backend: cast with SDL_Vertex and SDL_VertexSolid
2021-12-16 09:19:53 -08:00
stdgregwar
0b7b0977fc
fix PSP texure artifacts
2021-12-15 18:00:28 -08:00
Francisco Javier Trujillo Mata
0341ec93fe
Improve performance when vsync is enabled and the game is not reaching the 60 FPS
2021-12-15 11:29:49 -08:00
Alex Szpakowski
3a5e148b13
Renderer backends use SDL_Color instead of int for geometry colors.
2021-12-14 12:19:16 -08:00
Sam Lantinga
b08e57e926
Don't try to create a vbo if we aren't using any vertices
2021-12-14 09:32:05 -08:00
Sylvain
b7885abc44
Fixed bug #5087 : SDL_RenderGeometryRaw() passes colors as int* instead of SDL_Color*
2021-12-14 10:31:55 +01:00
Alex Szpakowski
323ba6c008
d3d11 renderer: reduce vertex bandwidth and calculations.
2021-12-13 15:14:33 -08:00
Sylvain
8927d73b1c
RenderGeometry: simplify casting (Thanks Daniel Gibson)
2021-12-12 09:55:23 +01:00
Sylvain
d7f66ba1ec
Remove strict aliasing warning in opengles2 backend
2021-12-11 20:04:53 +01:00
Sylvain
3e43d6e34b
SDL_RenderGeometry: remove some warning "dereferencing type-punned pointer might break strict-aliasing"
2021-12-11 17:19:00 +01:00
Sylvain
1940d289bf
SW Renderer: fix invalid read if VSYNC hint is initially set with an empty value (eg "")
...
because:
- GeHint return a value pointer.
- SetHint free internally the pointer
- The -now invalid- pointer is re-read
==9363== Invalid read of size 1
==9363== at 0x4946860: SW_CreateRenderer (SDL_render_sw.c:1044)
==9363== by 0x48F0EC3: SDL_CreateRenderer_REAL (SDL_render.c:938)
==9363== by 0x48C5921: SDL_CreateRenderer (SDL_dynapi_procs.h:332)
==9363== by 0x401584: main (main.c:421)
==9363== Address 0x9c24040 is 0 bytes inside a block of size 1 free'd
==9363== at 0x484621F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==9363== by 0x494E403: SDL_free_REAL (SDL_malloc.c:5432)
==9363== by 0x48A6153: SDL_SetHintWithPriority_REAL (SDL_hints.c:76)
==9363== by 0x48A6254: SDL_SetHint_REAL (SDL_hints.c:101)
2021-12-08 09:41:33 +01:00
stdgregwar
21d46b7e0c
PSP renderer fixed
2021-12-07 20:55:04 +03:00
Ozkan Sezer
801dcbc5ef
SDL_render_sw.c: fix -Wshadow warnings.
2021-12-07 14:04:10 +03:00
Wouter Wijsman
e17a3154ed
Fix build issue
2021-12-07 14:03:00 +03:00
Wouter Wijsman
7266cf66c7
Clean up PSP render code to fit C standard used better
2021-12-07 14:03:00 +03:00
Wouter Wijsman
07608bf45f
Fix ISO C90 violations in psp render code
2021-12-07 14:03:00 +03:00
Sylvain
d09f80ef18
SDL_DrawPointsF: fix error message typo
2021-12-07 11:31:57 +01:00
Sylvain
6dafc85017
SDL_DrawLines: minor simpification:
...
- scale is 1.0f, don't need to multiply
- typo in error message
- remap SDL_DrawLines to SDL_DrawLinesF
2021-12-07 10:44:12 +01:00
Sylvain
a0818a63e3
Fixed bug #5071 - Float conversion warnings in SDL_render.c (see also #5003 )
2021-12-07 10:07:15 +01:00
Sylvain
e14d10263c
Change viewport and cliprect to float version: from SDL_Rect to SDL_FRect
2021-12-02 10:01:50 +01:00
Sylvain
7828362da9
SDL_Renderer software, D3D11: don't use "renderer->viewport" in back-ends, but use the one from SETVIEWPORT cmd
2021-12-02 10:01:50 +01:00
Eric Wasylishen
b786c10013
SDL_render_gl.c: GL_RunCommandQueue: always set viewport_dirty on macOS
...
Without this, moving the window changes the viewport and causes contents
to render stretched.
Fixes #1504
2021-11-27 07:12:34 -05:00
Ryan C. Gordon
86c0cf2bb1
software: Draw a single pixel for a line with the same start/end point.
...
Otherwise it would drop it, which seems like a bug to me, as it normally
fills the endpoint on lines.
Reference #2006 .
2021-11-26 14:34:51 -05:00
DarkContact
e77cfb9a11
Fixed d3d11 renderer creation
2021-11-24 10:11:35 -05:00
Sylvain
2a24418bd3
More "Integer overflow generates Illegal instruction under sanitizers" (see bug #4995 )
2021-11-23 09:44:37 +01:00
Sylvain
8dd6edec00
Fixed bug #3232 - Integer overflow generates Illegal instruction under sanitizers + see bug #4995
2021-11-23 09:30:42 +01:00
Ozkan Sezer
e18be04bc6
Fixed undefined behavior in QueueCmdSetDrawColor()
...
Fixes https://github.com/libsdl-org/SDL/issues/4995
Patch from Andrew Kelley
2021-11-23 08:01:02 +03:00
Sylvain
aef7105408
Use SDL_free
2021-11-22 08:38:46 -08:00
Sylvain
fb218e582a
PSP: use SDL_malloc/SDL_free
2021-11-22 08:38:46 -08:00
Sylvain
161dd83c9a
Don´t use "trunc" as var name, since it's also a function
2021-11-22 08:38:46 -08:00
Sylvain
d31251b014
use SDL's functions version inplace of libc version
2021-11-22 08:38:46 -08:00
Sylvain
49369142bd
Fixed bug #4625 : with integer scale, viewport (as reported by SDL_RenderGetViewport) becomes -2147483648x-2147483648
...
0 isn't valid scale. Min integer scale is 1.0f
2021-11-21 17:40:48 +01:00
Sam Lantinga
9ec2b35147
Fixed the GLES2 shader count to be in sync with the enum
2021-11-15 13:45:53 -08:00
Sylvain
d4df5d33c5
GLES2: prevent batching if blend mode changes (see bug #4964 )
2021-11-15 09:43:44 +01:00