Commit graph

193 commits

Author SHA1 Message Date
Unknown W. Brackets
c8f8d55118 Vulkan: Correct viewport flag reset on rebind.
Can't break since we're checking two separate flags.
2020-05-24 21:36:23 -07:00
Henrik Rydgård
370678c498 Do a similar thing for D3D (let the backend handle the dirtying). 2020-05-24 20:57:59 +02:00
Henrik Rydgård
fabe987c8f Add a name tag for all render steps (GL/Vulkan). Helps with debugging and should be cheap enough (a single pointer per "step"). 2020-05-21 11:24:05 +02:00
Henrik Rydgård
e64fdfa0c3 Fix a case of pointer truncation in Vulkan on 32-bit. Fixes #12932 2020-05-19 20:53:51 +02:00
Henrik Rydgård
4bf92a66c5 Thin3D: use 16-bit indices. Fixes #12898. 2020-05-15 18:07:07 +02:00
Unknown W. Brackets
8b4821bc05 Draw: Small optimization to callback.
This allows the callback to say "I didn't copy, please copy for me."  This
helps when additional conversions will be applied during the copy, or a
copy can be skipped.

Also, fixed a couple cases of the wrong mip level being used.
2020-05-13 20:30:24 -07:00
Unknown W. Brackets
762b656ea2 GPU: Use a texture directly for MakePixelTexture.
This makes it easier to do things with it.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets
ddd3af2297 Draw: Actually use the index offset parameter.
I'm not sure we need it, but having a param used only on one backend is
confusing.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets
c025eab86e Draw: Add more uniform types.
Only because we might have float a[2]; float b[2];...
2020-05-13 18:07:25 -07:00
Unknown W. Brackets
9b8157f624 Draw: Allow specifying a tag on shaders.
This way they are not always "thin3d" when using Draw.
2020-05-13 18:07:25 -07:00
Unknown W. Brackets
a03e368566 GPU: Move cardboard/etc. to PresentationCommon.
Now this works on softgpu as well.

