Commit Graph

79 Commits

Author SHA1 Message Date
Unknown W. Brackets 0474ff5c23 GLES: Use aligned memory for textures.
We use SSE on them, and they used to be aligned, and must be aligned in
PSP RAM, so keep them aligned.

This only really affects 32-bit, since allocs will typically be aligned on
64-bit anyway.

Fixes #10601.
2018-02-11 08:13:57 -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
Unknown W. Brackets acc3e39b67 GLES: Reintroduce out of memory checks. 2018-01-27 15:10:17 +01:00
Unknown W. Brackets 900e53b6dc GLES: Re-enable texture scaling. 2018-01-27 15:10:17 +01:00
Henrik Rydgård ccdb4d186d gl-render-manager: Fix HW tesselation. Remove 1D texture support, likely no benefit. 2018-01-27 15:10:17 +01:00
Unknown W. Brackets db0989a9d0 Debugger: Fix texture preview in GLES.
Also, fix issues with the first view of a texture in Vulkan / D3D11.
2018-01-27 15:10:17 +01:00
Henrik Rydgård 5c7c7ce192 Move GL sampler state tracking into GLRenderManager/QueueRunner. 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
Henrik Rydgård f99fa02ba7 Run the depal stuff, seems a bit broken. Add some state filtering. 2018-01-27 15:10:17 +01:00
Henrik Rydgård 7c17cb6754 Fix showing savestate screenshots (needed mips) 2018-01-27 15:10:17 +01:00
Henrik Rydgård 1241abc887 Make sure we set GL_TEXTURE_MAX_LEVEL somewhere. 2018-01-27 15:10:17 +01:00
Henrik Rydgård 9094410fd1 gl-render-manager: Need to actually bind newly created textures. 2018-01-27 15:10:17 +01:00
Henrik Rydgård 062608ad78 Start moving the framebuffer stuff over to the render manager 2018-01-27 15:10:17 +01:00
Henrik Rydgård 51f467a7b3 Kill off the GL state cache 2018-01-27 15:10:17 +01:00
Henrik Rydgård f3282dcfda Delete the gl name cache (might resurrect it on the GLQueueRunner side if needed later). Other cleanup and fixes. 2018-01-27 15:10:17 +01:00
Henrik Rydgård 46e1fbb788 Initial texture work. Bugfix indexed drawing 2018-01-27 15:10:17 +01:00
Henrik Rydgård bd6818198a More GLRenderManager 2018-01-27 15:10:17 +01:00
Henrik Rydgård 9340260802 Finish the shader manager (almost) 2018-01-27 15:10:17 +01:00
Henrik Rydgård b5e5d72a0a Complete the separation of depth and stencil renderpass flags 2017-12-30 22:52:22 +01:00
Henrik Rydgård dc6a4ea753 Fix annoying name clashes (Status is in X11 headers..) 2017-12-15 16:34:29 +01:00
Henrik Rydgård 299cb007c2 Add a comment, revert a reporting change. 2017-12-10 02:05:25 +01:00
Henrik Rydgård 7d0fc9ce65 Rework GL lost-device to work more like Vulkan. Gets rid of gl_lost manager etc. 2017-12-07 15:05:59 +01:00
Henrik Rydgård 313223364c Buildfix, update comments slightly 2017-11-15 14:21:17 +01:00
Henrik Rydgård f564c59248 Mipmaps: Disable LOD bias in slope mode as that's not how it works.
Works around #9772
2017-11-15 14:21:17 +01:00
Unknown W. Brackets e3b3828b15 TexCache: Check alpha before scaling.
This will be faster when scaling.  We no longer need to wait, since we
only care about full alpha now.
2017-11-12 16:19:28 -08:00
Unknown W. Brackets 9fbcc01afa TexCache: Remove simple 0/1 alpha check.
No practical optimizations have come of this, so it's a waste of time.
Slows down Vulkan too.
2017-11-12 16:17:46 -08:00
Henrik Rydgård 4a30aedc53 Unify and move around code to cleanup some debug accessors 2017-10-18 13:10:05 +02:00
Unknown W. Brackets f66ffb9ffe GPU: Fix negative mip levels with const workaround.
Might've crashed if it hit a negative level before.
2017-05-31 21:42:07 -07:00
Unknown W. Brackets b6375638f5 GPU: Block mipmap autogen for matching size.
If the mips don't get smaller, we can't autogen - the bias in that case is
used to select a different texture.  Fixes #9731.

