|
3a69828e
|
2021-12-17T13:15:39
|
|
Fixed GLES2 back-end on Big Endian Platform (see #5093)
|
|
3d5fcb5d
|
2021-12-16T11:10:07
|
|
Fix warning
|
|
4342e6bd
|
2021-12-16T10:53:27
|
|
SDL_render.c: lighten the cast syntax
|
|
50d49c63
|
2021-12-16T10:52:36
|
|
GLES2 backend: cast with SDL_Vertex and SDL_VertexSolid
|
|
0b7b0977
|
2020-12-27T17:51:39
|
|
fix PSP texure artifacts
|
|
0341ec93
|
2021-11-26T11:34:40
|
|
Improve performance when vsync is enabled and the game is not reaching the 60 FPS
|
|
3a5e148b
|
2021-12-14T11:02:07
|
|
Renderer backends use SDL_Color instead of int for geometry colors.
|
|
b08e57e9
|
2021-12-14T09:32:05
|
|
Don't try to create a vbo if we aren't using any vertices
|
|
b7885abc
|
2021-12-14T10:31:55
|
|
Fixed bug #5087: SDL_RenderGeometryRaw() passes colors as int* instead of SDL_Color*
|
|
323ba6c0
|
2021-12-13T18:27:49
|
|
d3d11 renderer: reduce vertex bandwidth and calculations.
|
|
8927d73b
|
2021-12-12T09:55:23
|
|
RenderGeometry: simplify casting (Thanks Daniel Gibson)
|
|
d7f66ba1
|
2021-12-11T20:04:53
|
|
Remove strict aliasing warning in opengles2 backend
|
|
3e43d6e3
|
2021-12-11T17:19:00
|
|
SDL_RenderGeometry: remove some warning "dereferencing type-punned pointer might break strict-aliasing"
|
|
1940d289
|
2021-12-08T09:41:33
|
|
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)
|
|
21d46b7e
|
2020-12-26T12:46:07
|
|
PSP renderer fixed
|
|
801dcbc5
|
2021-12-07T14:04:10
|
|
SDL_render_sw.c: fix -Wshadow warnings.
|
|
e17a3154
|
2021-12-07T10:56:48
|
|
Fix build issue
|
|
7266cf66
|
2021-12-07T10:54:30
|
|
Clean up PSP render code to fit C standard used better
|
|
07608bf4
|
2021-12-07T10:36:19
|
|
Fix ISO C90 violations in psp render code
|
|
d09f80ef
|
2021-12-07T11:31:57
|
|
SDL_DrawPointsF: fix error message typo
|
|
6dafc850
|
2021-12-07T10:44:12
|
|
SDL_DrawLines: minor simpification:
- scale is 1.0f, don't need to multiply
- typo in error message
- remap SDL_DrawLines to SDL_DrawLinesF
|
|
a0818a63
|
2021-12-07T10:07:15
|
|
Fixed bug #5071 - Float conversion warnings in SDL_render.c (see also #5003)
|
|
e14d1026
|
2021-11-26T13:12:22
|
|
Change viewport and cliprect to float version: from SDL_Rect to SDL_FRect
|
|
7828362d
|
2021-11-24T16:45:06
|
|
SDL_Renderer software, D3D11: don't use "renderer->viewport" in back-ends, but use the one from SETVIEWPORT cmd
|
|
b786c100
|
2021-11-26T19:45:16
|
|
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
|
|
86c0cf2b
|
2021-11-26T14:31:20
|
|
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.
|
|
e77cfb9a
|
2021-11-24T00:29:45
|
|
Fixed d3d11 renderer creation
|
|
2a24418b
|
2021-11-23T09:44:37
|
|
More "Integer overflow generates Illegal instruction under sanitizers" (see bug #4995)
|
|
8dd6edec
|
2021-11-23T09:30:42
|
|
Fixed bug #3232 - Integer overflow generates Illegal instruction under sanitizers + see bug #4995
|
|
e18be04b
|
2021-11-23T08:01:02
|
|
Fixed undefined behavior in QueueCmdSetDrawColor()
Fixes https://github.com/libsdl-org/SDL/issues/4995
Patch from Andrew Kelley
|
|
aef71054
|
2021-11-22T16:58:04
|
|
Use SDL_free
|
|
fb218e58
|
2021-11-22T16:16:04
|
|
PSP: use SDL_malloc/SDL_free
|
|
161dd83c
|
2021-11-22T11:15:23
|
|
DonĀ“t use "trunc" as var name, since it's also a function
|
|
d31251b0
|
2021-11-21T22:30:48
|
|
use SDL's functions version inplace of libc version
|
|
49369142
|
2021-11-21T17:40:48
|
|
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
|
|
9ec2b351
|
2021-11-15T13:45:53
|
|
Fixed the GLES2 shader count to be in sync with the enum
|
|
d4df5d33
|
2021-11-15T09:43:44
|
|
GLES2: prevent batching if blend mode changes (see bug #4964)
|
|
92f2fdfc
|
2021-11-15T09:36:18
|
|
GLES2: batch non joined lines (see #4964)
|
|
17f156fa
|
2021-11-15T09:08:09
|
|
Fixed bug #4964 - opengles2 & batching = conjoined lines
put back the initial switch case because groups of joined lines cannot be batched.
|
|
d8888e46
|
2021-11-15T08:37:49
|
|
Fixed bug #4964 - opengles2 & batching = conjoined lines
|
|
c55ab963
|
2021-11-13T22:21:57
|
|
Added a hint for alternate OpenGL NV12 data format
|
|
70c8d20a
|
2021-11-13T15:04:19
|
|
Revert previous commit a50ca98e2b9ca10368b62e93b6a0977dc68fd584 (see bug #4625)
|
|
a50ca98e
|
2021-11-13T14:48:36
|
|
Fixed bug #4625 - SDL_RenderSetLogicalSize issues
viewport becomes -2147483648x-2147483648 when logical_w/h is greater than window size.
division should be done with floats
|
|
3bf7994f
|
2021-09-27T14:38:12
|
|
Add and use `SDL_FALLTHROUGH` for fallthroughs
Case fallthrough warnings can be suppressed using the __fallthrough__
compiler attribute. Unfortunately, not all compilers have this
attribute, or even have __has_attribute to check if they have the
__fallthrough__ attribute. [[fallthrough]] is also available in C++17
and the next C2x, but not everyone uses C++17 or C2x.
So define the SDL_FALLTHROUGH macro to deal with those problems - if we
are using C++17 or C2x, it expands to [[fallthrough]]; else if the
compiler has __has_attribute and has the __fallthrough__ attribute, then
it expands to __attribute__((__fallthrough__)); else it expands to an
empty statement, with a /* fallthrough */ comment (it's a do {} while
(0) statement, because users of this macro need to use a semicolon,
because [[fallthrough]] and __attribute__((__fallthrough__)) require a
semicolon).
Clang before Clang 10 and GCC before GCC 7 have problems with using
__attribute__ as a sole statement and warn about a "declaration not
declaring anything", so fall back to using the /* fallthrough */ comment
if we are using those older compiler versions.
Applications using SDL are also free to use this macro (because it is
defined in begin_code.h).
All existing /* fallthrough */ comments have been replaced with this
macro. Some of them were unnecessary because they were the last case in
a switch; using SDL_FALLTHROUGH in those cases would result in a compile
error on compilers that support __fallthrough__, for having a
__attribute__((__fallthrough__)) statement that didn't immediately
precede a case label.
|
|
abc12a83
|
2021-11-11T15:58:44
|
|
Revert "Add and use `SDL_FALLTHROUGH` for fallthroughs"
This reverts commit 66a08aa3914a98667f212e79b4f0b9453203d656.
This causes problems with older compilers:
https://github.com/libsdl-org/SDL/pull/4791#issuecomment-966630997
|
|
66a08aa3
|
2021-09-27T14:38:12
|
|
Add and use `SDL_FALLTHROUGH` for fallthroughs
Case fallthrough warnings can be suppressed using the __fallthrough__
compiler attribute. Unfortunately, not all compilers have this
attribute, or even have __has_attribute to check if they have the
__fallthrough__ attribute. [[fallthrough]] is also available in C++17
and the next C2x, but not everyone uses C++17 or C2x.
So define the SDL_FALLTHROUGH macro to deal with those problems - if we
are using C++17 or C2x, it expands to [[fallthrough]]; else if the
compiler has __has_attribute and has the __fallthrough__ attribute, then
it expands to __attribute__((__fallthrough__)); else it expands to an
empty statement, with a /* fallthrough */ comment (it's a do {} while
(0) statement, because users of this macro need to use a semicolon,
because [[fallthrough]] and __attribute__((__fallthrough__)) require a
semicolon).
Applications using SDL are also free to use this macro (because it is
defined in begin_code.h).
All existing /* fallthrough */ comments have been replaced with this
macro. Some of them were unnecessary because they were the last case in
a switch; using SDL_FALLTHROUGH in those cases would result in a compile
error on compilers that support __fallthrough__, for having a
__attribute__((__fallthrough__)) statement that didn't immediately
precede a case label.
|
|
6c4b4ee7
|
2021-11-10T09:41:43
|
|
Don't assert on API parameters
This causes lots of spam in test automation and it's not clear it's useful to developers. If we need this level of validation, we should add a log category for it.
|
|
3a31a450
|
2021-11-10T05:24:31
|
|
End the scene before resetting the D3D device, since we'll start with BeginScene after that.
If we don't do this, we'll end up with unbalanced Begin/End scene pairs which causes D3DERR_INVALIDCALL in the present.
Fixes https://github.com/libsdl-org/SDL/issues/4933
|
|
0d987936
|
2021-11-09T22:03:42
|
|
testwm2: Fix video modes menu hit detection when highdpi or logical size used (#4936)
* SDLTest_CommonDrawWindowInfo: log SDL_RenderGetScale, SDL_RenderGetLogicalSize
* testwm2: fix video modes menu hit detection in High DPI cases
- also when logical size is specified, e.g.
`--logical 640x480 --resizable --allow-highdpi`
* add function to determine logical coordinates of renderer point when given window point
* change since to the targeted milestone
* fix typo
* rename for consistency
* Change logical coordinate type to float, since we can render with floating point precision.
* add function to convert logical to window coordinates
* testwm2: use new SDL_RenderWindowToLogical
* SDL_render.c: alternate SDL_RenderWindowToLogical/SDL_RenderLogicalToWindow
Co-authored-by: John Blat <johnblat64@protonmail.com>
Co-authored-by: John Blat <47202511+johnblat64@users.noreply.github.com>
|
|
04f42e04
|
2021-11-09T11:50:49
|
|
metal: Deal better with -[CAMetalLayer nextDrawable] returning nil.
Fixes #4863.
|
|
637bcd0b
|
2021-11-07T11:19:07
|
|
Fixed build warnings
|
|
848d7b12
|
2021-11-02T16:12:55
|
|
Vita: Implement command batching
|
|
3f7a94fc
|
2021-11-02T15:16:48
|
|
Vita: Remove FillRects
|
|
fba82ad1
|
2021-10-31T12:38:08
|
|
Remove sceGxmFinish from RenderPresent on Vita. Make sure that rendering is finished on render texture during locking
|
|
4960cc3d
|
2021-10-25T16:18:40
|
|
Fixed a few warnings
|
|
b7933945
|
2021-10-25T13:46:40
|
|
SDL_Renderer: make clear that we use render geometry for fillrect/copy/copyex when there is no specific back-end implementation (currently software, PSP, directfb)
|
|
b3f9d8f3
|
2021-10-25T07:05:50
|
|
remove unused local vars after the latest commits.
|
|
502e9c3b
|
2021-10-24T17:16:49
|
|
SDL_Renderer simplifications:
- Factorize PrepQueueCmdDraw{,DrawTexture,Solid) into one single function
- Change SDL_Texture/Renderer r,g,b,a Uint8 into an SDL_Color, so that it can be passed directly to RenderGeometry
- Don't automatically queue a SET_DRAW_COLOR cmd for RenderGeometry (and update GLES2 renderer)
|
|
79732c9d
|
2021-09-25T11:35:20
|
|
Remove FillRects from back-end, where RenderGeometry can be used
|
|
f02ad282
|
2021-09-25T11:31:18
|
|
Remove FillRects from back-end, where RenderGeometry can be used
|
|
70b10c75
|
2021-09-24T22:39:49
|
|
Use correct indices when using RenderGeometry / FillRects
|
|
16beed9a
|
2021-09-24T17:09:04
|
|
Less code since color is constant when done with triangles
|
|
99a34643
|
2021-09-24T09:42:04
|
|
OpenGLES2: LINES and POINTS successive commands are combined into a single draw call
(using the same case for DRAW_GEOMETRY)
|
|
f0cdc1d0
|
2021-09-24T09:38:25
|
|
OpenGLES2: remove FillRects, since it's can be done with RenderGeometry
|
|
37c39d5c
|
2021-09-23T22:45:45
|
|
Use geometry to implement FillRects
|
|
b0eef52f
|
2021-09-23T22:32:29
|
|
GLES2 batching: probably need to check for blendMode changes
|
|
c27e1249
|
2021-09-20T17:17:34
|
|
Remove SDL_HAVE_RENDER_GEOMETRY define
|
|
77026f67
|
2021-09-20T17:09:44
|
|
Metal: remove RenderCopy and RenderCopyEx from back-end
|
|
0e5160a0
|
2021-09-20T17:01:33
|
|
VITA: remove RenderCopy and RenderCopyEx from back-end
|
|
73f4ab4c
|
2021-09-20T16:57:21
|
|
Direct3D11: remove RenderCopy and RenderCopyEx from back-end
|
|
ab758398
|
2021-09-20T16:53:03
|
|
Direct3D: remove RenderCopy and RenderCopyEx from back-end
|
|
1fe7e361
|
2021-09-20T16:46:16
|
|
OpenGL: a few opengl functions become unused
|
|
88548070
|
2021-09-20T16:40:47
|
|
OpenGLES: remove RenderCopy and RenderCopyEx from back-end
|
|
d1925154
|
2021-09-20T16:33:49
|
|
OpenGL: remove RenderCopy and RenderCopyEx from back-end
|
|
b92056bb
|
2021-09-20T16:33:03
|
|
OpenGLES2: remove RenderCopy and RenderCopyEx from back-end
|
|
76f9fb96
|
2021-09-20T16:32:08
|
|
Use RenderGeometry to implement RenderCopy and RenderCopyEx at higher level
|
|
08797ada
|
2021-09-19T00:39:28
|
|
opengles2: Attempt to batch RenderCopy calls into a single glDrawArrays call.
|
|
b360965d
|
2021-10-21T20:48:05
|
|
Added a hint for alternate OpenGL NV12 data format
|
|
a34fe816
|
2021-10-21T12:28:35
|
|
Added the ability to bind NV12 textures in the OpenGL renderer
|
|
f080273a
|
2021-10-04T22:00:16
|
|
PSP: add implementation for RenderGeometry
|
|
dd9b2daf
|
2021-10-04T21:56:42
|
|
PSP: fixed build
|
|
77acd44f
|
2021-10-01T22:30:51
|
|
DirectFB: fixed creation of palette textures
|
|
114d1d46
|
2021-09-27T23:18:25
|
|
direct3d: Remove unnecessary render target support check.
Direct3D 9 dictates that caps.NumSimultaneousRTs must always be at least 1,
which is to say that Direct3D 9 level hardware must always support render
targets.
(caps.NumSimultaneousRTs is meant to show if you can draw to multiple render
targets in a single draw call.)
We had already hardcoded SDL_RENDERER_TARGETTEXTURE as available earlier in
the function anyhow.
Fixes #4781.
|
|
14f22519
|
2021-09-26T18:11:22
|
|
Use SDL_calloc for allocation of gxm_texture
|
|
52921563
|
2021-09-22T21:23:42
|
|
End Scene on RunCommandQueue on Vita
|
|
eb3bf80f
|
2021-09-21T18:15:09
|
|
Fixed compiler warnings using Visual Studio 2019
|
|
3b2fbb1c
|
2021-09-20T23:44:22
|
|
End current scene before destroying the texture on Vita
|
|
fc4296c1
|
2021-09-20T23:02:43
|
|
Use aligned stride in sceGxmColorSurfaceInit
|
|
7080bc2a
|
2021-09-20T23:02:01
|
|
Fallback to SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE if CDRAM texture allocation fails
|
|
ca9a3217
|
2021-09-19T15:47:24
|
|
render: GL/GLES now draw lines almost perfectly matching software renderer.
One place known to differ in a significant way is a single line segment that
starts and ends on the same point; the GL renderers will light up a single
pixel here, whereas the software renderer will not. My current belief is this
is a bug in the software renderer, based on the wording of the docs:
"SDL_RenderDrawLine() draws the line to include both end points."
You can see an example program that triggers that difference in Bug #2006.
As it stands, the GL renderers might _also_ render diagonal lines differently,
as the the Bresenham step might vary between implementations (one does three
pixels and then two, the other does two and then three, etc). But this patch
causes those lines to start and end on the correct pixel, and that's the best
we can do, and all anyone really needs here.
Not closing any bugs with this patch (yet!), but here are several that it
appears to fix. If no other corner cases pop up, we'll call this done.
Reference Bug #2006.
Reference Bug #1626.
Reference Bug #4001.
...and probably others...
|
|
857cc7c0
|
2021-09-19T00:05:21
|
|
render: constified some local variables in SDL_AllocateRenderVertices.
|
|
5faea84c
|
2021-09-18T11:54:25
|
|
render: Mark viewport/cliprect dirty when window is resized.
Fixes #4751.
|
|
79ec8986
|
2021-09-16T12:47:45
|
|
Vita: refactor gxm texture render and add SDL_RenderGeometry support
|
|
4a994733
|
2021-09-14T15:51:17
|
|
`SDL_RenderSetVSync()`: Restrict `vsync` to 0 or 1
In the future, we might want to support special swap intervals. To
prevent applications from expecting nonzero values of vsync to be the
same as "on", fail with SDL_Unsupported() if the value passed is neither
0 nor 1.
|
|
4549769d
|
2021-03-07T15:20:45
|
|
Add `SDL_RenderSetVSync()`
Currently, if an application wants to toggle VSync, they'd have to tear
down the renderer and recreate it. This patch fixes that by letting
applications call SDL_RenderSetVSync().
This is the same as the patch in #3673, except it applies to all
renderers (including PSP, even thought it seems that the VSync flag is
disabled for that renderer). Furthermore, the renderer flags also change
as well, which #3673 didn't do. It is also an API instead of using hint
callbacks (which could be potentially dangerous).
Closes #3673.
|
|
10d3df44
|
2021-09-09T12:46:28
|
|
Vita: fix copyright dates
|
|
d49d955d
|
2021-09-08T11:44:17
|
|
render: SDL_RenderGeometry should still render when hidden, in most cases.
(otherwise render targets may fail, etc...the check is a legacy helper for
iOS apps that crash if you try to use OpenGL while in the background.)
|
|
183eb067
|
2021-09-01T15:46:32
|
|
Fixed bug #4711: prevent opengl SDL_renderer from crashing if GL_ARB_multitexture isn't supported
|
|
be6bee0b
|
2021-08-27T07:47:28
|
|
SW_RenderGeometry: add a redundant check to clear static analysis (see bug #4600)
|
|
54ca1d19
|
2021-08-27T07:44:03
|
|
SW_RenderGeometry: add a redundant check to clear static analysis (see bug #4600)
|