Commit Graph

5353 Commits

Author SHA1 Message Date
Unknown W. Brackets
7c8780bfb6 GPU: Remove some unused code. 2018-06-06 05:56:29 -07:00
Unknown W. Brackets
2606365ba4 GPU: Use software transform for flat shading.
Except on GLES where it works fine with the default provoking index.

This fixes #10969 so that it works everywhere.
2018-06-06 05:53:50 -07:00
Unknown W. Brackets
dca159c47e GPU: Correct sw flat shading color on Vulkan/D3D.
It was only correct on GLES before.  This only fixes software transform.
2018-06-06 05:53:50 -07:00
Unknown W. Brackets
5b62c8afb8 D3D9: Implement flat shading via state. 2018-06-06 05:53:50 -07:00
Unknown W. Brackets
b845278d7d D3D11: Implement flat shading in shader. 2018-06-06 05:53:49 -07:00
Unknown W. Brackets
61fc1cdcfb GPU: Dirty tex when clearing or rendering to self.
This way if we're blitting, we'll re-blit.
2018-06-06 05:52:49 -07:00
Henrik Rydgård
b037efdb55 If there are multiple Vulkan devices, show a setting to allow the user to choose. 2018-06-06 10:20:12 +02:00
zhang wei
f2e3476741 triangles 2018-06-05 10:39:40 +08:00
zhang wei
3380bbb0c6 save cache before clear 2018-06-04 22:00:29 +08:00
weihuoya
9f6922221d fx 2018-06-03 22:50:35 +08:00
weihuoya
d029bbacc7 triangle fan 2018-06-03 22:29:50 +08:00
Unknown W. Brackets
e6af167cd9
Merge pull request #11119 from hrydgard/vk-nulltexture
Never bind a NULL image view in Vulkan, not even through thin3d
2018-06-01 23:53:18 -04: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
9485b04914 Never bind a NULL image view in Vulkan no matter what. 2018-06-01 18:51:37 +02:00
Henrik Rydgård
30de8194a5
Merge pull request #11111 from weihuoya/gles-int-highp
depal shader use high int precision for opengl es
2018-06-01 08:41:25 +02:00
weihuoya
e01e77e025 fx depal int precision for opengl es 2018-06-01 00:58:44 +08:00
Henrik Rydgård
c964bc4ba2 Fix another of these pesky GL task switching bugs. 2018-05-30 19:29:26 +02:00
Henrik Rydgård
1c17373039 GLES: Properly restore the pointer to the render manager in more places 2018-05-29 23:07:22 +02:00
Henrik Rydgård
79f8388e65
Merge pull request #11088 from unknownbrackets/vulkan-state
Vulkan: Update shaders/state when dirty properly
2018-05-28 08:34:11 +02:00
Unknown W. Brackets
e7d07aff71 Vulkan: Update shaders/state when dirty properly.
Can't have been right before.
2018-05-27 22:28:09 -07:00
Henrik Rydgård
0d6be3a476 GLES: Refresh the draw context in DrawEngineGLES on DeviceRestore. How did we miss this? 2018-05-27 22:25:15 +02:00
Henrik Rydgård
b730d187e8 Add some paranoid checks guided by stack traces from Google Play 2018-05-27 22:12:59 +02:00
Henrik Rydgård
ab65c5210c GLES shader depal fix. Again, this is disabled by default so should not affect anything. 2018-05-14 21:20:51 +02:00
Henrik Rydgård
061f92c177 Minor code simplification 2018-05-14 21:19:48 +02:00
Henrik Rydgård
4ba9fe3e0e GLES depal (currently disabled): Use high int precision.
Should fix issue mentioned in fb7a63bd11
2018-05-13 20:51:20 +02:00
Henrik Rydgård
011e57c0e7 Always specify GLSL version 450 when compiling Vulkan shaders.
Bit of a risky change so late in the game but it's wrong, it needs fixing.
See for example the comments to fb7a63bd11
2018-05-13 20:42:17 +02:00
Henrik Rydgård
b64841e8cc Minor optimization 2018-05-07 00:05:35 +02:00
Henrik Rydgård
ed52d9f9fb Shader depal (VUlkan): Apply a half-texel offset when bilinear filtering, fixing #11008
Also skip three texture samples if all indices are equal.
2018-05-06 22:30:20 +02:00
Unknown W. Brackets
abbab23814 D3D11: Use a dedicated slot for the depal texture.
Otherwise it affects shader blending.
2018-05-06 08:58:54 -07:00
Unknown W. Brackets
8d07e6d985 GPU: Prevent temp FBOs from overwriting each other.
Sometimes we'd use two temp FBOs in the same draw (e.g. shader blending +
depal.)  This could cause the same temp FBO to get used for two purposes,
causing weird behavior.
2018-05-06 08:57:44 -07:00
Henrik Rydgård
77e574ccc6 Buildfix. 2018-05-04 22:57:13 +02:00
Henrik Rydgård
698bd75209 Fix regression caused by the new depal code for Vulkan. Fixes #10993 2018-05-04 22:24:11 +02:00
aliaspider
17259b87ea softgpu: remove RIP addressing from SamplerX86 2018-05-04 17:37:46 +01:00
zhang wei
51388ded22 cullmode fallback 2018-04-28 14:59:12 +08:00
zhang wei
3419197ee9 flush back cull mode 2018-04-27 21:49:43 +08:00
zhang wei
cfc353ee81 handle cull mode by indices, improve performance for GVGNP, refer to #10172 2018-04-27 16:33:35 +08:00
Unknown W. Brackets
3eb0450998 Depal: Reapply texture when bounds change.
Since we need each slice of the texture when we use bounds to reduce the
size.  Fixes #10951.
2018-04-22 10:43:46 -07:00
Unknown W. Brackets
3f3dd6b3bb Vulkan: Fix shutdown crash when device lost called.
Fixes #10917.
2018-04-14 13:14:20 -07:00
Henrik Rydgård
03c2292ae9
Merge pull request #10915 from unknownbrackets/warnings
Warning fixes
2018-04-14 20:30:26 +02:00
Unknown W. Brackets
cddc7b5dc5 Vulkan: Fix cache file error handling warnings. 2018-04-14 10:59:41 -07:00
Henrik Rydgård
f17890623c Shader depal: fix bilinear filter coord 2018-04-13 20:57:36 +02:00
Henrik Rydgård
fb7a63bd11 Implement shader depal for GL as well, but disabled by default. 2018-04-13 20:00:14 +02:00
Henrik Rydgård
0ac6cea34d Add a queue processing hack for Sonic Rivals too. Now it's fast. 2018-04-13 18:05:04 +02:00
Henrik Rydgård
413a204138 Vulkan: Semi-gross hack that massively improves the perf of MGS2:Acid. 2018-04-13 17:32:56 +02:00
Henrik Rydgård
81276c8862 Fix various bugs. 2018-04-13 14:19:05 +02:00
Henrik Rydgård
69bd427ca2 Shader depal: Implement bilinear filtering. 2018-04-13 14:19:05 +02:00
Henrik Rydgård
29c41c6a35 Implement shader depal for Vulkan. See #10908. Bilinear filter not yet implemented. 2018-04-13 14:19:01 +02:00
Henrik Rydgård
117dad8a48 Just add some constants for the GL texture slots. 2018-04-13 09:11:08 +02:00
Henrik Rydgård
163350bbcd Vulkan/D3D11: Make some space in the base uniform buffer by consolidating the spline parameters into one variable. 2018-04-13 08:58:05 +02:00
Henrik Rydgård
a3ed87bca5 Some comment fixes and cleanup.
Not much point warning for those MIPS instructions - if games use them,
they use them carefully because games can't catch that exception anyway.
2018-04-12 12:00:19 +02:00
Henrik Rydgård
31ae11ecc8 Don't forget to dirty some state after depal. May help #10906 ? 2018-04-12 11:59:18 +02:00
Henrik Rydgård
23052b5a6b Buildfix. 2018-04-10 16:28:06 +02:00
Henrik Rydgård
02ea4b5efa Inner interpreter safety check - in hw skinning mode, we need to flush if any part of the vertex format changes. 2018-04-10 14:37:32 +02:00
Henrik Rydgård
dbe52c8135 Remove some obsolete checks - software skinning is now supported even if morphcount isn't 1. 2018-04-10 13:09:01 +02:00
Henrik Rydgård
00f3bf6102 Revert "Start removing support for hardware skinning."
This reverts commit dcb773d624.
2018-04-10 12:31:21 +02:00
Henrik Rydgård
ccd594dae7 Revert "VertexLoader: Remove now-unused weights translation code"
This reverts commit 44100c6c1d.
2018-04-10 12:30:49 +02:00
Henrik Rydgård
0345e1a7d4 Revert "Oops, fix hardware tess in Vulkan (after removing hw skinning, we need to adjust the binding number)"
This reverts commit 87575910df.
2018-04-10 12:28:30 +02:00
Henrik Rydgård
36fd2711d6 Revert "Remove further remains of hardware skinning."
This reverts commit 40db61a680.
2018-04-10 12:22:41 +02:00
Henrik Rydgård
7de3edb46c Revert "Remove gstate_c.deferredVertTypeDirty"
This reverts commit fcdb816235.
2018-04-10 12:22:41 +02:00
Henrik Rydgård
8953d7ff73 Revert "Comment fixes, reindentation."
This reverts commit 6fa9fcefb2.
2018-04-10 12:14:23 +02:00
Henrik Rydgård
1c99ebcbcc Fix DecFmt bug 2018-04-10 12:12:47 +02:00
Henrik Rydgård
6a90b8fbb4 Revert "Further cleanup after the removal of hardware skinning."
This reverts commit f086a0915f.

