Commit Graph

2001 Commits

Author SHA1 Message Date
Ryan Houdek b6db0d0ab8 Merge pull request #457 from Tilka/jcc
x64Emitter: J_CC: use 32 bit offset automatically
2014-06-06 20:53:50 -05:00
Pierre Bourdon 834bc85e1f Merge pull request #458 from Tilka/warnings
Fix some warnings
2014-06-06 00:58:37 +02:00
Tillmann Karras 0eb341e542 Fix some warnings.
The 'offset' variable needs to stay because the disabled code below uses it.
2014-06-04 01:04:52 +02:00
Tillmann Karras f8280401f6 x64Emitter: J_CC: use 32 bit offset automatically 2014-06-03 23:08:58 +02:00
Lioncash 776e36b10a Fix a typo in a BP register name (BPMEM_TX_SETLUT_4 -> BPMEM_TX_SETTLUT_4).
Also fixed the alignment of the register values.
2014-06-02 02:26:30 -04:00
Lioncash 12db989098 Add missing registers in GetBPRegInfo 2014-06-02 02:19:53 -04: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
Pierre Bourdon 3097345929 Merge pull request #411 from lioncash/fifo-cleanup
Make GetBPRegInfo just take two strings as parameters
2014-05-30 01:51:11 +02:00
Lioncash c96407bd2a Make GetBPRegInfo just take two strings as parameters
Gets rid of the size parameters.
2014-05-29 19:44:14 -04:00
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
Jasper St. Pierre 9d161b4170 BPStructs: Consistently put the two shared copy args first
And rename them so they make a bit more sense.
2014-05-20 11:28:15 -04:00
Jasper St. Pierre 1ae8edc1d0 BPStructs: Remove another function wrapper 2014-05-20 11:28:15 -04:00
Jasper St. Pierre b1d3c5937a BPStructs: Move LoadBPReg here 2014-05-20 11:28:14 -04:00
Jasper St. Pierre 763ad77a1c BPStructs: Flatten out BPWritten 2014-05-20 11:28:14 -04:00
Jasper St. Pierre 07ab77d31c BPStructs: Reindent BPWritten 2014-05-20 11:28:08 -04:00
Jasper St. Pierre c33a1b4b28 BPStructs: Document BPMEM_BP_MASK better 2014-05-20 11:26:31 -04:00
Jasper St. Pierre 2f122ea63c BPMemory: Fix "DISPLAYCOPYFILER" typo 2014-05-20 11:15:10 -04:00
Jasper St. Pierre 4e8e51b278 BPStructs: Remove calls to SetInterlacedMode when reloading state
SetInterlacedMode is a dummy no-op that does nothing.
2014-05-20 11:15:10 -04:00
Jasper St. Pierre 833b7ee584 BPFunctions: Remove the rest of GetConfig 2014-05-20 11:15:09 -04:00
Jasper St. Pierre 08611c3f36 PixelShaderManager: Fizzle out fog changes when disabled here
This lets us remove a use of GetConfig.
2014-05-20 11:15:09 -04:00
Jasper St. Pierre fe645b888b BPFunctions: Remove use of a dumb method
GetPointer serves no purpose.
2014-05-20 11:15:08 -04:00
Jasper St. Pierre 56228cea5d BPFunctions: Remove an unused method 2014-05-20 11:15:08 -04:00
Jasper St. Pierre 4f4e3fad85 BPMemory: Clean up and rename some variables and comments
This is about the register number, not the opcode.
2014-05-20 11:15:08 -04:00
Jasper St. Pierre e81b62aad1 BPFunctions: Clean up math slightly
No need for magic 342 numbers.
2014-05-20 11:14:00 -04: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 6fbf6fad3b VideoCommon: cleanup Renderer::RecordVideoMemory. 2014-05-16 18:58:08 -07: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 fee6efc4dc Merge pull request #375 from degasus/remove_SkipVertices
VertexLoaderManager: Remove unused function.
2014-05-16 16:20:29 +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
degasus 7bb44199fd remove unused and unexported function 2014-05-16 14:33:00 +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
Ryan Houdek 15ce648b0d Merge pull request #341 from lioncash/pragma
Move the header guard before the includes in VideoCommon's Statistics.h
2014-05-10 23:21:53 -05: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 716b3fefd4 VideoCommon: recreate XFB texture when the XFB size changes.
We need to do this to correctly deal with games which dynamically change the
XFB width and height.
2014-05-05 11:01:14 -07:00
Ryan Houdek 2f92b82b29 Merge pull request #345 from Sonicadvance1/Qualcomm-textureSize
Enables usage of GLSL textureSize on Qualcomm v66.
2014-05-05 11:41:40 -05:00
degasus 813e30ec2a ShaderGen: make uv readonly 2014-05-05 17:06:38 +02:00
degasus 6109958e68 ShaderGen: OGL: don't make a copy of "Normal" 2014-05-05 17:06:37 +02:00
degasus 0e0da8c8fd ShaderGen: make clipPos readonly 2014-05-05 17:06:37 +02:00
degasus c80717ac2e PixelShaderGen: extract iround 2014-05-05 17:06:37 +02:00
degasus 2bc2b73e03 PixelShaderGen: drop fmod as it isn't used any more 2014-05-05 17:06:37 +02:00
degasus c82991df5b ShaderGen: inline constant shaders 2014-05-05 17:06:37 +02:00
degasus b0878c54b2 ShaderGen: use cbuffers for D3D 2014-05-05 17:06:37 +02:00
degasus fe9fcfdd07 ShaderGen: merge early-z blocks of ogl+d3d 2014-05-05 17:06:37 +02:00
degasus 3e14bf511f ShaderGen/D3D: inline centroid 2014-05-05 17:06:36 +02:00
Ryan Houdek 8bb8446e34 Enables usage of GLSL textureSize on Qualcomm v66.
Qualcomm's v66 drivers have a working textureSize() function now.
Enable usage of it.
2014-05-05 08:50:13 -05:00
magumagu 2e464800bc VideoCommon: correctly compute whether an indirect texture stage is active.
This is consistent with the implementation in PixelShaderGen.
2014-05-04 22:44:10 -07:00
magumagu 52c42a2946 VideoCommon: fix indirect texture coordinate computation in TEV.
Even if an indirect texture stage doesn't actually sample a texture, we
still need to emit the relevant math.

