Commit Graph

388 Commits

Author SHA1 Message Date
Lioncash 00efaedb02 FPS counter cleanup
- Isolate it into it's own namespace
- Shorten function names, the namespace self-documents.
- Just use the std I/O, we can just write directly to the stream for
  logging.
2014-07-02 20:23:09 -04:00
degasus 7db5a4b22d Statistics: Reformat stats string 2014-06-27 09:36:50 +02:00
degasus f1ddd3c66a VideoCommon: remove unused stats 2014-06-27 09:35:26 +02:00
Lioncash ca5340ebde Centralize the logging code into its own folder in Common. 2014-06-25 22:11:42 -04:00
Lioncash 8b13afbb8e Remove the 32-bit config platform from the VS solution and projects 2014-06-24 22:07:26 -04:00
Pierre Bourdon 5dff577339 Merge pull request #500 from lioncash/ini
Use only section-based ini reading.
2014-06-22 17:21:45 +02:00
Tony Wasserka d60f91ef5a Merge pull request #501 from magumagu/sw-cp-structs
VideoSoftware: remove duplicated CommandProcessor structures.
2014-06-21 22:23:19 +02:00
magumagu 8bf3ffc76f VideoSoftware: remove duplicated CommandProcessor structures. 2014-06-21 11:54:43 -07:00
Tony Wasserka fbca397c92 Merge pull request #439 from degasus/lighting-fix
Lighting cleanup
2014-06-21 12:17:26 +02:00
Paul Olszewski c5ef249c4b Make the common "Failed to enumerate outputs" message much more useful.
Now it includes its most common cause, a simply-worded solution, and an exclamation point.
2014-06-20 15:51:54 -05:00
degasus 924ad1ee9f LightingShader: hard code const variable 2014-06-19 16:46:53 +02:00
degasus d93f2973f7 PixelShader: use the vertex const buffer for ppl 2014-06-19 16:33:33 +02:00
degasus 027baad73b VideoCommon: use the Light struct in XF memory 2014-06-19 16:33:29 +02:00
Tony Wasserka e642c8d0c1 Merge pull request #497 from Armada651/osd-scaling
D3D: Reset viewport before drawing the OSD.
2014-06-19 15:26:10 +02:00
Lioncash ce54c1e571 Kill off replaceable usages of s[n]printf. 2014-06-18 19:53:38 -04:00
Jules Blok 6c52ec93b7 D3D: Reset viewport before drawing the OSD. 2014-06-16 23:34:54 +02:00
Lioncash f05d3f6e5d Use only section-based ini reading. 2014-06-16 01:31:23 -04:00
Pierre Bourdon 020b4fde1e Merge pull request #492 from Armada651/master
Remove EmuWindow
2014-06-15 14:16:53 +02:00
Armada f2759ffe65 Remove EmuWindow.
All it did was raise complexity.
2014-06-15 00:49:49 +02:00
Tony Wasserka d7736ac714 Merge pull request #445 from magumagu/video-dead-code
Video backends: remove dead code.
2014-06-13 22:38:22 +02:00
Paul Olszewski 5d793881b0 Fix the capitalization of "GameCube" throughout the project. 2014-06-08 11:24:49 +09:00
Ryan Houdek d2e4c2fc50 Fix OpenGL ES version detection.
Mesa report GLES version as "3.0" not "3.00"
Spec mandates X.Y versioning scheme, doesn't say how long the decimal place must be.
2014-06-06 21:21:35 -05:00
degasus 9566dcf0da OGL: speed up the EFB cache
gcc doesn't optimize this loops with -O2, so using memset now.
A flag to skip the clear funktion was added as the cache is already cleared most of the time.
2014-06-05 14:53:09 +02:00
degasus d9eafd94a2 OGL-StreamBuffer: replace size_t with u32
Yes, this matters.
We align our buffer all the the time which needs a division. u64 divisions are just so slow.
2014-06-05 13:33:50 +02:00
degasus 606e46ba8d OGL-StreamBuffer: move alignment to caller
Only the caller know if alignment is needed at all, so it can be skipped now.
2014-06-05 13:32:13 +02:00
degasus 02a4e3d70f OGL-StreamBuffer: make the SLOT calculation much easier
The size of the buffer is now power of 2, so we can use a shift instead of a division.
This was at about 2% of the global CPU usage.
2014-06-05 13:32:13 +02:00
degasus d81d2e8915 OGL-StreamBuffer: allocate fences in StreamBuffer directly 2014-06-05 13:32:13 +02:00
degasus 0688cfdaef OGL-StreamBuffer: don't use coherent mapping
Coherent mapping seems to be much slower on fermi gpus.
2014-06-05 12:18:44 +02:00
magumagu 0aecd9504e Video backends: remove dead code. 2014-06-01 01:56:09 -07:00
Lioncash 49b0eef393 Remove the min/max functions in CommonFuncs.
The algorithm header has the same functions.
2014-05-29 21:44:41 -04:00
shuffle2 329fcad04f Merge pull request #421 from CarlKenner/MissingSpace
Fix error message when D3D11 HResults fail.
2014-05-29 14:06:18 -07:00
CarlKenner 361d53fdc7 Fix error message when D3D11 HResults fail.
Prevents showing the wrong function name by putting a space between the function name and "Failed".
Also fixes the capitalization.
2014-05-27 00:45:26 +09:30
Lioncash 1583ce9363 Use strings instead of arbitrary buffers for video statistics 2014-05-25 21:11:29 -04:00
shuffle2 b58753bd69 Merge pull request #370 from Sonicadvance1/remove_specialized_memcmp
Removes ZeroFrog's "optimized" memcpy and memcmp functions.
2014-05-22 13:02:11 -07:00
degasus c1b6fcc00b ogl: pixel format shader without resolving
v2: Don't use std::to_string as this function is broken on android.
2014-05-19 09:29:40 +02:00
degasus e150d307a6 ogl: use ARB_texture_multisample for msaa 2014-05-19 09:21:44 +02:00
degasus fab78c2dff ogl: add ARB_texture_multisample 2014-05-19 09:21:44 +02:00
degasus 775858b6bc ogl: drop NV_framebuffer_multisample_coverage 2014-05-19 09:21:44 +02:00
degasus afea848e3b ogl: drop csaa support 2014-05-19 09:21:44 +02:00
Tony Wasserka 6950f533ae Merge pull request #355 from magumagu/gx-missing-opcode
Opcode decoding: handle missing opcodes 0x88 etc.
2014-05-18 11:12:06 +02:00
Ryan Houdek a4bb0dafb4 Removes ZeroFrog's "optimized" memcpy and memcmp functions.
These were only compiled in on Windows and x86_32.
They provided "optimized" copies and compares based on blocksizes for the AMD Athlon and Duron CPU families.
The code was taken from something that AMD provides with a as-is license.
Just get rid of this crap.
2014-05-17 18:03:31 -05:00
Tony Wasserka fc34d5a130 Merge pull request #360 from magumagu/lighting-rounding
Video backends: fix rounding in lighting computation.
2014-05-17 21:06:31 +02:00
magumagu 9b82d72070 Video backends: warn on usage of GL_DRAW_QUADS_2.
It's not normally used, so if it shows up, it could indicate a CPU emulation
bug.
2014-05-17 11:55:32 -07:00
Tony Wasserka 0fac17da33 Merge pull request #269 from magumagu/swbackend-xfregisters
SW backend: use VideoCommon XFRegisters struct.
2014-05-17 10:40:57 +02:00
magumagu 1357277f40 Video backends: mass-replace "xfregs" with "xfmem". 2014-05-16 18:58:07 -07:00
magumagu 8f5342c442 Video backend: merge global var xfmem into xfregs.
There isn't really any reason to keep them separate.
2014-05-16 18:55:31 -07:00
magumagu 818c89313e Video backends: unify xfregs/xfmem structures.
Removes the duplicate swxfregs global variable/struct from the software
backend in favor of the ones from VideoCommon.
2014-05-16 18:55:30 -07:00
magumagu 8b82cea704 Video backends: fix behavior of "konst" TEV inputs.
Also fixes TEVCOLORARG_HALF.

Values verified to match hardwarere.
2014-05-16 12:19:35 -07:00
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