This also may improve a minor performance issue on PowerVR in some games.
2017-05-31 21:23:20 -07:00
Henrik Rydgård 6bcfe539f7 Use vulkan-style clear-on-bind when switching render targets. Not optimally used yet.
Also removes a bunch of redundant render target binds.
2017-05-30 09:36:17 +02:00
Henrik Rydgård 1b05a54800 Remove the Mipmap setting. One step forward for #8171 2017-05-26 10:21:20 +02:00
Unknown W. Brackets c4d1863ded GPU: Consistently bias const mip levels.
Since SLOPE is just a more complicated CONST, we can treat them the same.
2017-05-12 20:30:47 -07:00
Unknown W. Brackets 33ade5f916 GLES: Avoid MIN/MAX LOD without LOD control flag. 2017-04-23 10:51:25 -07:00
Unknown W. Brackets f3db8bccad GLES: Support AUTO and CONST mip bias. 2017-04-22 18:40:18 -07:00
Henrik Rydgard 22d5acb40e Depal: Use the full CLUT mode setting as the depal shader key. Fixes #9550 for both D3D11 and D3D9. 2017-04-04 11:09:29 +02:00
Henrik Rydgård 5a8e9c4f71 Port some accessors over from #9255 to be able to catch these changes and dirty state later. 2017-04-03 17:04:58 +02:00
Henrik Rydgard 97058b4db7 Apply the D3D11 loco roco fix identically to the other backends
To make centralization easier, and this should be a problem for the
other backends as well.
2017-04-01 21:17:58 +02:00
Unknown W. Brackets 67fb745278 Merge pull request #9505 from hrydgard/remove-gl-bgra-path
Remove BGRA path from GLES.
2017-03-26 10:43:45 -04:00
Henrik Rydgard 10f144ef2e Remove BGRA path from GLES. Less code to test and support and it does no longer appear to have any benefit. See new comments in #5874 2017-03-26 11:39:25 +02:00
Unknown W. Brackets 7fb7a4877d Texcache: Cleanup last bound tex invalidation.
When we're deleting, we're always about to bind a new tex.
2017-03-25 11:42:24 -07:00
Henrik Rydgard b0bd7e3c6f Minor changes for compatibility with VS2017 2017-03-12 17:33:00 +01:00
Henrik Rydgard 5d4700ae7e Sprinkle calls to CHECK_GL_ERROR_IF_DEBUG all over the place, disabled by default. 2017-03-03 14:18:40 +01:00
Henrik Rydgard f95459ab0d Fix bug where we tried to set aniso even if unsupported. Fixes #9377 2017-03-03 14:16:15 +01:00
Henrik Rydgard 98763655e7 Plug a memory leak in the GLES texture cache. Fixes #9089 2017-02-23 22:41:13 +01:00
Henrik Rydgard 8eb668ea59 D3D11: Enable pixel depth rounding. GL: Fix a crash bug 2017-02-23 20:40:53 +01:00
Henrik Rydgard f24b1495ba Assorted texture format cleanup, prep for supporting D3D11 on Win7 2017-02-22 16:23:04 +01:00
Henrik Rydgard f772066c54 Remove some unnecessary error handling paths 2017-02-21 11:29:51 +01:00
Henrik Rydgard 78abf7453c Add some comments and a sanity check, fix a minor leak 2017-02-21 10:58:21 +01:00
Henrik Rydgard 4652c6af28 Some member variable renaming to match the convention 2017-02-20 00:19:58 +01:00
Henrik Rydgard f753573332 Unify HandleTextureChange 2017-02-20 00:13:21 +01:00