Fixes Issue 7092.
2014-05-04 22:12:57 -07:00
Lioncash f4d80bd8a5 Move the #pragma once header guard before the includes in Statistics.h in VideoCommon. 2014-05-04 00:24:21 -04:00
Tony Wasserka 557c3db462 Merge pull request #81 from degasus/skip_framelimit_hotkey
Add a hotkey for disabling the framelimit.
2014-05-01 12:40:01 +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
degasus 30586f4d29 Add set/get functions for IsFramelimiterTempDisabled 2014-04-30 12:51:13 +02:00
degasus 8483811b39 Add a hotkey for disabling the framelimit.
Atm this is hardcoded to '\t'.
2014-04-30 12:50:53 +02:00
Pierre Bourdon 25f5598e31 Merge pull request #306 from neobrain/pixel_center_correction
VertexShaderGen: Correct vertex shader output to consider shifted pixel centers.
2014-04-25 09:32:36 +02:00
Tony Wasserka ca2a79d0bd Workaround dumb custom texture loading logic so that D3D11, GL core (used on OS X) and GLES code paths have less broken custom textures. 2014-04-24 00:33:48 +02:00
Tony Wasserka c47c32d4a8 VertexShaderGen: Correct vertex shader output to consider shifted pixel centers.
Fixes issue 267.
2014-04-24 00:21:17 +02:00
Ryan Houdek fd37a768a6 Fix texture conversion shaders for GLSL ES.
Noticed this while messing with EFB to RAM.
We were having an implicit conversion from integer to float, GLSL ES doesn't allow implicit conversion.
Changes it to a explicit conversion to float.
2014-04-22 15:48:26 -05:00
Tony Wasserka 762572a08c BPMemory: Fix GenMode using an incorrect number of bits for the number of color chans. 2014-04-21 22:47:08 +02:00
Tony Wasserka 16d3dbc5ea BPMemory: Use BitField for the GenMode fields. 2014-04-21 22:34:23 +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 b3a67821e4 VideoCommon: fix rounding in TEV.
The hardware backends pass the TEV tests in gxtest with this change.
2014-04-15 16:47:01 -07:00
Tony Wasserka 068f26d2aa PixelShaderGen: Fix an issue with color combiner compare mode and simplify the affected line a bit.
This was a mistake of mine when translating floating point values to integer values.
Also, the max() part of that line was just completely redundant because the sign of an absolute value is always greater than or equal to zero.

