dolphin/Source/Core/VideoCommon
Markus Wick 227db66e4f OGL: Use glBufferData on Mali.
tl;dr: This PR speedups dolphin on mobiles with the Mali GPU and ES 3.2
drivers by a factor of 10 by using the method with the biggest overhead.
Please keep care not to buy this shit!

The ARM driver team seems to care very well about their customers. But
bad luck, users and open source developers are *not* their customers. So
even device-independent feature requests are just ignored for *years*:

https://community.arm.com/graphics/f/discussions/4645/gl_ext_buffer_storage-support

The bad point, they neither implement any of the other common ways to
stream dynamic content in unextented GL:
- They just ignore the GL_MAP_UNSYNCHRONIZED_BIT flag
- They don't support on-device buffer updates and just stall with
glBufferSubData

It seems like no benchmark is using any dynamic content - and like no
customer cares about anything but benchmarks, or users...

We have a flag to disable the glBufferSubData way, this PR adds the flag
to also disable the unsychronized mapping way. The second one is
available since their ES 3.2 update, but slow as hell.

So how to continue? The last remaining technical way to stream dynamic
content at all is to alloc a new buffer per draw call with glBufferData.
This is very gross, but still a factor 10 speedup compared to stalling
the GPU. Small tests shows that you can expect another 3-5 times speedup
with EXT_buffer_data, so Mali would be on pair with Adreno here. So if
you have bought such a device unfortunately, please try to make noise on
your vendor forums/support and ask for this extension. If you are going
to buy a new mobile, I'd recormend to avoid *any* mobile with a Mali GPU
in it.
2018-02-25 17:12:36 +01:00
..
AbstractPipeline.h VideoBackends: Add AbstractShader and AbstractPipeline classes 2018-02-22 22:02:34 +10:00
AbstractShader.h VideoBackends: Add AbstractShader and AbstractPipeline classes 2018-02-22 22:02:34 +10:00
AbstractStagingTexture.cpp VideoBackends: Add AbstractStagingTexture class 2017-11-22 18:47:04 +10:00
AbstractStagingTexture.h VideoBackends: Add AbstractStagingTexture class 2017-11-22 18:47:04 +10:00
AbstractTexture.cpp AbstractTexture: Fix crash in Vulkan backend when freeing texture 2018-01-26 19:12:11 +10:00
AbstractTexture.h AbstractTexture: Fix crash in Vulkan backend when freeing texture 2018-01-26 19:12:11 +10:00
AsyncRequests.cpp VideoCommon: Eliminate static state in Renderer 2017-03-04 16:39:50 +10:00
AsyncRequests.h specify custom brace style to fix unions 2017-01-05 12:55:13 +01:00
AsyncShaderCompiler.cpp VideoBackends: Support a different number of threads for precompiling 2017-07-30 17:43:59 +10:00
AsyncShaderCompiler.h AsyncShaderCompiler: use std::make_unique in CreateWorkItem() 2017-09-02 14:08:00 -04:00
AVIDump.cpp AVIDump: Remove incorrect usage of s_ prefix 2018-01-17 22:19:14 +01:00
AVIDump.h MSVC: define HAVE_FFMPEG 2017-05-26 00:53:58 -07:00
BoundingBox.cpp
BoundingBox.h
BPFunctions.cpp BPFunctions: Move upscaling of scissor rect to VideoCommon 2018-02-20 00:49:32 +10:00
BPFunctions.h BPFunctions: Move GX viewport conversion to VideoCommon 2018-02-20 00:49:32 +10:00
BPMemory.cpp BPMemory: Handle fog configuration where both A and C are infinity/NaN 2018-02-01 17:40:39 +10:00
BPMemory.h BPMemory: Handle fog configuration where both A and C are infinity/NaN 2018-02-01 17:40:39 +10:00
BPStructs.cpp BPFunctions: Move GX viewport conversion to VideoCommon 2018-02-20 00:49:32 +10:00
BPStructs.h
CMakeLists.txt VideoBackends: Use VideoCommon shader generators for efb2tex copies. 2017-12-02 15:17:39 +01:00
CommandProcessor.cpp Call Do for every member of SCPFifoStruct individually 2017-11-13 19:51:16 +01:00
CommandProcessor.h Call Do for every member of SCPFifoStruct individually 2017-11-13 19:51:16 +01:00
ConstantManager.h PixelShaderGen: Implement table-based fog range as in software renderer 2018-02-15 22:19:21 +10:00
CPMemory.cpp
CPMemory.h specify custom brace style to fix unions 2017-01-05 12:55:13 +01:00
DataReader.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
Debugger.cpp
Debugger.h
DriverDetails.cpp OGL: Use glBufferData on Mali. 2018-02-25 17:12:36 +01:00
DriverDetails.h OGL: Use glBufferData on Mali. 2018-02-25 17:12:36 +01:00
Fifo.cpp VideoBackend: Remove PeekMessages method 2018-01-27 13:53:55 +10:00
Fifo.h Fifo: const correctness 2017-03-26 23:08:33 -04:00
FPSCounter.cpp Don't use wrong encoding for paths when opening streams on Windows 2017-12-05 21:23:35 +01:00
FPSCounter.h VideoCommon: Improve precision of FPS counter 2017-07-30 12:38:48 +10:00
FramebufferManagerBase.cpp VideoBackends: Remove header inclusions made unnecessary with Hybrid XFB 2017-11-19 00:53:10 -05:00
FramebufferManagerBase.h VideoBackends: Remove header inclusions made unnecessary with Hybrid XFB 2017-11-19 00:53:10 -05:00
GeometryShaderGen.cpp VideoConfig: Make StereoMode an enum class 2017-11-18 23:19:53 -05:00
GeometryShaderGen.h VideoBackends: Move SamplerState to common 2017-09-11 20:01:54 +10:00
GeometryShaderManager.cpp VideoConfig: Make StereoMode an enum class 2017-11-18 23:19:53 -05:00
GeometryShaderManager.h
HiresTextures_DDSLoader.cpp HiresTextures: Support loading BC7 (BPTC) from DDS files 2017-08-01 11:59:38 +10:00
HiresTextures.cpp CustomTexture: Drop old texture format. 2018-01-20 17:08:47 +01:00
HiresTextures.h Treat custom textures with "_arb" suffix as having arbitrary mipmaps 2018-01-10 17:51:45 +01:00
ImageWrite.cpp Add a namespace to OpenFStream 2017-06-15 21:34:04 +02:00
ImageWrite.h ImageWriter: Don't use inplace alpha truncation. 2016-10-08 12:02:49 +02:00
IndexGenerator.cpp fix various instances of -1 being assigned to unsigned types 2017-06-07 19:52:07 -07:00
IndexGenerator.h
LightingShaderGen.cpp LightingShaderGen: Always calculate lighting for both color channels 2017-11-22 01:52:18 +10:00
LightingShaderGen.h LightingShaderGen: Always calculate lighting for both color channels 2017-11-22 01:52:18 +10:00
LookUpTables.h
MainBase.cpp VideoBackends: Combine Initialize/Prepare and Cleanup/Shutdown methods 2018-01-27 13:53:55 +10:00
NativeVertexFormat.h Remove NonCopyable 2017-08-22 16:40:34 +02:00
OnScreenDisplay.cpp Revert "Merge pull request #4286 from shuffle2/Aestek-clean-osd" 2016-10-15 12:44:37 +02:00
OnScreenDisplay.h Revert "Merge pull request #4286 from shuffle2/Aestek-clean-osd" 2016-10-15 12:44:37 +02:00
OpcodeDecoding.cpp CommandProcessor: Limit scope of ugly SCPFifoStruct. 2017-01-27 19:04:56 +01:00
OpcodeDecoding.h OpcodeDecoding: Convert #defines into enum constants 2017-02-08 00:05:17 -05:00
PerfQueryBase.cpp
PerfQueryBase.h
PixelEngine.cpp CommandProcessor: Remove unnecessary include 2017-09-02 13:34:21 -04:00
PixelEngine.h PixelEngine: Move enum constants into the PixelEngine namespace 2017-02-28 07:01:50 -05:00
PixelShaderGen.cpp PixelShaderGen: Implement table-based fog range as in software renderer 2018-02-15 22:19:21 +10:00
PixelShaderGen.h Implement dual-source blending in shader 2018-01-05 09:56:46 -08:00
PixelShaderManager.cpp PixelShaderGen: Implement table-based fog range as in software renderer 2018-02-15 22:19:21 +10:00
PixelShaderManager.h Ubershaders: Fix 6-bit color truncation not being applied 2017-08-01 00:01:09 +10:00
PostProcessing.cpp VideoConfig: Make StereoMode an enum class 2017-11-18 23:19:53 -05:00
PostProcessing.h VideoConfigDiag: Move post-processing shader list to post processor 2017-04-25 14:27:05 +10:00
RenderBase.cpp Renderer: Handle resize events on-demand instead of polling 2018-02-20 01:15:55 +10:00
RenderBase.h VideoBackends: Add AbstractShader and AbstractPipeline classes 2018-02-22 22:02:34 +10:00
RenderState.cpp Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient. 2017-10-27 00:45:20 -07:00
RenderState.h Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient. 2017-10-27 00:45:20 -07:00
SamplerCommon.h
sfont.inc
ShaderGenCommon.cpp Implement dual-source blending in shader 2018-01-05 09:56:46 -08:00
ShaderGenCommon.h PixelShaderGen: Implement table-based fog range as in software renderer 2018-02-15 22:19:21 +10:00
Statistics.cpp VertexLoaderManager: Return debug strings by value 2017-03-26 23:50:09 -04:00
Statistics.h
TextureCacheBase.cpp TextureCache: Add an option to disable EFB copies to VRAM 2018-02-11 15:48:46 +10:00
TextureCacheBase.h VideoCommon: Apply the yscale as upscaling of the XFB. 2018-01-06 10:36:33 +01:00
TextureConfig.cpp VideoBackends: Add AbstractStagingTexture class 2017-11-22 18:47:04 +10:00
TextureConfig.h VideoBackends: Add AbstractStagingTexture class 2017-11-22 18:47:04 +10:00
TextureConversionShader.cpp Some more implicit uint/float conversions in the texture decode shaders 2018-01-11 11:15:40 -08:00
TextureConversionShader.h VideoCommon: Rename TextureConversionShader namespace. 2017-12-02 15:17:39 +01:00
TextureConverterShaderGen.cpp Reimplement EFB copy for intensity formats 2017-12-19 12:04:56 +01:00
TextureConverterShaderGen.h VideoCommon: Create a namespace for TextureConversionShaderGen. 2017-12-02 15:17:39 +01:00
TextureDecoder_Common.cpp HybridXFB: Fix lint errors 2017-11-17 22:11:31 -06:00
TextureDecoder_Generic.cpp Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
TextureDecoder_Util.h TextureDecoder: Deduplicate some utility code 2017-01-15 20:23:26 +11:00
TextureDecoder_x64.cpp Hybrid XFB: Fix lint errors 2017-11-17 22:11:34 -06:00
TextureDecoder.h Add support for hybrid XFB 2017-11-17 19:47:56 -06:00
UberShaderCommon.cpp Fix an invalid (uint < int) comparison in GLES with ubershaders 2017-12-10 10:52:32 -08:00
UberShaderCommon.h Ubershaders: Support per-pixel lighting 2017-07-30 17:43:59 +10:00
UberShaderPixel.cpp PixelShaderGen: Implement table-based fog range as in software renderer 2018-02-15 22:19:21 +10:00
UberShaderPixel.h VideoBackends: Clear uid bits that are unused for the current backend 2017-09-05 23:49:42 +10:00
UberShaderVertex.cpp LightingShaderGen: Always calculate lighting for both color channels 2017-11-22 01:52:18 +10:00
UberShaderVertex.h ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
VertexLoader_Color.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_Color.h
VertexLoader_Normal.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_Normal.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_Position.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_Position.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_TextCoord.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_TextCoord.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader.cpp
VertexLoader.h
VertexLoaderARM64.cpp
VertexLoaderARM64.h
VertexLoaderBase.cpp VertexLoaderBase: Return debug strings by value 2017-03-26 23:49:59 -04:00
VertexLoaderBase.h fix various instances of -1 being assigned to unsigned types 2017-06-07 19:52:07 -07:00
VertexLoaderManager.cpp Vulkan: Uber shader support 2017-07-30 17:43:59 +10:00
VertexLoaderManager.h Vulkan: Uber shader support 2017-07-30 17:43:59 +10:00
VertexLoaderUtils.h
VertexLoaderX64.cpp Remove code for only allocating low memory 2017-05-20 09:35:53 +02:00
VertexLoaderX64.h
VertexManagerBase.cpp VideoCommon: Apply custom texture scale for arbitrary mipmaps. 2018-01-17 09:02:36 +01:00
VertexManagerBase.h Renderer: Move cull mode to a rasterization state object 2017-09-11 20:01:45 +10:00
VertexShaderGen.cpp LightingShaderGen: Always calculate lighting for both color channels 2017-11-22 01:52:18 +10:00
VertexShaderGen.h ShaderGen: Pass host config to shader generation functions 2017-07-20 17:54:33 +10:00
VertexShaderManager.cpp BPFunctions: Move GX viewport conversion to VideoCommon 2018-02-20 00:49:32 +10:00
VertexShaderManager.h ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
VideoBackendBase.cpp Remove D3D12 2017-05-18 17:01:12 -07:00
VideoBackendBase.h VideoBackend: Remove PeekMessages method 2018-01-27 13:53:55 +10:00
VideoCommon.h MAX_XFB_HEIGHT: PAL value off by two fixed 2017-12-30 20:22:10 +01:00
VideoCommon.vcxproj VideoBackends: Add AbstractShader and AbstractPipeline classes 2018-02-22 22:02:34 +10:00
VideoCommon.vcxproj.filters VideoBackends: Add AbstractShader and AbstractPipeline classes 2018-02-22 22:02:34 +10:00
VideoConfig.cpp TextureCache: Add an option to disable EFB copies to VRAM 2018-02-11 15:48:46 +10:00
VideoConfig.h TextureCache: Add an option to disable EFB copies to VRAM 2018-02-11 15:48:46 +10:00
VideoState.cpp
VideoState.h
XFMemory.cpp
XFMemory.h VideoCommon: Use constant for number of color channels in XFMemory 2017-11-20 23:18:44 +10:00
XFStructs.cpp ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
XFStructs.h