Commit Graph

390 Commits

Author SHA1 Message Date
Tony Wasserka b8817267f4 Merge pull request #366 from Jezze/vertex
OGL/VertexManager: Remove unused variable.
2014-05-16 16:18:14 +02:00
Tony Wasserka 25e8dc0aed Merge pull request #354 from magumagu/gx-primitive-mask
Opcode decoding: 0xC0 isn't a valid command.
2014-05-16 15:59:59 +02:00
Jens Nyberg f742c5a057 OGL/VertexManager: Remove unnused m_CurrentVertexFmt 2014-05-13 23:59:08 +02:00
magumagu 9e4eeb3b9b Video backends: fix rounding in lighting computation.
For whatever reason, the hardware doesn't do a full divide by 255, but
instead uses an approximation with shifting, similar to the way it is done
in TEV.
2014-05-11 12:53:02 -07:00
Shawn Hoffman 17577affba D3D: Don't pass D3D10_SHADER_WARNINGS_ARE_ERRORS to the compiler in debug builds.
For quite a while this has been causing integer division to generate a warning as error, blocking shader compiling. This means probably no one has even been running D3D in debug builds...
I tried disabling the warning with a #pragma, but it doesn't seem to apply when this flag is used.
2014-05-10 22:12:54 -07:00
magumagu 39d439fc48 Opcode decoding: handle missing opcodes 0x88 etc.
Hardware testing shows that they do the same thing as the 0x80 family of
opcodes: they draw quads.
2014-05-10 20:33:28 -07:00
magumagu 369c0c4ce2 Opcode decoding: 0xC0 isn't a valid command.
Fix our opcode decoders to handle this appropriately.
2014-05-08 15:49:19 -07:00
Tony Wasserka b4e1ac5f08 Merge pull request #185 from degasus/shader-cleanup
Shader cleanup
2014-05-06 11:37:11 +02:00
magumagu bca0b7b543 OpenGL: delete unused function parameter in TextureConverter.
(While I'm here, also mark some functions static.)
2014-05-05 10:56:36 -07:00
degasus 25b8edd2a6 ogl: fix signed vs unsigned comparison warning 2014-05-05 17:06:36 +02:00
Ryan Houdek 2d8cfb89d7 Changes posmtx vertex attribute to integer.
This makes it so we don't need to do some dumb casting from float to integer in our shaders.
Only tested in OpenGL, needs to be tested in D3D.
2014-04-30 19:11:06 -05:00
Ryan Houdek 99338daa8f Fixes glVertexAttribIPointer on GLES.
We need to pull in function pointers for OpenGL 3.0 in order to use glAttribIPointer.
This isn't too big of an issue, and this code will be gone in the future when we change over to libepoxy.
Just need to push code upstream to libepoxy to support Android with GLES and GL first.
2014-04-30 19:11:06 -05:00
Tony Wasserka a40ea4e26a Merge pull request #236 from magumagu/d3d11-fix-peekz
D3D11: Use appropriate shader for PEEK_Z.
2014-04-27 16:09:02 +02:00
Tony Wasserka fe65474cc4 Software renderer: Update a reference link. 2014-04-24 00:42:08 +02:00
Pierre Bourdon d8ca861fec Merge pull request #287 from Tilka/unused_variable
Fix "warning: unused variable 'skipFrames'"
2014-04-19 09:03:19 +02:00
Tillmann Karras d523d2002b Fix "warning: unused variable 'skipFrames'" 2014-04-19 04:59:37 +02:00
Ryan Houdek 92ec49ac9f Change to ARM's naming convention in DriverDetails.
This matches how ARM handles their naming in their drivers for different models.
Really it's that way because both Mali-T6xx and Mali-T7xx fall under Midgard.
While everything else (except Mali-55) fall under Utgard.
2014-04-18 21:06:32 -05:00
magumagu 648b9865d8 D3D11 backend: fix rounding in texture encoder.
We need to explicitly round when converting colors from float to uint
because multiplying a normalized float by 255 might not result in a whole
number.  (The exact result here may vary depending on your
drivers/hardware.)

Ideally, we shouldn't be using floating point here, but fixing that is a
much more complicated patch.

Fixes gxtest TEV tests using Intel HD 4000.
2014-04-15 23:36:05 -07:00
magumagu 685d612c8c Software backend: don't skip red component in TEV. 2014-04-15 14:05:12 -07:00
magumagu 5e1c6aba33 Software backend: make TEV rounding match hardware.
Formulas stolen from gxtest.  (Not sure how "==" got turned into "!=", but
I'm pretty confident the patched version is correct.)
2014-04-15 14:04:46 -07:00
Matthew Parlane 4e0b7260b6 Merge pull request #263 from Sonicadvance1/DetermineMaliVersion
Add Mali driver version check and support of checking for Mali-T7xx
2014-04-14 19:20:04 +12:00
magumagu 812ff4686b OpenGL backend: remove useless header Globals.h.
The header has no content, so it can can just be deleted.
2014-04-12 19:25:37 -07:00
degasus 96ffbe345d VideoSoftware: remove const memory usage of DebugUtil 2014-04-12 13:32:53 +02:00
magumagu f18a3cc650 OpenGL config: clear backend_info.Adapters on init
Fixes a minor UI glitch where if you switch from Direct3D to OpenGL, the
OpenGL config page would appear to have an adapter choice available.
2014-04-12 00:17:36 -07:00
Ryan Houdek a9fa49f34d Support checking for the Mali-T7xx line of GPUs.
They are similar enough that they will share bugs with their drivers, so make them fall under the same Mali-Txxx umbrella of bug issues.
If there is ever a need in the future for having separate bugs depending on family, we can support that then.
2014-04-11 23:46:44 -05:00
Ryan Houdek ed67cc3fb2 Add the ability to determine the Mali driver version.
This is the only way we can determine the video driver version with mali.
Really it's a good thing that they only push driver updates once every two years, makes it easy to determine what driver anybody is running.
2014-04-11 23:38:40 -05:00
magumagu fd9c1fa746 VideoBackend: remove unused config vars.
No point to keeping around variables which are always "true".
2014-04-11 14:53:12 -07:00
magumagu 76d7c1eb9c D3DBackend: Don't recompute ID3D11Layout.
CreateInputLayout requires a shader as an input, but it only cares about
the signature; we don't need to recompute it for different shaders with
the same inputs.
2014-04-11 13:13:01 -07:00
Tony Wasserka 306b9afd1e Merge pull request #224 from magumagu/swrender-deletepixelfork
Software backend: Delete forked PixelEngine.
2014-04-11 20:01:23 +02:00
magumagu d0f89b2b63 SWBackend: Fix code style. 2014-04-05 13:08:00 -07:00
Matthew Parlane 13119e6755 Merge pull request #240 from Sonicadvance1/GLSLES310_binding
Add initial support for GLSL ES 3.10.
2014-04-04 08:43:20 +13:00
Ryan Houdek 3251d78f89 Add initial support for GLSL ES 3.10.
GLSL ES 3.10 adds implicit support for the binding layout qualifier that we use.
Changes our GLSL version enums to bit values so we can check for both ES versions easily.
2014-04-03 00:46:09 -05:00
Ryan Houdek ca9ee3586f Merge pull request #227 from magumagu/swbackend-fix-shaders
SW backend: make shaders work on Intel/Windows.
2014-04-02 14:51:14 -05:00
magumagu f9d2f7e88c D3D11: Use appropriate shader for PEEK_Z.
Trying to use GetDepthMatrixProgram outside of
TCacheEntry::FromRenderTarget is a bad idea, so don't.  Instead, use a
shader which only copies the input.

Fixes lens flare depth test in Twilight Princess. See
http://code.google.com/p/dolphin-emu/issues/detail?id=5999 .
2014-03-30 19:50:53 -07:00
Pierre Bourdon 9b03178673 Merge pull request #222 from comex/more-clang-fixes
More clang fixes
2014-03-30 13:24:08 +02:00
comex 92dd498fa7 Fix harmless warnings. 2014-03-30 01:40:11 -04:00
magumagu bdcd5ba39b SW backend: make shaders work on Intel/Windows.
Apparently the Intel shader compiler doesn't implement "#if" correctly...
so use "#ifdef" instead.
2014-03-29 13:10:43 -07:00
magumagu 0661efea84 Software backend: Delete forked PixelEngine.
Mostly just zapping a bunch of duplicated code; the only interesting thing
going on here is the changes to the performance counter implementation.
2014-03-29 12:07:20 -07:00
Pierre Bourdon 664c8d30a0 Remove all trailing whitespaces from our codebase. 2014-03-29 11:05:44 +01:00
Tony Wasserka 1dead05cae Software renderer: Properly calculate tev combiner output.
As pointed out by dolphin-emu/hwtests@461476112.
2014-03-26 00:23:58 +01:00
Tony Wasserka a8c8db8da7 Software renderer: Use color combiner configuration for alpha combiner compare mode inputs.
As pointed out by dolphin-emu/hwtests@f684f2498.
2014-03-26 00:23:58 +01:00
Tony Wasserka 16105db709 BPMemory: Make use of BitField in a number of structures. 2014-03-25 23:57:58 +01:00
Tony Wasserka 8941f19cdb BPMemory: Expose the pixel_format and zformat fields in PE_CONTROL as enumerations. 2014-03-25 23:57:58 +01:00
Tony Wasserka 77a7bab5ae BPMemory: Use the new BitField class in two selected structures. 2014-03-25 23:57:57 +01:00
Ryan Houdek 89efec6109 Merge pull request #167 from neobrain/ogl-efbpokes
Implement EFB pokes in the OpenGL backend.
2014-03-20 15:25:56 -05:00
Jens Nyberg ae260e55e4 OGL/VertexManager: Do not check if g_nativeVertexFmt is zero
The variable is already dereferenced both before and after this
check which means that if this variable would ever be zero it would
have crashed dolphin already.
2014-03-18 21:33:30 +01:00
Jens Nyberg 80421156b6 OGL/VertexManager: Minor cleanup of if case 2014-03-18 21:33:30 +01:00
Tillmann Karras 7e39cf3b0d .gitignore: fix the build directory pattern 2014-03-17 02:55:56 +01:00
Tillmann Karras 2fcaca0603 More range-based loops and overrides 2014-03-17 02:55:55 +01:00
Pierre Bourdon 8d679e76d2 Merge pull request #164 from lioncash/cstr-cull
Kill off some usages of c_str.
2014-03-15 00:57:56 +01:00
Tony Wasserka d946e4e238 OpenGL: Implement color and z pokes. 2014-03-14 23:39:52 +01:00
Tony Wasserka 3a6389992e PixelShaderGen: Treat UV coordinates like S17.7 integers (they're still stored as float, though). 2014-03-14 22:31:30 +01:00
Tony Wasserka 0238a56816 PixelShaderGen: Change indirect texture matrix uniforms to use integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka cff952c397 PixelShaderGen: Use integer math for indirect tev stage texcoord calculation. 2014-03-14 22:30:27 +01:00
Tony Wasserka fa77e1d2b6 PixelShaderGen: Use integer math for alpha testing. 2014-03-14 22:26:48 +01:00
Tony Wasserka 2af50f04c2 OGL: Force highp for integers. 2014-03-14 22:26:26 +01:00
Tony Wasserka 032c920247 OGL: Remove some dead code. 2014-03-14 22:26:26 +01:00
Lioncash a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
Matthew Parlane 31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
Tillmann Karras d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00
Tillmann Karras f28116b7da clang-modernize -add-override 2014-03-09 21:12:01 +01:00
Tillmann Karras c89f04a7c5 clang-modernize -loop-convert
and some manual adjustments
2014-03-09 21:11:59 +01:00
Tillmann Karras d461b3f33c SW renderer: add missing ClearCurrent()
courtesy of degasus
2014-03-06 01:53:29 +01:00
Ryan Houdek 4f02132f93 Make our architecture defines less stupid.
Our defines were never clear between what meant 64bit or x86_64
This makes a clear cut between bitness and architecture.
This commit also has the side effect of bringing up aarch64 compiling support.
2014-03-04 09:36:59 -06:00
Tony Wasserka 1bdf232fed videosoftware: More coding style fixes. 2014-03-03 19:03:15 +01:00
Tony Wasserka c6c6d20014 videosoftware: Provide a more elaborate comment on the FifoPlayer support hack. 2014-03-01 18:52:19 +01:00
Scott Mansell 17231418ef videosoftware: Added hack to bypass xfb just so fifoplayer works.
Fifoplayer depends on the old behaviour of videosoftware (and the other
hardware backends in non virtual/real xfb modes) where the framebuffer
gets rendered directly to the screen.

Really fifoplayer should call BeginFrame/EndFrame when it finished
rendering a frame, but adding this hack back in is simpler.
2014-03-01 18:45:24 +01:00
Tillmann Karras 7c93f2dc23 Fix the Windows build (broken in 315a8ba) 2014-03-01 01:33:19 +01:00
Tillmann Karras 315a8ba1c0 Various changes suggested by cppcheck
- remove unused variables
- reduce the scope where it makes sense
- correct limits (did you know that strcat()'s last parameter does not
  include the \0 that is always added?)
- set some free()'d pointers to NULL
2014-02-28 12:43:20 +01:00
degasus f628695d31 comment fixes 2014-02-26 12:48:52 +01:00
degasus aaaa5af0b2 remove (ATTR|VARY)(IN|OUT) macros 2014-02-26 11:37:29 +01:00
degasus 7f539b6033 ogl: optimize real xfb a bit
Both nvidia + mesa seems not to optimize x / (2**n) to x >> n, so we do it ourself.
2014-02-26 11:37:28 +01:00
Pierre Bourdon 83b7bb64aa Make Common/ mostly IWYU clean (and fix errors in rest of the project detected by this change). 2014-02-22 23:37:29 +01:00
Pierre Bourdon 6d8df311a3 Merge pull request #88 from lioncash/relative-includes
Relative includes
2014-02-20 02:08:44 +01:00
Pierre Bourdon 425f9dcd51 Fix more header sorting issues in VideoBackends/ (now check-includes clean). 2014-02-20 01:01:11 +01:00
Pierre Bourdon a18e8249a4 Merge pull request #79 from Tilka/nits
Silence some Windows compiler warnings
2014-02-18 14:19:38 +01:00
Lioncash 2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
Lioncash 3fd87a7636 Second and final pass of clearing out tabs. 2014-02-17 02:19:41 -05:00
Pierre Bourdon b18a33377d Merge pull request #55 from Sonicadvance1/GLExt-InitArray
Change OpenGL extension initialization in to a big array
2014-02-17 02:16:16 +01:00
Ryan Houdek 6b5f6ddaa1 Merge pull request #82 from lioncash/vertical-alignment
Fix some vertical alignments
2014-02-16 19:12:42 -06:00
Lioncash 6c4ee1753a Fix some vertical alignments
ie. uses spaces for alignment.
2014-02-16 20:12:05 -05:00
Ryan Houdek eae9d47c3c Change OpenGL extension initialization in to a big array
This is a reasonable chunk of changes and moves from multiple initialization functions in to an array initialization.
2014-02-16 17:40:34 -06:00
Tony Wasserka de5bfd0bce Merge pull request #37 from degasus/VideoCommonApiFixes
VideoCommon API cleanups
2014-02-16 22:08:28 +01:00
Pierre Bourdon 92f8d93e96 Remove the old MMIO access "interface". 2014-02-16 19:22:40 +01:00
Pierre Bourdon f8f14c83a3 MMIO: Port the SW CP/PE MMIOs to the new interface.
Migration is now complete.
2014-02-16 19:22:40 +01:00
Pierre Bourdon 4129b30494 MMIO: Port the VideoCommon CP MMIOs to the new interface (and provide framework for other video related mappings). 2014-02-16 19:22:40 +01:00
Tillmann Karras 0d6ab2c658 Silence some Windows compiler warnings
by adding explicit type casts.
2014-02-16 16:59:45 +01:00
degasus 647aad0a19 inline SetViewport into VertexShaderManager 2014-02-15 21:09:42 +01:00
degasus d5f1f0d4a9 merge some common parts of Swap() into VideoCommon 2014-02-15 11:33:43 +01:00
degasus 3551259c7a use EFBRectangle for scissor rect
This one is backend independed. The backend should recalc such things on their own.
2014-02-15 11:33:43 +01:00
degasus 1f4219b5b4 move perfquery enable checks into videocommon (caller side) 2014-02-15 11:33:43 +01:00
degasus 5a660c27bc rename UpdateViewport to SetViewport like all others setters in RenderBase.h 2014-02-15 11:33:43 +01:00
degasus 3cd6918dec fix ogl video config crash
This will happen when playing on any other backend than ogl which have a non-trival GLInterface::GetMode() method.
2014-02-15 11:33:43 +01:00
degasus e5318d2624 move shared parts from VertexManager::vFlush into VideoCommon 2014-02-15 11:33:43 +01:00
Lioncash 655d22512b Kill off some usages of the ArraySize macro.
This required the use of std::array in some cases.
2014-02-15 02:43:54 -05:00
Tillmann Karras 404624bf0b Turn loops into range-based form
and some things suggested by cppcheck and compiler warnings.
2014-02-13 09:05:50 +01:00
lioncash d2038049f5 Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
Ryan Houdek 8d25e12085 Merge pull request #54 from lioncash/cleanup
Cleanup mismatching struct/enum indentations.
2014-02-09 19:26:15 -06:00
Pierre Bourdon 28b5c8be47 Merge pull request #53 from lioncash/remove-another-xchg
Remove function Xchg from SWStatistics.cpp.
2014-02-10 02:01:21 +01:00
Lioncash fc30597f7a Remove function Xchg from SWStatistics.cpp. Like the one previous, this can be replaced with std::swap 2014-02-09 19:55:44 -05:00
Lioncash ebb48d019e Clean up some struct indentations
Also cleaned up the indentations of some variable declarations.
2014-02-09 19:40:11 -05:00
Lioncash 40182a48a5 Cleanup enum indentations. 2014-02-09 16:16:10 -05:00
Ryan Houdek 6a5cd02629 Cleanup GLExtensions on how it fails.
If there is an issue with a reported extension, disable it instead of failing out entirely.
Fixes an issue with buffer_storage that I had overlooked as well.
2014-02-08 19:50:12 -06:00
Ryan Houdek 9f91769def Improve GLExtensions compile time.
This changes from using logical and to bitwise and, which causes the compile time to drop from an absurd amount of time to around five seconds on my
crappy laptop.
2014-02-08 15:04:17 -06:00
Tony Wasserka af24ed782d Merge pull request #14 from degasus/uboWorkaroundRemove
OGL: Remove non-UBO code path.
2014-02-04 14:05:55 -08:00
Pierre Bourdon 8ab6ed4b49 SWCommandProcessor: fix the CPReg structure fields
This structure fields should match byte-to-byte the layout of MMIO registers:
it is addressed using the MMIO reg address when doing a CP MMIO read. This was
unfortunately not the case, causing CP reads to be mostly broken with the
software renderer.
2014-02-04 01:16:14 +01:00
degasus 6089e4470a OGL: remove ubo workaround
This was only keeped for some broken mesa versions. Meanwhile most used versions should be fixed for almost a year.
2014-02-01 22:33:45 +01:00
Tony Wasserka 3dd31fe22b Merge pull request #11 from degasus/VertexLoaderCleanup
Vertex loader cleanup.
2014-01-31 06:13:26 -08:00
degasus 010a0d481a VideoCommon: remove Cache Displaylist
This option was known to break every second game and only boost a bit.
It also seems to be broken because of streaming into pinned memory and buffer storage buffers.

v2: also remove dlc_desc
2014-01-31 07:30:55 +01:00
degasus a65162f1cd PortableVertexFormat: use AttributeFormat for posmtx attribute format 2014-01-31 07:19:34 +01:00
degasus 6c59b691b0 PortableVertexFormat: use AttributeFormat for texcoord attribute format 2014-01-31 07:19:34 +01:00
degasus ef2d6e7d53 PortableVertexFormat: use AttributeFormat for color attribute format 2014-01-31 07:19:34 +01:00
degasus b38ef39ab7 PortableVertexFormat: use AttributeFormat for normal attribute format 2014-01-31 07:19:34 +01:00
degasus 210f4f3e55 PortableVertexFormat: add a struct which hold all needed information for every vertex and use this for position
atm, position attribute is hardcoded both in VertexLoader and in backends.

v2: fix coding style + cleanup lookup table
2014-01-31 07:19:25 +01:00
degasus 02d1d8e6a0 NativeVertexFormat: swap unsigned / signed formats to match GX order 2014-01-30 11:12:10 +01:00
Ryan Houdek 99b6c82ac3 [Android] Fix Adreno v53 development drivers rotating framebuffer
Older Qualcomm drivers rotated the framebuffer 90 degrees and this fix didn't work.
Now for some obscene reason it rotates a full 180 degrees.
This can at least be worked around by flipping around the image on our end.
2014-01-29 16:39:45 -06:00
degasus b1290a8630 OGL: remove version check for buffer_storage on windows
On Windows, nvidia don't give us their driver version, so we can't workaround any issues.
As buffer_storage is broken on some drivers, we wanted to disble it for them.
So we can't.

Luckyly only "some" released driver versions are affected as this extension is only available since some months. Let's hope that nobody have to use one of this driver version, else they will get a black screen ...
2014-01-28 15:15:26 +01:00
crudelios 9b6c6fa9e4 BBox: Changed the rounding again, the old one fixed Paper Mario but had bugs in Mickey's Magical Mirror. This change fixes the glitches in both games.
Also fixed some compiler warnings.
2014-01-26 13:21:22 +00:00
degasus d3fd0eddbb OSX: don't avoid unsync mapping on nvida gpus just because the windows driver doesn't like it
OSX has their own driver, so performance issues aren't shared with the nvidia driver (unlike the closed source linux and windows nvidia driver). So now they'll also use the MapAndSync backend like all other osx drivers.

fixes issue 6596

I've also cleaned up the if/else block selecting the best backend a bit.
2014-01-26 11:00:29 +01:00
Scott Mansell dd42af9a7c Videosoftware: Fix memory cleanup code. 2014-01-25 11:06:18 +13:00
Ryan Houdek fd8757a64b Fix OpenGL 2.1 devices that support everything we need.
The only two devices that do this are Mesa software rasterizer and Intel Ironlake(With a few hacks).
Basically since it doesn't support OpenGL 3.0, it can't grab the version the new way.
So failing that, it sets to GL 2.1, and continues.

Further along, on Ironlake at least, it tries grabbing the extensions the new GL 3.0 way and fails.
So have a fallback that grabs the extensions string the old way, in probably the most elegant way possible.
2014-01-23 16:02:53 -06:00
degasus 65121cf9a9 OpenGL: remove unused OpenGL headers 2014-01-23 18:52:57 +01:00
degasus 1ff681a412 D3D: move streaming buffer fallback into D3D backend
Neith OGL nor VideoCommon doen't use it, so there is no need to have it in VideoCommon.
2014-01-23 15:27:18 +01:00
degasus ff002320a5 OpenGL: Stream vertices + indices 2014-01-23 15:12:31 +01:00
degasus 128fcdac26 OpenGL: refactor all of our StreamBuffers
The old way was to use big switch/case statements based on a type of buffer.
The new one is to use inheritance.

This change prohibits us to change the buffer type while running, but I doubt we'll ever do so.
Performance should also be a bit better. Also a nice cleanup.

Added some comments about this different kind of buffers.
2014-01-23 15:12:31 +01:00
degasus be1fee6d74 OpenGL: change StreamBuffer in a streaming way
This is a bit slower on map_and_* because of flushing and _very_ much slower on buffer(sub)?data because of a new memcpy.
But this design allow us to decode directly into a gpu buffer, eg vertexloader will profit :)
2014-01-23 15:12:31 +01:00
Ryan Houdek 07db7520bf [GLExt-Cleanup] This cleans up some extra bits unneeded in the extension headers
gl.h and glext.h provide most of the function pointer typedefs and defines for extensions and core features.
The only one it doesn't provide is GL 1.1 function typedefs, but this is to be expected.
If anything needs defines or typedefs in their header in the future, that's as easy as before.
2014-01-23 07:11:13 -06:00
degasus ebbf1d392b VideoCommon: merge trivial parts of VertexManager::Flush 2014-01-21 10:47:00 +01:00
degasus 60632fda6f OpenGL: remove small optimization
This one was introduced to reduce the glBindTexture and glActiveTexture calls. But it was quite a bit of logic and only an improvment on uploading/creating a texture, which is done rarely.
2014-01-21 10:34:48 +01:00
degasus fe02833f13 OpenGL: fix our ubo workaround when blend_func_extended is missing 2014-01-21 10:03:05 +01:00
Scott Mansell 8b2c540544 Finally Merge branch 'videosoftware-xfb'
This adds xfb support to the videosoftware backend, which increases it's
accuracy and more imporantly, enables the usage of many homebrew apps
which write directly to the xfb on the videosoftware backend.

Conflicts:
	Source/Core/VideoBackends/Software/SWRenderer.cpp
	Source/Core/VideoBackends/Software/SWmain.cpp
2014-01-21 00:10:00 +13:00
Scott Moreau 2c8340e1dc Move GLInterface.h into GLInterface directory 2014-01-20 00:46:21 -07:00
Ryan Houdek 683dbc09ac Stop building GLExtensions.cpp twice(One in GL, one in software). We don't need to build it twice, this'll save a bit of time in the build process.
Also a bit of spacing cleanup.
2014-01-19 11:37:37 -06:00
Ryan Houdek 5d26bf6d9d Rename our GLInterface class function 'GetProcAddress' in order to not have clashing function names due to Windows. 2014-01-18 14:18:32 +00:00
Ryan Houdek bea484e12f Move Win32 specific function grabbing fallback to WGL.cpp. Fixes issue 6964. 2014-01-18 14:10:24 +00:00
Ryan Houdek 839df31347 Merge of GL-AutoChoose.
This branch is the final step of fully supporting both OpenGL and OpenGL ES in the same binary.
This of course only applies to EGL and won't work for GLX/AGL/WGL since they don't really support GL ES.
The changes here actually aren't too terrible, basically change every #ifdef USE_GLES to a runtime check.

This adds a DetectMode() function to the EGL context backend.
EGL will iterate through each of the configs and check for GL, GLES3_KHR, and GLES2 bits
After that it'll change the mode from _DETECT to whichever one is the best supported.
After that point we'll just create a context with the mode that was detected
2014-01-18 04:11:59 +00:00
degasus 5a599d472e Merge branch 'GLExtensions' 2014-01-17 16:49:51 +01:00
degasus 6b01839525 VideoCommon: merge triangle+list+point index buffers
We are used to render them out of order as long as everything else matches, but rendering order does matter, so we have to flush on primitive switch. This commit implements this flush.
Also as we flush on primitive switch, we don't have to create three different index buffers. All indices are now stored in one buffer.

This will slow down games which switch often primitive types (eg ztp), but it should be more accurate.
2014-01-17 16:34:53 +01:00
degasus e932a349e8 [GLExtensions] fixup for missing changes on rebase 2014-01-17 16:10:10 +01:00
Ryan Houdek 29e0a90b88 [GLExtensions] Rename internal GetProcAddress function since it clashes with the global Windows function. Fix Windows function pointer grabbing. 2014-01-17 16:06:46 +01:00
Ryan Houdek 6cdb05b633 [GLExtensions] OpenGL 3.0 also added GL_ARB_map_buffer_range to core. 2014-01-17 16:06:23 +01:00
Ryan Houdek a5ffe9932a [GLExtensions] Future proof ourself by putting the default: instance on the top, so we'll grab extensions if they support something newer. Handle older GLVersions in the case they get that far. 2014-01-17 16:06:18 +01:00
Ryan Houdek 2a11fead5c [GLExtensions] Populate the extension list for OpenGL implementations that don't show core extensions. 2014-01-17 16:06:13 +01:00
Ryan Houdek 0ea6718d99 [GLExtensions] Fix OS X build. 2014-01-17 16:06:08 +01:00
Ryan Houdek 34c9a33807 [GLExtensions] Remove AGL GetProcAddress. Change dlsym to using RTLD_NEXT. Enable dlsym fallback for OS X 2014-01-17 16:06:03 +01:00
Ryan Houdek ca96274936 [GLExtensions] Make sure to link against libdl since we use it to grab GL function pointers in Linux/Android in the case the GLInterface->GetProcAddress fails. 2014-01-17 16:05:57 +01:00
Ryan Houdek 45dfa3a481 [GLExtensions] Missed a couple USE_GLES3 compile time differences. 2014-01-17 16:05:52 +01:00
Ryan Houdek 97dc20d1be [GLExtensions] Pull in all the function pointers for OpenGL 1.1, This removes the need for a couple compile time differences between GL and GLES3 mode. 2014-01-17 16:05:40 +01:00
Ryan Houdek f308b878b2 [GLExtensions] Oops. Don't just outright disable these helper functions. 2014-01-17 16:05:34 +01:00
Ryan Houdek cfb8b43b4a [GLExtensions] Don't fail out loading funciton pointers in both ES2 and ES3 modes. 2014-01-17 16:05:25 +01:00