Tony Wasserka
2067f88e0f
PixelShaderGen: Don't make local lookup tables "static".
2014-03-14 22:33:26 +01:00
Tony Wasserka
0ce92e0162
PixelShaderGen: Remove the "i" prefix for integer variables.
...
The prefix was just required in the development stage to reduce the risk of regressions.
2014-03-14 22:33:26 +01:00
Tony Wasserka
bdd629c598
PixelShaderGen: Use spaces for alignment where appropriate.
2014-03-14 22:33:26 +01:00
Tony Wasserka
6e65e02c9e
ConstantManager: Do not use single-element arrays.
2014-03-14 22:33:25 +01:00
Tony Wasserka
6c2971eaf6
PixelShaderGen: Write 16777215 in hex (0xFFFFFF) so that it's easier to understand.
2014-03-14 22:33:25 +01:00
Tony Wasserka
8ebb65ebf2
PixelShaderGen: Prettify generated shader source.
2014-03-14 22:33:24 +01:00
Tony Wasserka
e2e1c5c905
PixelShaderGen: Add a note about a random idea which should be checked with hardware tests.
2014-03-14 22:33:12 +01:00
Tony Wasserka
6fcbda6752
PixelShaderGen: Cleanup and clarify bump alpha combiner inputs.
2014-03-14 22:33:12 +01:00
Tony Wasserka
9a96a1d525
PixelShaderGen: Remove old, mostly useless comments.
...
A few vague lines of comments cannot replace an afternoon reading of how TEV works.
2014-03-14 22:33:12 +01:00
Tony Wasserka
8b8bb04fd3
PixelShaderGen: Use bit shifts instead of multiplications as a small optimization.
2014-03-14 22:33:12 +01:00
Tony Wasserka
036a8c6951
PixelShaderGen: Clean up tev compare functionality.
2014-03-14 22:33:10 +01:00
Tony Wasserka
fa7173d099
PixelShaderGen: Store tex scale as an integer.
2014-03-14 22:32:30 +01:00
Tony Wasserka
16109fb453
PixelShaderGen: Treat UV coordinates as actual integers.
2014-03-14 22:32:29 +01:00
Tony Wasserka
50526ae50a
PixelShaderGen: Remove some dead code.
2014-03-14 22:32:18 +01:00
Tony Wasserka
065919f599
PixelShaderGen: Perform some of the fog calculations with integers.
2014-03-14 22:31:32 +01:00
Tony Wasserka
605b687af8
PixelShaderGen: Use integer math for z textures.
2014-03-14 22:31:31 +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
3e6efdb53e
LightingShaderGen: Perform more lighting calculations with integers.
2014-03-14 22:31:19 +01:00
Tony Wasserka
387b9bf3c2
LightingShaderGen: Perform some lighting calculations with integers.
2014-03-14 22:31:19 +01:00
Tony Wasserka
78623871f9
ShaderGen: Store material uniforms as integers.
2014-03-14 22:31:19 +01:00
Tony Wasserka
4bf57565e8
ShaderGen: Store light color uniforms as integers.
2014-03-14 22:31:18 +01:00
Tony Wasserka
68e91f0d55
PixelShader: Store fog color as an integer.
2014-03-14 22:31:18 +01:00
Tony Wasserka
0238a56816
PixelShaderGen: Change indirect texture matrix uniforms to use integers.
2014-03-14 22:31:18 +01:00
Tony Wasserka
c13a5c38e9
PixelShaderGen: Change the "alpha" uniform to use integers.
2014-03-14 22:31:18 +01:00
Tony Wasserka
ec60acac3a
PixelShaderGen: Change the "colors" and "kcolors" uniforms to be integers.
2014-03-14 22:31:18 +01:00
Tony Wasserka
df94e62350
PixelShaderGen: Process fog calculations with integer math.
2014-03-14 22:31:18 +01:00
Tony Wasserka
21eb482a6e
PixelShaderGen: Write constants in decimal instead of hexadecimal where appropriate.
2014-03-14 22:31:11 +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
e7a42d884f
PixelShaderGen: prev should be initialized to the proper value; tev output needs to be clamped between -1024 and 1023.
2014-03-14 22:30:16 +01:00
Tony Wasserka
cb1514e082
PixelShaderGen: Remove superfluous registerstate stuff. Also, made alphabump an integer.
2014-03-14 22:30:15 +01:00
Tony Wasserka
a11ae69cb0
PixelShaderGen: Use integer math for TEV combiners.
2014-03-14 22:28:32 +01:00
Tony Wasserka
aaa8e74a68
PixelShaderGen: Use integer math for tev outputs.
2014-03-14 22:28:14 +01:00
Tony Wasserka
654442feb7
PixelShaderGen: Use integer math for tev konst value.
2014-03-14 22:28:12 +01:00
Tony Wasserka
e69ee6ae0a
PixelShaderGen: Remove remaining floating point bits for texture color.
2014-03-14 22:26:50 +01:00
Tony Wasserka
ac1c77c392
PixelShaderGen: Use integer math for rasterizer color.
2014-03-14 22:26:50 +01:00
Tony Wasserka
3ea97f7730
PixelShaderGen: Use integer math for indirect texture coords.
2014-03-14 22:26:50 +01:00
Tony Wasserka
0e711bf520
PixelShaderGen: Use integer math for sampling textures.
2014-03-14 22:26:50 +01:00
Tony Wasserka
1b3b12caa0
PixelShaderGen: Fix an issue where small negative z coordinates would underflow when they shouldn't.
2014-03-14 22:26:50 +01:00
Tony Wasserka
fa77e1d2b6
PixelShaderGen: Use integer math for alpha testing.
2014-03-14 22:26:48 +01:00
Ryan Houdek
22c989de9a
Provide our own dot functions in GLSL since GLSL doesn't provide integer versions of this function, even though AMD and Nvidia provide their own.
2014-03-14 22:26:27 +01:00
Tony Wasserka
bed442198f
PixelShaderGen: Make SampleTexture static inline.
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
Matthew Parlane
25341f88ef
Fixes include order of TextureConversionShader.cpp
2014-03-09 12:38:29 +13: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
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
Tillmann Karras
6914eca167
Fix various warnings reported by clang
...
- mostly remove unused variables
- rename some generic JIT identifiers
2014-02-28 12:28:19 +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
1d0b6a1156
Merge duplicate parts of sampler into header
2014-02-26 11:37:29 +01:00
degasus
11efa88157
calculate constant values on shader compilation
2014-02-26 11:37:29 +01:00
degasus
8a4aa8c1f5
Rewrite texture tiling implementation
...
inline halfxb
So we know which is the first pixel by masking.
inline xl
inline xb a bit
inline yl
inline uv1.x shift
remove likely wrong guessed ternary operator
add pixel layout comment
inline xel
optimize the shifts a bit
inline xb
optimize shifts in a second step
extract xb
rename all variables
calculate cache line by position.x
Revert 5115b459f40d53044cd7a858f52e6e876e1211b4 "optimize the shifts a bit"
It seems I was wrong, the other way is the more natural.
use x_virtual_position instead of uv1.x for x_offset_in_block
This looks more natural and the offset should be masked anyway.
substitude factor with cache_lines
move 32bit logic in a conditional block
2014-02-26 11:37:29 +01:00
degasus
bd3beeb184
TextureConverter: Use Log2() and shifts instead of multiplications/divisions
2014-02-26 11:37:29 +01:00
degasus
f99c8a0b70
merge common parts of encoding shaders
2014-02-26 11:37:28 +01:00
Pierre Bourdon
4ba9cb217f
Fix a compilation error introduced in PR #91 .
...
For some reason it passed builbot-try but didn't build after being merged to
msater. Did not expect that, sorry :(
2014-02-23 03:45:46 +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
ffe588cc24
Fix more header sorting issues in VideoCommon/ (now check-includes clean).
2014-02-20 01:01:10 +01:00
Pierre Bourdon
362dec9c7c
Dolphin now builds on Linux with only Source/Core as include dir
2014-02-18 12:18:47 +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
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
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
5b5dfb384e
MMIO: Port the VideoCommon PE MMIOs to the new interface.
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
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
e5318d2624
move shared parts from VertexManager::vFlush into VideoCommon
2014-02-15 11:33:43 +01: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
Matthew Parlane
32bfcc034f
Some tidy up of sprintf to StringFromFormat
...
Includes a small fix to SetupWiiMemory
2014-02-10 17:25:18 +13: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
Pierre Bourdon
e59f770ccb
Revert "Merge pull request #49 from Parlane/sprintf_tidy"
...
Change broke the build on Debian stable.
This reverts commit 28755439b3
, reversing
changes made to 64e01ec763
.
2014-02-09 16:14:13 +01:00
Matthew Parlane
ebff7974c3
Some tidy up of sprintf to StringFromFormat
2014-02-08 14:32:48 +13:00
Pierre Bourdon
59e2179172
Merge pull request #35 from lioncash/videocommons-kill-xchg-in-statistics
...
[VideoCommon] Eliminate the function Xchg in Statistics.cpp. std::swap does the same thing.
2014-02-04 16:40:25 -08:00
Lioncash
6d9cd07bb9
[VideoCommon] Eliminate the function Xchg in Statistics.cpp. std::swap does the same thing.
2014-02-04 19:35:27 -05: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
Tillmann Karras
8ef57064b2
Silence warning
2014-02-04 01:30:39 +01:00
Lioncash
e96f464eb5
[VideoCommon] Remove references to now non-existant files OpenCL.h and OpenCL/OCLTextureDecoder.h in the Visual Studio vcxproj file.
2014-02-01 21:52:06 -05: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
degasus
31c3bee5bc
VertexShaderGen: fix D3D posmtx attribute regression by VertexLoaderCleanup branch
...
Sorry, I'm too dumb too test my code. I hope this will work fine now.
2014-02-01 11:35:46 +01:00
Tony Wasserka
3dd31fe22b
Merge pull request #11 from degasus/VertexLoaderCleanup
...
Vertex loader cleanup.
2014-01-31 06:13:26 -08:00
degasus
3437c7f060
VideoCommon: small VertexLoader(Manager)? refactoring
2014-01-31 07:31:03 +01: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
Lioncash
0f555d3a47
Remove two references to DX9 in VideoCommon.
...
DX9 isn't a backend anymore, so may as well get rid of them
2014-01-29 14:39:13 -05:00