Fixes issue 7178.
2014-04-15 23:41:07 +02:00
Tony Wasserka 4f3227b4a9 Merge pull request #261 from magumagu/pixelshadergen-extra-paren
PixelShaderGen: delete extra parenthesis
2014-04-14 09:48:02 +02:00
magumagu a2150ef1f8 PixelShaderGen: delete extra parenthesis.
Without this patch, we can generate a pixel shader which doesn't compile
in some cases.
2014-04-14 00:41:27 -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
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
Tony Wasserka 306b9afd1e Merge pull request #224 from magumagu/swrender-deletepixelfork
Software backend: Delete forked PixelEngine.
2014-04-11 20:01:23 +02:00
Tony Wasserka cdf6172348 Merge pull request #213 from Jezze/vertexloader-cleanups
Vertexloader cleanups
2014-04-10 08:52:36 +02:00
Ryan Houdek 87d106d65c Remove dumb CodeBlock duplication in the emitters.
Fixes issue 6990.
This uses a bit of templating to remove the duplicate code that is the CodeBlocks in each emitter headers.
No actual functionality change in this.
2014-04-09 13:53:43 -05: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
Pierre Bourdon 9b03178673 Merge pull request #222 from comex/more-clang-fixes
More clang fixes
2014-03-30 13:24:08 +02:00
comex b5654a2464 Don't cast -1 to enum to represent a missing value.
This is undefined behavior in C++, and a clang warning suggests it is
actually producing bad code as a result:

../Source/Core/VideoCommon/BPFunctions.cpp:164:45: warning: comparison of constant 4294967295 with expression of type 'PEControl::PixelFormat' is always false [-Wtautological-constant-out-of-range-compare]
        if (new_format == old_format || old_format == (unsigned int)-1)
2014-03-30 01:40:06 -04: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
Jens Nyberg 73176d0333 VideoCommon/VertexLoader: Add more use of std::min and std::max 2014-03-27 00:33:41 +01:00
Jens Nyberg 478a27e052 VideoCommon/VertexLoader: Remove duplicate point min and max calculation 2014-03-27 00:24:48 +01:00
Jens Nyberg 0c62ae9c1a VideoCommon/VertexLoader: Remove NRM enum 2014-03-26 23:56:57 +01:00
Pierre Bourdon ea6b37cb75 Merge pull request #193 from neobrain/tev_combiner_fixes
PixelShaderGen: Cleanups and fixes for tev combiners.
2014-03-26 10:05:46 +01:00
Tony Wasserka c6070b94ce BPMemory: Fix an enum to use u32 as its underlying type. 2014-03-26 10:02:57 +01:00
Tony Wasserka eb0f547a17 PixelShaderGen: Cleanups. 2014-03-26 00:23:36 +01:00
Tony Wasserka 4f82d6f7af PixelShaderGen: Implement tev combiner lerping in a faster way which also reproduces hardware behavior perfectly.
The new behavior has been verified to be correct by hardware tests. This is an improvement over the old code, which was just a guess.
2014-03-26 00:17:04 +01:00
Tony Wasserka fdad95c055 PixelShaderGen: Cleanups and fixes for tev combiners.
Fixes issue 4674.
2014-03-26 00:17:03 +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
Jens Nyberg 4a68550d01 Remove superfluous bit shift 2014-03-18 04:07:45 +01:00
Ryan Houdek 484fb46390 Clang 3.4 exposes some warnings on Android.
Fixes all warnings on Android build except for what is in externals.
Removes a function from TextureDecoder_Generic since it is unused and generates a warning.
2014-03-17 18:17:12 -05:00
Matthew Parlane 6445e02d53 Merge pull request #159 from Tilka/misc
Cleanup stuff
2014-03-17 17:43:20 +13:00
Tillmann Karras 2fcaca0603 More range-based loops and overrides 2014-03-17 02:55:55 +01:00
Lioncash a9adaa5601 Prevent VideoConfig inheritance. 2014-03-16 17:00:29 -04:00