Commit graph

48 commits

Author SHA1 Message Date
Henrik Rydgård
c729519cf5
Merge pull request #17442 from hrydgard/glr-render-command-shrink
Shrink the GLRRenderCommand struct from 152 to 88 bytes
2023-05-16 16:38:41 +02:00
Henrik Rydgård
b27c427547 We always bind and draw together, so let's combine them to one command. 2023-05-10 10:56:25 +02:00
Henrik Rydgård
c7caefe6d8 Have Draw and DrawIndexed share command and struct. Will make the next change easier. 2023-05-10 10:40:33 +02:00
Henrik Rydgård
d5e0299b0b GLR: Share union struct between Draw/DrawIndex 2023-05-10 10:32:13 +02:00
Henrik Rydgård
8f2069ef71 GLQueueRunner: Combine BindVertexBuffer with BindIndexBuffer 2023-05-10 09:23:10 +02:00
Henrik Rydgård
cc16eb8321 Shrink the GLRRenderCommand struct from 152 to 88 bytes
Turns out the VR work bloated it a bit, which can't be good.

Think it's fine to allocate these view matrices on the heap to get them
out of the way, there won't be that crazy many per frame usually.
2023-05-10 00:24:17 +02:00
Henrik Rydgård
5724bbd8e9 Correct size calculations in GLPushBuffer. I don't see how this failed as badly as in that crash report though... 2023-05-03 23:49:41 +02:00
Henrik Rydgård
d4249c1d73 OpenGL: Add an assert to catch a class of crash bugs early. Also assorted paranoia. 2023-05-01 11:56:26 +02:00
Henrik Rydgård
3d477003c4 Fix issue where if Break on Load was set, we'd crash once we started running in a few games 2023-04-30 10:06:43 +02:00
haoruiwang
7cbb7a09e5 [what][style][gpu] some coding style refine 2023-04-18 19:18:38 +08:00
Henrik Rydgård
d502198aa3 Move GLFrameData out of GLRenderManager.
Small refactor to prepare for adding delayed readback support to the
OpenGL backend.
2023-02-07 12:12:00 +01:00
Henrik Rydgård
937975000b Add a ReadbackMode parameter to more functions in the FramebufferManager 2023-02-05 13:57:45 +01:00
Henrik Rydgård
cb16f193ec Fix the problem. Still need to leave the loop with SDL even if we supply a swap function. 2023-01-30 15:45:05 +01:00
Henrik Rydgård
436a3e0d61 Cleaner exit from emuthread, as used by OpenGL. Don't know how it worked before... 2023-01-30 11:49:31 +01:00
Henrik Rydgård
a0c893cc8f Fix ThreadFrame. All OK now except shutdown, it seems 2023-01-30 11:49:31 +01:00
Henrik Rydgård
2659fd6f66 Android work. Make the Android OpenGL exit prodecure make more sense 2023-01-30 11:49:31 +01:00
Henrik Rydgård
b62572a78f Refactor the framedata/GPU thread management. 2023-01-30 11:49:31 +01:00
Henrik Rydgård
bfab820947 Merge some functions 2023-01-30 11:24:53 +01:00
Unknown W. Brackets
5102ef8a31 GLES: Delete LinkedShaders after the program.
The program references the shader, so we have to delete in this order.
Caused problems on useFlag change as well as probably DeviceLost.
2023-01-10 22:13:40 -08:00
Henrik Rydgård
6922ee7e52 Add some asserts in the hope of gathering some more info (and consolidating some crashes). 2022-12-18 21:58:20 +01:00
Unknown W. Brackets
a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
Henrik Rydgård
b7a3cf56cc OpenGL: Fix lifetime issue with uniform/sampler "locs" for thin3d pipelines 2022-12-09 20:52:19 +01:00
Henrik Rydgård
70d1d8fa07 Replace the "GetCurrentStepId"-based state invalidation with callbacks 2022-11-24 10:52:42 +01:00
Henrik Rydgård
90d395a10d Remove "attachment" parameter from BindFramebufferAsTexture everywhere.
Not actually useful since our framebuffer objects don't support multiple
color images, and probably won't ever need to.
2022-10-20 10:15:19 +02:00
Lubos
bf14ca84d3 OpenXR - Revision of VR rendering 2022-10-08 14:38:49 +02:00
Henrik Rydgård
b190c33cc7 Rewrite some present logic for slightly more clarity. Fixes bad logic and a minor race condition. 2022-09-20 17:05:53 +02:00
Unknown W. Brackets
c08c873462 GLES: Support more clip distances.
Will be used later, for now just the enable/disable logic.
2022-09-18 13:16:59 -07:00
Lubos
3331fedab7 OpenXR - Better variable/methods naming 2022-09-15 00:03:41 +02:00
Lubos
fb875b94de OpenXR - Multipass rendering fixed 2022-09-04 14:01:17 +02:00
Lubos
1df1d79b9e OpenXR - Stereo without multiview added 2022-09-04 12:36:52 +02:00
Lubos
c2c0561be2 OpenXR - OPENXR ifdef removal 2022-08-27 17:33:37 +02:00
Luboš Vonásek
11a6318509
Merge branch 'hrydgard:master' into feature_openxr_stereo 2022-08-24 19:50:45 +02:00
Henrik Rydgård
eb2f12e64a Drive-by texture slot management cleanup 2022-08-24 10:22:58 +02:00
Lubos
4026d49104 OpenXR - Multiview uniforms working 2022-08-17 19:14:36 +02:00
Lubos
ab6c91c203 OpenXR - Integrate multiview into system 2022-08-14 18:51:45 +02:00
Henrik Rydgård
6f1f482432 Make GLQueueRunner/RenderManager aware of device caps, use it to check for NPOT and some other stuff 2022-08-07 11:15:23 +02:00
Henrik Rydgård
8aebf0dca4 Port the OpenGL depal path to thin3d 2022-08-06 18:27:02 +02:00
Henrik Rydgård
fecf9127a0 Implement 3D texturing in the OpenGL backend too. Assorted fixes. 2022-07-31 10:43:48 +02:00
Henrik Rydgård
d0d53091a8 Change from maxLevel to levelsToLoad, for better readability. Cleanup. 2022-07-30 10:45:02 +02:00
Unknown W. Brackets
1ba8f1fa0a GLES: Remove old invalidation code.
We must've changed something to a KEEP, this never seems to catch anything
now.
2022-02-21 09:34:16 -08:00
Unknown W. Brackets
7d00b6ca90 GLES: Enable/disable clip distance 0. 2021-10-12 20:34:42 -07:00
Henrik Rydgård
df6abe83a3 Support depth clamping in OpenGL where available.
Should make support for depth texturing quite easy.

Unfortunately, this extension does not exist on OpenGL ES. There we'll
have to use ugly tricks with gl_FragDepth if we want this.
2021-07-09 21:09:44 +02:00
Unknown W. Brackets
7f8144494e Draw: Use constants for texture slots.
GL actually had a check for 16 but then an array for 8.  This should make
it easier to figure out if we ever hit those limits.
2021-06-12 14:10:57 -07:00
Unknown W. Brackets
e85a8b0f5b Global: Cleanup class init order warnings. 2021-02-15 11:59:45 -08:00
Henrik Rydgård
5eea7435d0 Minor cleanup in GL backend, fixes #13647
Was a stray old texture in boundTextures_ in thin3d. Now makes sure to
invalidate them, and also make it possible to look up bound framebuffer
textures when checking for valid tex parameters.
2020-11-10 00:13:44 +01:00
Henrik Rydgård
6310af25fa Get shader color write masking going on all backends. 2020-11-08 23:45:47 +01:00
Henrik Rydgård
207b76da6e Show an error on screen if a shader fails to compile.
Part of #1 investigation of #13541
2020-11-05 08:27:13 +01:00
Henrik Rydgård
0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Renamed from ext/native/thin3d/GLRenderManager.h (Browse further)