Some hacks for backend differences...
2020-05-13 18:07:25 -07:00
Henrik Rydgård
e62c669f10 GLES: Disable range culling on old Tegras, they seem to misbehave (see issue #12838).
This is a blind fix - couldn't find my old Shield Portable :(
2020-04-19 18:43:20 +02:00
Henrik Rydgård
4f7c23fe79 DarkStalkers: Fix display on OpenGL ES. 2019-10-27 20:54:36 +01:00
Henrik Rydgård
46447c9e90 Correct the wrong GL DataFormat enums 2019-10-24 23:01:45 +02:00
Henrik Rydgård
9e607fdeb1 GL: remove another unused format 2019-10-24 22:49:36 +02:00
Henrik Rydgård
fcfeda653d Reduce GL texture format support to the ES minimum. We have to handle these anyway so let's only have one path. 2019-10-24 22:47:22 +02:00
Henrik Rydgård
8c2e318416 OpenGL dataformat cleanup - pass Draw::DataFormat to the GLRenderManager.
Avoids triple GLenum all over the place, and also clearly shows that the
mapping is wrong.
2019-10-24 22:41:41 +02:00
Henrik Rydgård
9d65ff8873 Silence a few warnings. 2019-09-24 23:10:18 +02:00
Unknown W. Brackets
957c3d5b89 GLES: Disable range culling on VideoCore/Vivante.
Was only disabled before on Vivante GL3/GLES3 devices.
2019-02-10 11:36:23 -08:00
Henrik Rydgård
12f295c4a5 GLES: Detect Vivante GPU, disable vertex range culling
Should work-around #11703
2019-01-03 12:43:32 +01:00
Unknown W. Brackets
adeca2c3ba GLES: Move some vendor bug checks to Draw. 2018-12-23 20:27:22 -08:00
Unknown W. Brackets
9a3de5cb1c GPU: Move dual source blending bug check to Draw.
This also allows the ini setting to avoid it on Intel.
2018-12-23 14:11:57 -08:00
Henrik Rydgård
d047955686 This should finally repro one of the Adreno bugs 2018-12-20 11:00:15 +01:00
Henrik Rydgård
c2319cd6d1 thin3d: Make the stencil ref value dynamic state (all APIs support this directly). 2018-12-19 13:48:58 +01:00
Unknown W. Brackets
dcf71fc43f GLES: Skip freeing program if not allocated.
This could cause a crash when skipGLCalls is true, if null.
2018-10-30 19:14:02 -07:00
Unknown W. Brackets
5028486630 thin3d: Cleanup some unused/uninitialized warnings. 2018-06-24 07:34:07 -07:00
Unknown W. Brackets
03edd6129a GLES: Cut down on use of USING_GLES2. 2018-06-17 20:51:34 -07:00
Unknown W. Brackets
35ccd16746 GLES: Restore stencil/depth readback for debugger.
Only works on desktop GL.
2018-06-16 16:04:25 -07:00
Henrik Rydgård
c1d113e0e9 When creating temp framebuffers for download, size them using bufferWidth/Height instead of width/height.
Or maybe we should make sure to only download within the width/height by
adding more clamps at the beginning of ReadFramebufferToMemory but seems
more dangerous.

Plus some minor things.

Should help #11113
2018-06-01 21:16:07 +02:00
Henrik Rydgård
b06df3536e Auto unregister push buffer on deletion. 2018-04-05 17:53:03 +02:00
Henrik Rydgård
c7eb259c0c Auto register new push buffers on creation 2018-04-05 17:50:37 +02:00
Henrik Rydgård
feb3870f7d Also take control over Begin/End 2018-04-05 17:34:32 +02:00
Henrik Rydgård
8d6bbc54a9 Minor refactoring moving creation/deletion of GLPushBuffer to GLRenderManager 2018-04-05 17:31:12 +02:00
Henrik Rydgård
01d81ffa72 OpenGL: Fix texture wrapping of render targets. 2018-03-28 11:23:41 +02:00
Henrik Rydgård
f5dd9c17cd Add comment trying to clarify shutdown of GPU_GLES, restore the wipe, minor tweaks. Should help #10652
This reverts commit 10be0cad96.
2018-02-27 22:04:24 +01:00
Unknown W. Brackets
9a40a5971b GLES: Prevent crash on screenshot without buffers.
It still fails for some reason, but that's better than a segfault.
2018-02-10 16:55:53 -08:00
Henrik Rydgård
ce16547854 GL render manager: Fix bug when setting texture sampler if the wrong GL texture slot is active. Will likely help #10583 2018-02-07 19:49:58 +01:00
Henrik Rydgård
020eb9d86c Fix further memory leaks 2018-02-04 13:42:04 +01:00
Henrik Rydgård
99386da01e Minor cleanups 2018-02-04 13:42:04 +01:00
Henrik Rydgård
8438defb24 Fix some memory leaks 2018-02-04 13:39:10 +01:00
Henrik Rydgård
5351c9ddb3 gl-render-manager: Support scissored clears, as used by the GL backend. Fixes GT. 2018-01-31 17:07:20 +01:00
Unknown W. Brackets
0399088fc7 GLES: Handle glGetString() on GL thread.
We only use a few strings, so should be fine to cache them.
2018-01-27 15:10:17 +01:00
Unknown W. Brackets
acb692677b GLES: Accept a color mask for clears.
Otherwise, we end up clearing RGB when we try to only clear alpha, which
is fairly common.

Makes Valkyria Chronicles 3 action mode visible again.
2018-01-27 15:10:17 +01:00
Unknown W. Brackets
3eb6d38d75 Vulkan: Fix stencil-only clear for stencil upload.
Fixes stencil issues in Star Ocean.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
b7f4f6e157 GL render manager: Improve shader error reporting. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
465939e1c8 Minor fixes, indentation and comments 2018-01-27 15:10:17 +01:00
Henrik Rydgård
7d6f9aec4d iOS buildfix 2018-01-27 15:10:17 +01:00
Henrik Rydgård
af8e825578 Fix terrible drawing glitches when we do sync readbacks. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
49c3cb83fe GL render manager: Simple implementation of synchronous framebuffer readbacks. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
958078f603 GL render manager: Merge BindInputLayout into BindVertexBuffer. 2018-01-27 15:10:17 +01:00