Increment the shader cache version. Restore some more.
2018-04-10 11:38:02 +02:00
Henrik Rydgård
69309aa400 Revert "Remove some remains of software skinning"
This reverts commit 2d33d526b8.
2018-04-10 11:21:56 +02:00
Henrik Rydgård
e784d1a29c Vulkan: Ease off on the allocator "slab pressure" if texture scaling is enabled.` 2018-04-07 10:40:49 +02:00
Unknown W. Brackets
d07a124a90 Vulkan: Increase base slab allocation size. 2018-04-06 21:43:18 -07:00
Unknown W. Brackets
99d16b2202 Vulkan: Add tags to UI textures too. 2018-04-06 21:43:18 -07:00
Unknown W. Brackets
5f27a2e60a Vulkan: Track tags on emu textures. 2018-04-06 21:43:18 -07:00
Unknown W. Brackets
fd183715ec Vulkan: Decimate when there are many slabs.
This helps avoid one little texture holding onto a whole slab.

Won't change behavior when they are full, since then the cacheSizeEstimate
should be fairly high.
2018-04-06 21:42:32 -07:00
Henrik Rydgård
ca0fb77080 Assorted cleanups. Don't assert on no clear mask. 2018-04-06 23:29:44 +02:00
Henrik Rydgård
86966684d4 Vulkan: Remove the wrapper struct around VulkanTexture 2018-04-05 23:23:14 +02:00
Henrik Rydgård
2cd8bd9bc3 Fixes to in-game GPU shutdown/switching. Fixes #10860 2018-04-05 20:26:29 +02:00
Henrik Rydgård
398d375568 Fix issue in TextureCacheGLES::DeviceRestore 2018-04-05 20:17:30 +02:00
Henrik Rydgård
b06df3536e Auto unregister push buffer on deletion. 2018-04-05 17:53:03 +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
1d6263d5eb More GL shutdown fixes. Partially fixes #10868 2018-04-05 12:28:59 +02:00
Henrik Rydgård
d3164d77d4
Merge pull request #10845 from LunaMoo/SSAAflag
Add SSAA flag for post process shaders
2018-04-04 15:40:26 +02:00
Unknown W. Brackets
d70568abd2 GPU: Fix s8 norm with skin and morph.
Fixes #10851.
2018-04-02 19:18:16 -07:00
LunaMoo
ffac542f95 Change to int to allow higher supersampling scale. 2018-04-02 13:44:28 +02:00
Unknown W. Brackets
c6ef547176 GLES: Show post-shader compile errors to user. 2018-04-01 19:47:19 -07:00
Unknown W. Brackets
98d4131003 Vulkan: Show post-shader compile errors to user. 2018-04-01 19:47:19 -07:00
Unknown W. Brackets
db756b6aeb GLES: Show post-shader translate errors to user.
Usually these should be syntax errors, so better to let them know it
happened.
2018-04-01 19:47:02 -07:00
LunaMoo
199106cad6 Add SSAA flag for post process shaders,
enforces 2x auto resolution, to be used with blurry effects
Also includes a perf. friendly example using simplified gauss filter
2018-04-01 17:00:10 +02:00
Henrik Rydgård
170b600835 Oops, fix mistake in #10834 2018-03-29 16:21:58 +02:00
Henrik Rydgård
1b39b4b16c
Merge pull request #10833 from hrydgard/texcache-fb-fix
When binding a framebuffer to a texcache entry, delete its texture. Should help #10823
2018-03-29 16:01:22 +02:00
Henrik Rydgård
d160292f54 Include renderpass definition in Vulkan shader cache entries, should make it more effective again. 2018-03-29 14:36:04 +02:00
Henrik Rydgård
c41273d333 When binding a framebuffer to a texcache entry, delete its texture. Should help #10823 2018-03-29 13:29:09 +02:00
Henrik Rydgård
01d81ffa72 OpenGL: Fix texture wrapping of render targets. 2018-03-28 11:23:41 +02:00
Unknown W. Brackets
68930a4291
Merge pull request #10788 from hrydgard/remove-texture-update
Remove the remains of updating texture contents instead of recreating.
2018-03-25 12:07:08 -04:00
Henrik Rydgård
f9555da05b When listing post-shaders, use the "name" specified in the ini as default, when looking up translations. 2018-03-25 11:53:11 +02:00
Henrik Rydgård
f967e206b8 Remove the last remains of the idea that textures can be efficiently updated instead of recreated. Accidentally fixes #10697 somehow.
Also this is good for terminology, no more confusion with the texture
replacement facility :)
2018-03-25 10:50:37 +02:00
Henrik Rydgård
0843e2cb98 Fix updating light constants when light type changes (we handle dir/pos lights differently). Fixes #10132 2018-03-25 00:21:03 +01:00
Unknown W. Brackets
1b8297de31 GPU: Count clears during frameskip.
This allows the GoW hack to still work during frameskip.
Fixes #10668.
2018-03-24 10:58:24 -07:00
aliaspider
0af6d573bb remove all usage of __LIBRETRO__ 2018-03-24 12:45:20 +01:00
aliaspider
198c946218 remove unnecessary NULL assignment. 2018-03-23 04:14:10 +01:00
aliaspider
23dae72bce prevent reads of uninitialized memory. 2018-03-22 22:25:04 +01:00
aliaspider
15c4406df7 add missing inclues. 2018-03-22 22:14:19 +01:00
aliaspider
fc9a5ff65c prevent use-after-free. 2018-03-22 22:10:05 +01:00
Henrik Rydgård
24b9fb6ea9 Buildfix 2018-03-19 18:14:57 +01:00
Henrik Rydgård
f1359af0b0 Vulkan: Improve handling of shader compile failures (don't crash) 2018-03-19 17:46:58 +01:00