Unknown W. Brackets
36c8b043f3
d3d9: Fix CLUT4 optimization color creation.
...
Fixes #8385 .
2016-01-04 07:36:47 -08:00
Henrik Rydgård
f0812297a6
Merge pull request #8376 from unknownbrackets/gpu-depth
...
Correct universally for clamped depth range
2016-01-04 09:55:02 +01:00
Henrik Rydgård
f0e19c993d
Merge pull request #8377 from unknownbrackets/minor
...
Improve some ifdef usage, minor GL error fix
2016-01-04 09:44:34 +01:00
Unknown W. Brackets
e427d09628
Determine scaleFactor once per frame.
...
This way, for auto, we can properly treat it like scaleFactor = 1 when the
resolution is small.
2016-01-03 23:06:15 -08:00
Unknown W. Brackets
3aead9584b
Oops, fix typo causing clamping to clamp wrong.
2016-01-03 19:59:59 -08:00
Unknown W. Brackets
da78ec0b4d
Use USING_WIN_UI for desktop Windows console.
2016-01-03 15:10:50 -08:00
Unknown W. Brackets
d165680ee7
Don't assume _MSC_VER / _WIN32 mean x86/x64.
2016-01-03 15:07:36 -08:00
Unknown W. Brackets
529abd7db4
Correct clamped depth range from [0, 65535].
...
This changes a few things:
* All backends clamp the depth range and keep it positive.
* The depth rounding uniform is now properly dirtied.
* Projection is updated to translate and scale appropriately.
* Depth rounding is halved on OpenGL to account for [-1, 1] range.
Fixes Phantasy Star Portable 2 without the need for a game-specific hack.
2016-01-03 12:29:43 -08:00
Henrik Rydgård
8be22f47cd
Merge pull request #8348 from unknownbrackets/texcache
...
Centralize code in the texture cache, minor cleanups
2016-01-01 17:55:41 +01:00
Unknown W. Brackets
fd2e302a66
When possible, replace 5551 stencil with 0xFF.
2015-12-31 17:16:41 -08:00
Unknown W. Brackets
e1599821ea
Split out the 5551 logic to be clearer.
2015-12-31 17:12:12 -08:00
Unknown W. Brackets
64a34a6d92
Handle masking correctly for 5551 stencil rewrite.
2015-12-31 17:01:08 -08:00
Unknown W. Brackets
c31a8f860b
Adjust stencil ops for 5551 and 565 buffers.
...
This attempts to better approximate the operations that actually happen,
where possible. Expected to help #5278 .
2015-12-31 17:01:03 -08:00
Unknown W. Brackets
69daa75228
Move more common code around in texcache.
2015-12-31 11:41:02 -08:00
Unknown W. Brackets
83c4467888
Check for CLUT framebuffers only in VRAM.
2015-12-31 11:13:40 -08:00
Unknown W. Brackets
4f0f1b9582
Validate the mirrors are in range.
...
We apply some things based on the assumption that it's in range inside
AttachFramebuffer, so let's not pass wrong things in.
2015-12-31 11:13:40 -08:00
Unknown W. Brackets
a45f05c598
Move NotifyFramebuffer and LoadClut to common code.
2015-12-31 11:13:39 -08:00
Henrik Rydgård
337f27d0d9
Merge pull request #8340 from unknownbrackets/texcache
...
Be forgiving when maxSeenV increases
2015-12-31 09:43:18 +01:00
gmvbif
281f0e18e6
Fixed some errors from PVS-Studio in Core project
...
FixedSizeQueue
- Added private operator=
- Changed signature of EndPop
Some changed to printf like functions.
Fixed typo in syn-att.c
2015-12-31 10:25:11 +03:00
Unknown W. Brackets
7a864f5aa1
Be forgiving when maxSeenV increases.
...
This still allows us to optimize < 512 heights, but at the same time,
doesn't hit spritesheets as hard and avoids the scaling penalty.
2015-12-30 17:15:50 -08:00
Unknown W. Brackets
c3a031d276
Update xBRZ to 1.4.
...
Now a lot of our customizations aren't needed, yay.
2015-12-30 13:09:38 -08:00
Unknown W. Brackets
f982e777e5
Stop logging alphatested draws for debug stats.
...
Measured a small perf hit here, and we're not really using these stats
much anymore.
2015-12-30 10:24:54 -08:00
Unknown W. Brackets
517d5b7562
Warn when an upscaling shader is being used.
...
Otherwise it's potentially confusing that it doesn't change. See #8310 .
2015-12-27 12:05:12 -08:00
Unknown W. Brackets
2e0f9e5603
Apply prescale to generated UVs with speedhack.
2015-12-20 20:47:36 -08:00
Henrik Rydgård
5827b583d3
Merge pull request #8240 from unknownbrackets/clut-render
...
Initial CPU side render-to-clut handling
2015-11-27 00:08:08 +01:00
Unknown W. Brackets
8e2557bafe
Support render-to-clut, at least in some cases.
...
This is pretty much only tested with Brave Story. See #6754 .
There may be other cases which are not handled yet.
2015-11-26 13:31:17 -08:00
Unknown W. Brackets
7bfe100b0f
Fix some unused variable warnings.
...
The CheckAlpha one looks like it will matter.
2015-11-25 16:11:53 -08:00
Unknown W. Brackets
c22953a4b9
Treat invalid blend factors as fixed consistently.
2015-11-19 06:48:06 -08:00
Unknown W. Brackets
eb5072bba5
Warning fixes.
2015-11-18 21:56:05 -08:00
Unknown W. Brackets
bf7f07f918
Optimize inverse blending modes, where possible.
...
Also, take advantage of cases where we can double src and src.a in the
shader, which can in some cases get us closer to accurate.
2015-11-14 12:37:32 -08:00
Henrik Rydgard
3acdd4e237
We had two global types called FBO, which is not ok. Fix that.
...
This caused some very strange behaviour in the MSVC debugger when looking at this stuff.
2015-11-14 13:24:51 +01:00
Henrik Rydgard
fadb19acc6
Remove a very minor difference between the backends in state mapping
2015-11-14 09:56:36 +01:00
Unknown W. Brackets
13a09647e2
d3d9: Disable shader blending, not implemented.
...
Fixes bad graphics in Ridge Racer, etc.
2015-11-13 23:11:06 -08:00
Henrik Rydgard
df94914a63
D3D: No need to convert blendcolor to float and back
...
Fix bug with constantAlpha
Remove misleading comment, thanks unknown
2015-11-12 18:11:23 +01:00
Henrik Rydgard
4a71d4cda2
The ConvertBlendState machinery is now pure, so move it out to GPU/Common
2015-11-12 18:11:20 +01:00
Henrik Rydgard
091fb28f55
Extract the glstate.blendcolor call from ConvertBlendState
2015-11-12 18:11:19 +01:00
Henrik Rydgard
71103cb0ca
Make ConvertBlendState into a reasonably pure function with no side effects
2015-11-12 18:11:15 +01:00
Henrik Rydgard
e97d771e0f
Extract blend state mapping into a function.
2015-11-12 15:57:33 +01:00
Henrik Rydgard
a6ced1d0b4
Move viewport/stencil conversion out into GPUStateUtils.cpp, use it in D3D as well.
...
D3D bugfixes. Not perfect yet.
2015-11-09 21:21:54 +01:00
Henrik Rydgard
aac0cd3227
Minor consistency improvement between d3d and opengl code
2015-11-05 00:08:48 +01:00
Unknown W. Brackets
2b832e7f6c
Zero out dst blend factors in 565.
2015-11-04 00:35:55 -08:00
Unknown W. Brackets
5ff3e6a5e7
Avoid polluting glstate in GetTempFBO().
...
Since we do this "late", we might overwrite important settings, such as
stencil, color masks, etc.
This affects both depal and fbo shader blending.
Didn't do it for all ClearBuffer()s, since I'm worried some might be
intentionally resetting state.
2015-11-03 22:37:19 -08:00
LunaMoo
71a0928d6b
Flip display layout editor coordinates to match #8130:)
2015-11-03 00:28:47 +01:00
Henrik Rydgard
b411fc0455
Postproc: Scale pixel deltas and round off screen position. Fixes #8016
2015-11-02 22:22:48 +01:00
Henrik Rydgard
099f62b503
Fix some typos in D3D9 blits (removed parameter).
...
Add some missing projection matrix flips (flipped viewport emulation)
Fix issue with DrawPixels in non-buffered in D3D9
2015-11-02 20:11:48 +01:00
Henrik Rydgard
6b2862284b
Minor cleanups
2015-11-02 20:09:59 +01:00
Henrik Rydgard
0266211b88
Two wrongs can appently make a right. Remove an inadvertent flip, add flips where we actually need them.
2015-11-02 20:09:24 +01:00
Henrik Rydgard
86bfce4006
Remove more obsolete v-flip support
2015-11-02 20:09:12 +01:00
Henrik Rydgard
c1db771056
Fix non-through rectangles
2015-11-02 20:08:11 +01:00
Henrik Rydgard
f4248cb550
Remove a whole lot of flipping special cases
2015-11-02 20:07:30 +01:00
Henrik Rydgard
f3b1fca68b
Allow resizing the screen in windowed mode
2015-11-02 19:36:14 +01:00
LunaMoo
ae1cf1d85d
Add Display layout editor to use for example on tablets, but also includes automatic screen cropping for 16:9 cases(default).
...
//Rebased & removed atlas stuff which was added with #8096
//squashed with some improvements
2015-10-31 20:50:02 +01:00
Sacha
bbc4f64999
MIPS: Fix build so we can compile this again.
2015-10-29 02:46:43 +00:00
Unknown W. Brackets
c41b981333
Oops, undelete shader bits for alpha test.
2015-10-24 23:05:18 -07:00
Unknown W. Brackets
97c568dca6
Tweak to shader desc.
2015-10-24 23:05:09 -07:00
Unknown W. Brackets
06f2c7f1fe
Maintain hasTexcoord even for UV gen.
2015-10-24 21:26:12 -07:00
Unknown W. Brackets
5595d1278d
Merge pull request #8103 from hrydgard/d3d-shader-id
...
D3D: Generate shaders from shader IDs, just like in GL
2015-10-24 21:19:34 -07:00
Henrik Rydgard
838e53f482
Delete disabled code to use built-in alpha test on DX9.
2015-10-25 01:26:38 +02:00
Henrik Rydgard
56814ad52d
SW skinning (ARM32, x86): Don't convert more bone matrices than necessary
...
Was already fixed on ARM64.
2015-10-25 00:51:47 +02:00
Henrik Rydgard
85229efef4
D3D9: Generate shaders directly from shader IDs, just like we do in GL.
2015-10-25 00:34:23 +02:00
Henrik Rydgard
edafa9bc17
Centralize the GPU state conversion functions
2015-10-24 23:49:05 +02:00
Henrik Rydgard
92389a4966
Use a common ShaderId class. Start moving shader ID code to GPU/Common
2015-10-24 23:24:06 +02:00
Henrik Rydgard
6a373fe09a
Make it possible to view vertex decoders through the shader viewing mechanism (even though they aren't strictly shaders, they fit the model).
2015-10-24 10:41:31 +02:00
Henrik Rydgård
70e99791aa
Merge pull request #8019 from LunaMoo/scaling_shaders
...
Add 5xBR and scaling to existing 4xHQ
2015-10-14 20:58:19 +02:00
LunaMoo
9543250863
Add new postshader setting "upscaling"
2015-10-14 18:32:13 +02:00
Henrik Rydgard
7f4e473e8c
Add new shader viewing tool
2015-10-14 18:10:21 +02:00
Henrik Rydgard
8107cb4423
Hopefully this will help issue #7969
2015-10-04 10:08:20 +02:00
Henrik Rydgard
d3b265a3e4
Fix render resolution race condition. Should help #8002
2015-09-27 20:00:47 +02:00
Henrik Rydgard
70cb4372c1
Assorted fixes to auto resolution. Fixes too low resolution and also #8002 , plus notification spam
2015-09-25 19:10:09 +02:00
Unknown W. Brackets
400b8886e6
Use the framebuf->height for offset calculation.
...
This way if we shrunk the framebuffer, it'll still work.
2015-09-23 23:59:39 -07:00
Unknown W. Brackets
bb18fa4cd9
Allow framebufs to get smaller in expected size.
...
This doesn't change the buffer size, but it does change the recorded size,
which effects how we calculate things about them.
2015-09-23 23:57:59 -07:00
Henrik Rydgard
ec63663ad5
More consistent handling of resolution changes. Should help #7995
2015-09-23 12:25:38 +02:00
Henrik Rydgard
4d18d478a0
Sample renderWidth/pixelWidth/height once per frame for the framebuffer manager.
2015-09-19 16:19:03 +02:00
Unknown W. Brackets
a66bc633f6
Fix nearest framebuffer check.
...
Broken in 454a363
.
2015-09-16 20:05:55 -07:00
Unknown W. Brackets
3233116749
Use fixed regs for uv bounds check in arm64.
2015-09-13 15:06:29 -07:00
Unknown W. Brackets
dff4aeb30f
Correct uv bound pointers in arm vertexjit.
2015-09-13 14:55:10 -07:00
Unknown W. Brackets
93e9d6cd56
Respect framebuffer offset in fb copies.
...
We need to offset the copy coordinates also, or we'll copy the wrong
thing.
2015-09-13 11:35:15 -07:00
Unknown W. Brackets
62de281e35
Use texture UV range to optimize framebuf copies.
2015-09-13 11:34:52 -07:00
Unknown W. Brackets
f4df7f076e
Hash less of 512 tall textures when possible.
...
This allows xBRZ to work better on such textures, and also may reupload
them less frequently.
2015-09-13 11:15:57 -07:00
Unknown W. Brackets
31106d063c
Fix MSVC 2015 highlighting for ARM/ARM64.
2015-09-13 10:02:55 -07:00
Unknown W. Brackets
72a73045bb
Add uv range to arm64 and non-jit decoders.
2015-09-13 10:01:37 -07:00
Unknown W. Brackets
5c233fa545
Add initial decoding check for uv bounds.
2015-09-13 10:00:33 -07:00
Unknown W. Brackets
c7e6f051e4
Split the texture application into two stages.
...
The latter simply applies the texture.
This makes our IsAlphaTestTriviallyTrue() check correct.
2015-09-13 09:30:39 -07:00
Unknown W. Brackets
71afaffc20
Pack texture cache entries just a bit tighter.
2015-09-13 06:43:47 -07:00
Unknown W. Brackets
7d63a10fdd
Centralize texture cache entry structures.
2015-09-13 06:43:37 -07:00
Unknown W. Brackets
e1df8fc45f
Centralize sampling params and test optimizations.
2015-09-13 06:38:07 -07:00
Unknown W. Brackets
e0f85a9c6b
Native merge part 1: skip native/ in includes.
2015-09-06 12:19:33 -07:00
Henrik Rydgard
ab3468ea02
Move native/gfx_es2/gl_state.cpp/h into GPU/GLES/GLStateCache.cpp/h
2015-09-06 13:45:17 +02:00
Unknown W. Brackets
764539f814
Clean up GLES logic used in shader gen.
2015-09-05 16:44:17 -07:00
Unknown W. Brackets
2d0635c3e6
Cut out a bit more USING_GLES2.
2015-09-05 16:28:46 -07:00
Henrik Rydgard
1c0158bfe6
Further reduce the use of ifdef USING_GLES2 and friends.
2015-09-05 23:39:10 +02:00
Henrik Rydgard
9e18fb7e90
Round Z in the vertex shader to match a 16-bit Z buffer.
...
However this inexplicably does still not solve the Phantasy Star issue!
2015-08-26 15:25:21 +02:00
Henrik Rydgard
1e8a1b801f
Rename viewportX1/X2 etc to scale + center, which is what they actually are.
2015-08-26 15:24:35 +02:00
Henrik Rydgard
29fc9e81a4
Use the gstate.getViewport* accessors.
2015-08-26 15:24:35 +02:00
Unknown W. Brackets
ba15718db3
Track hovering in GE debugger to show pixel value.
...
This works for texture, framebuffer, depth, and stencil.
Importantly, allows debugging the actual depth values present.
2015-08-23 09:25:05 -07:00
Henrik Rydgard
d7f4c47c22
Refactor: Even more getting rid of gstate access in the framebuffer manager.
2015-08-05 12:13:14 +02:00
Henrik Rydgard
d7c76cb1da
Refactor: More work towards getting rid of gstate accesses from the framebuffer manager
2015-08-05 11:51:24 +02:00
Henrik Rydgard
454a363876
Reorganize all the gstate fetching in FramebufferCommon to one place
2015-08-05 11:36:02 +02:00
Henrik Rydgard
d26b74d4d6
GPU refactor: Move accesses to gstate out of leaf functions
2015-08-05 01:03:49 +02:00
Henrik Rydgard
c8fe0b2690
Minor simplification, buildfixes
2015-07-29 12:38:31 +02:00
Henrik Rydgard
2430c283a5
More GPU cleaning, removing uses of GPUState.h where not needed.
...
Want to get rid of direct accesses to GPUState in modules that may be reused in
my future next-gen backends, that will reformat display lists into command lists that will
then be optimized and executed, out of sync with the real GPUState.
Candidate modules that may be reused in full are Framebuffer and Depal, possibly TextureCache to some degree.
2015-07-29 12:37:49 +02:00
Henrik Rydgard
33246ffc8d
Non-x86 buildfix
2015-07-29 12:19:15 +02:00
Henrik Rydgard
38a31fbd8b
Get rid of more uses of gstate from SplineCommon
2015-07-29 12:04:52 +02:00
Henrik Rydgard
cde585a29a
Include dependency cleanup
2015-07-29 11:48:20 +02:00
Henrik Rydgard
53f062b7b2
refactor: Remove some uses of gstate from SplineCommon and a fex texcache functions
2015-07-29 11:40:45 +02:00
Henrik Rydgard
aae254254b
Fix bad cleanup change, thanks to tapcio for pointing it out in 07b17560f
2015-07-28 01:09:48 +02:00
Unknown W. Brackets
7f8cf7f800
arm64: Use XXH64 for vertex hashing, etc.
...
Based on benchmarks, it performs better than XXH32 on an A57.
2015-07-22 21:38:01 -07:00
Unknown W. Brackets
a98706f813
arm64: Correct some offset snapping.
2015-07-05 08:59:36 -07:00
Unknown W. Brackets
46c1030530
arm64: small optimization for weights.
2015-07-05 08:35:51 -07:00
Unknown W. Brackets
809f398760
arm64: Set vertexFullAlpha.
2015-07-05 00:17:06 -07:00
Unknown W. Brackets
37bc3cd347
arm64: Optimize some texcoord and normal decode.
2015-07-04 23:40:11 -07:00
Unknown W. Brackets
f8bb7f3c52
arm64: Optimize pos and nrm conversions.
2015-07-04 18:22:16 -07:00
Unknown W. Brackets
75c8ccd2c1
arm64: Update emitter from Dolphin.
...
From dolphin-emu/dolphin@d09d59007a .
2015-07-04 00:00:28 -07:00
Henrik Rydgard
3587b36f86
Minor cleanups in BackgroundAudio and ARM64 vtx dec. Update native.
2015-06-22 00:09:02 +02:00
Unknown W. Brackets
0597b92998
For consistency, push fp regs here too.
2015-06-14 09:24:56 -07:00
Henrik Rydgard
e848247f88
ARM64: Also save FP registers around the JIT dispatcher loop
2015-06-14 13:03:46 +02:00
Henrik Rydgard
2c05334d47
ARM64: Fix bug where we didn't save the FP registers correctly in the vertex decoder.
...
Also port a few ops from dolphin's ARM64 emitter.
2015-06-14 12:56:44 +02:00
Henrik Rydgard
cc6db7a8df
Declare DoTexSwizzle16 outside #ifdef _M_SSE, fixing build on ARM
2015-06-14 11:25:18 +02:00
Unknown W. Brackets
401bd35691
Swizzle video texture data on write to mirrors.
2015-06-13 16:29:56 -07:00
Henrik Rydgard
5736f3aba6
Shouldn't check for NEON on ARM64
2015-06-11 12:44:45 +02:00
Henrik Rydgård
2a1f6bca97
Fix NEON 4444 CheckAlpha, workaround for failed bNEON detection on ARM64
2015-05-31 12:29:08 +02:00
Henrik Rydgård
7b50ec7b75
Merge branch 'CheckAlphaNEON' of git://github.com/KentuckyCompass/ppsspp into KentuckyCompass-CheckAlphaNEON
2015-05-31 12:00:10 +02:00
Jan Beich
5f278b2d94
Unbreak build with SSE 4.1 (clang -march=penryn)
...
Common/ColorConv.cpp:199:33: error: use of undeclared identifier '_mm_packus_epi32';
did you mean '_mm_packs_epi32'?
_mm_store_si128(&dstp[i / 2], _mm_packus_epi32(c1, c2));
^~~~~~~~~~~~~~~~
_mm_packs_epi32
/usr/bin/../lib/clang/3.6.0/include/emmintrin.h:1254:1: note: '_mm_packs_epi32'
declared here
_mm_packs_epi32(__m128i __a, __m128i __b)
^
Common/ColorConv.cpp:241:33: error: use of undeclared identifier '_mm_packus_epi32';
did you mean '_mm_packs_epi32'?
_mm_store_si128(&dstp[i / 2], _mm_packus_epi32(c1, c2));
^~~~~~~~~~~~~~~~
_mm_packs_epi32
/usr/bin/../lib/clang/3.6.0/include/emmintrin.h:1254:1: note: '_mm_packs_epi32'
declared here
_mm_packs_epi32(__m128i __a, __m128i __b)
^
2 errors generated.
GPU/Common/TextureScalerCommon.cpp:294:6: error: unknown type name '__m128'
__m128 result = _mm_set1_ps(0.0f);
^
GPU/Common/TextureScalerCommon.cpp:294:22: error: use of undeclared identifier
'_mm_set1_ps'
__m128 result = _mm_set1_ps(0.0f);
^
GPU/Common/TextureScalerCommon.cpp:305:9: error: unknown type name '__m128i'
__m128i samp...
^
GPU/Common/TextureScalerCommon.cpp:305:26: error: use of undeclared identifier
'_mm_cvtsi32_si128'
...__m128i sample = _mm_cvtsi32_si128(data[csy*w + csx]);
^
GPU/Common/TextureScalerCommon.cpp:307:9: error: unknown type name '__m128'
__m128 col ...
^
GPU/Common/TextureScalerCommon.cpp:308:31: error: use of undeclared identifier
'_mm_set1_ps'
...col = _mm_mul_ps(col, _mm_set1_ps(weight));
^
GPU/Common/TextureScalerCommon.cpp:314:6: error: unknown type name '__m128i'
__m128i pixel = _mm_cvtps_epi32(_mm_...
^
GPU/Common/TextureScalerCommon.cpp:314:57: error: use of undeclared identifier
'_mm_set1_ps'
...__m128i pixel = _mm_cvtps_epi32(_mm_mul_ps(result, _mm_set1_ps(bicubicInvSum...
^
8 errors generated.
2015-05-26 15:20:10 +03:00
KentuckyCompass
880697f40a
Add NEON versions of the CheckAlpha family
2015-05-25 18:04:52 -07:00
Unknown W. Brackets
ba77ad607e
Erp, dumb typo.
2015-05-25 15:47:14 -07:00
Henrik Rydgård
43744b0239
Merge pull request #7741 from hrydgard/frame-profiler
...
Frame profiler overlay
2015-05-26 00:42:01 +02:00
Henrik Rydgard
0b2a1dfe53
Profile a few more scopes
2015-05-26 00:39:27 +02:00
Unknown W. Brackets
5d244229ba
Silence a type conversion warning.
2015-05-25 10:07:05 -07:00
Unknown W. Brackets
f78acfb867
Cleanup a few things in SSE CheckAlpha.
2015-05-25 07:39:31 -07:00
Unknown W. Brackets
c75010931c
Use SSE in CheckAlpha scanning.
2015-05-24 22:55:43 -07:00
Henrik Rydgard
26624709f7
Hook up the frame profiler to a few measurements
2015-05-24 23:45:36 +02:00
Unknown W. Brackets
4880c29a90
Use TextureDecoderNEON funcs statically on arm64.
...
Not sure if they were being used before (HAVE_ARMV7...?)
2015-05-23 11:30:05 -07:00
Henrik Rydgård
83182a0469
Merge pull request #7739 from hrydgard/screen-rotation
...
Implement basic screen rotation as requested in #297
2015-05-18 16:31:19 +02:00
Unknown W. Brackets
c6b55459b1
vertexjit: Skip soft skinning setup when morphing.
...
This makes x86 match arm.
2015-05-16 21:47:13 -07:00
Henrik Rydgard
95b6b50fd5
Disable screen rotation in non-buffered rendering (as it won't worK)
2015-05-12 22:44:18 +02:00
Henrik Rydgard
3f7830743a
Implement basic screen rotation as requested in #297 . Does not work correctly in non-buffered rendering yet.
2015-05-12 21:01:15 +02:00
Henrik Rydgard
5d0d67140f
Reverse Y when checking for rotated rects in Direct3D 9. Fixes #7738 .
2015-05-12 20:01:04 +02:00
Unknown W. Brackets
b782165b6a
Avoid some division.
2015-05-10 14:39:38 -07:00
Unknown W. Brackets
a090b5853f
Process UV rotation even in full transform.
2015-05-10 14:17:20 -07:00
Unknown W. Brackets
c8fc9b0bf3
Cleanup some incorrect handling of clut offset.
2015-04-26 00:31:00 -07:00
Unknown W. Brackets
5b61c03b7f
Avoid accidental sign ext for > 24 bit clut shift.
2015-04-26 00:26:24 -07:00
Unknown W. Brackets
5ee062c681
Try to optimize bezier color sampling.
2015-04-18 12:47:21 -07:00
Unknown W. Brackets
327ca4c96e
Stub invalid vertex decoder colors to avoid crash.
...
These values are invalid, but before we'd call a null pointer if we hit
them. Should do tests to see what actual behavior is.
2015-04-17 23:24:21 -07:00
Henrik Rydgard
a9ff7c22fe
Reject too-small spline patches. Might help #7690 .
2015-04-17 08:33:05 +02:00
Henrik Rydgard
68893c763f
Spline: Fix an unrelated kind-of-bug
2015-04-16 18:32:37 +02:00
Henrik Rydgard
6587f4de8f
Spline: Fix #7684 by removing awful epsilons that "fixed" off-by-ones depending on vertex count because of fp rounding.
2015-04-16 18:32:13 +02:00
Henrik Rydgard
2e38762708
Spline: Add commented-out sanity check for debugging
2015-04-16 18:22:08 +02:00
Henrik Rydgard
b3305246a3
Spline: Not that it should matter, but move the patch_div clamping down after the subsampling
2015-04-16 18:18:49 +02:00
Henrik Rydgard
6bc9a525f8
Spline: remove n and m, confusing
2015-04-16 18:14:46 +02:00
Unknown W. Brackets
be7d1d1169
Add a bit of a hack for smaller framebuf memcpys.
...
Hopefully this doesn't false-positive in any other games. Helps Valkyrie
Profile's battle entry effect.
2015-04-12 11:05:28 -07:00
Unknown W. Brackets
fa85229d3d
Use a temporary for more code clarity.
...
Static analysis thinks there are typos here. Temporary is clearer and
possibly faster depending on compiler intelligence.
2015-04-10 11:48:45 -07:00
Henrik Rydgard
a19ea78b4b
Consolidate the texture scaler code.
2015-04-08 22:52:49 +02:00
Henrik Rydgard
c2cf2bd97e
Move some more color conversion functions to ColorConv
2015-04-08 22:52:47 +02:00
Henrik Rydgard
31961eace9
Color conv attempt 2. Start consolidating simple color conversion functions in a single header+cpp.
2015-04-08 22:52:46 +02:00
Henrik Rydgård
a67f009679
Merge pull request #7668 from hrydgard/consolidate-spline
...
Consolidate spline code
2015-04-08 22:20:55 +02:00
Henrik Rydgard
058499e5bf
De-dupe the spline code
2015-04-08 21:44:54 +02:00
Henrik Rydgard
2002576e9d
DrawEngineCommon: Make it possible to call Flush from shared code.
2015-04-08 21:37:54 +02:00
Henrik Rydgard
ed8a3eaf6d
Move the vertex decoder cache into DrawEngineCommon
2015-04-08 21:35:00 +02:00
Unknown W. Brackets
10626e356d
Avoid a potential divide by zero.
2015-04-08 11:57:59 -07:00
Henrik Rydgård
d0b35e88a2
No need to generate a zero register..
2015-04-06 18:13:46 +02:00
Henrik Rydgård
a7b7fedc9f
Cleaup. Add a missing vertex dec func.
2015-04-06 18:13:45 +02:00
Henrik Rydgård
4bd95b0cb7
ARM64: Fixup software skinning. Now seems to work, at least in a bunch of games..
2015-04-06 18:13:45 +02:00
Henrik Rydgård
459ba28655
ARM64: SW skinning runs without crashing but is broken.
2015-04-06 18:13:44 +02:00
Henrik Rydgård
f937b4b74b
ARM64 vtxdec: Basic implementation of the 16-bit color formats
2015-04-06 18:13:43 +02:00
Henrik Rydgård
597595f279
ARM64: Start implementing soft-skinning. Disabled for now, needs work.
2015-04-06 18:13:43 +02:00
Henrik Rydgård
a710abb58b
A bunch more vertex decoder funcs
2015-04-06 18:13:41 +02:00
Henrik Rydgård
fbaffdceab
Remove some outdated comments, minor stuff
2015-04-06 18:13:36 +02:00
Henrik Rydgard
ff758f58ad
ARM64: The Return of the Pointer Truncator - The Movie
2015-04-06 18:13:26 +02:00
Henrik Rydgard
db0fd1042f
Add "Arm64EmitterTest" which can run on startup to play around with instructions.
2015-04-06 18:13:26 +02:00
Henrik Rydgard
1e9fdf08c5
Temporarily disable vertexjit
2015-04-06 18:13:23 +02:00
Henrik Rydgard
5496b3d3b1
ARM64: Some minor vertex decoder work. Hm, I think SCVTF will actually divide by 128.0, not 127.0 :/
2015-04-06 18:13:20 +02:00
Henrik Rydgard
a12e448fb4
ARM64: Stub vertex decoder jit, implementing just enough for the cube.elf cube.
2015-04-06 18:13:18 +02:00
Henrik Rydgard
b309c83973
Initial work on ARM64, based on the ARM jit.
2015-04-06 18:13:01 +02:00
Unknown W. Brackets
7e0489c83e
Keep better track of framebuf usage flags.
2015-03-14 15:21:58 -07:00
Unknown W. Brackets
39cb74a8d3
Simplify transform in throughmode/sw (rectangles.)
...
This should make it a bit faster, a bit less work.
2015-03-08 13:12:13 -07:00
Unknown W. Brackets
a04af187ea
Fix 16-bit indexed rectangles.
...
This was causing us to draw double the rectangles. 8-bit indexed
rectangles are already correct.
2015-03-07 19:52:09 -08:00
Unknown W. Brackets
818627801d
Fix newlines in old merge, oops.
...
This is now showing up in git because I touched it, and it's got the wrong
newlines. Just making it go away.
2015-03-01 18:35:28 -08:00
Unknown W. Brackets
105087d367
dx9: Swap depal bgra in shader.
...
We don't swap palettes anymore, except in the shader.
2015-03-01 11:28:06 -08:00
Unknown W. Brackets
1dfecbf2b8
d3d: Actually upload the clut texture.
2015-03-01 11:27:28 -08:00
Henrik Rydgard
78190f3e8c
DX9: Hook up the depalettize code. Doesn't work yet though.
2015-03-01 11:24:45 -08:00
Henrik Rydgard
0c9f541a43
Move depalettize-shader generator to Common
2015-03-01 11:15:27 -08:00
Chin
37f50a3792
Change to pass some arguments by reference
2015-03-01 16:49:00 +01:00
Henrik Rydgard
aeb03d1bc9
Workaround for crash in Pangya Fantasy Golf reported in #6398
...
(Simple sanity check when decoding software skinned vertices)
2015-03-01 15:33:34 +01:00
Unknown W. Brackets
b25c2de369
Allow block transfers from 0 that are too tall.
...
Hopefully this is safe.
2015-02-28 01:28:53 -08:00
Unknown W. Brackets
6294ecf64b
Prevent GE debugger crash on bad vertex addr.
2015-02-27 20:45:21 -08:00
Henrik Rydgård
3bf86dc340
Merge pull request #7513 from unknownbrackets/spline-minor
...
Improve spline performance
2015-02-26 21:56:31 +01:00
Unknown W. Brackets
945ff359b2
Detect SSE4.1 support better when compiling.
2015-02-25 19:53:31 -08:00
Unknown W. Brackets
647e841959
Use SSE in spline value generation too.
2015-02-25 19:51:10 -08:00
Unknown W. Brackets
588efa5a71
Use SSE4.1, if available, for spline normals.
2015-02-25 19:28:52 -08:00
Unknown W. Brackets
f070d6f5ed
Use SSE when generating spline normals.
2015-02-25 19:22:48 -08:00
Unknown W. Brackets
29e6197e6f
Floor float z coords in throughmode.
...
Fixes #6766 in 32-bit mode only.
2015-02-22 21:04:48 -08:00
Unknown W. Brackets
8e19f568d7
Optimize spline weighting using SSE and templates.
...
Makes the Thundaga spell much more survivable on a i7, at least.
2015-02-22 13:24:48 -08:00
Henrik Rydgard
2290a6165e
Try to fix glitch reported in #7457 in PHOTOKANO
2015-02-12 11:44:06 +01:00
Henrik Rydgard
96ecb9a160
IndexGenerator: Add back a line that got lost in af46d17b
2015-02-11 21:55:05 +01:00
Peter Tissen
6f2962e0c3
make sure all the counters are increased by the correct value
2015-02-02 22:30:47 +01:00
Peter Tissen
4a150bead7
don't try to access past the number of vertices when drawing rectangles
2015-02-02 22:08:33 +01:00
Henrik Rydgard
033798c796
Expand spline data into a separate buffer. Prevent overflowing it by reducing the size of spline draws if necessary (but shouldn't really happen).
...
Might help #7386
2015-01-29 16:04:00 +01:00
Henrik Rydgard
f55e0abc93
Experiment, trying to fix #7336 : Make sure that a clear is the very first thing to happen in a frame.
...
Also a minor warning fix.
2015-01-26 00:25:48 +01:00
Luna
9c544de689
Oops, that's what I get for copy&paste:P
2015-01-23 12:39:19 +01:00
Luna
ff9d33d2a7
Move the hack to FramebufferCommon.cpp and rename.
2015-01-23 10:40:49 +01:00
Henrik Rydgard
cae58cafee
Revert "Merge pull request #7361 from hrydgard/color-conv-centralize"
...
This reverts commit f1b57dabf5
, reversing
changes made to 41001637ce
.
2015-01-22 19:53:32 +01:00
Henrik Rydgard
9c64351578
Revert "Fix issues with scaling ARGB1555 textures in OpenGL, introduced by the recent merge"
...
This reverts commit 08eaa6e1f7
.
2015-01-22 19:52:49 +01:00
Henrik Rydgard
08eaa6e1f7
Fix issues with scaling ARGB1555 textures in OpenGL, introduced by the recent merge
2015-01-20 22:48:39 +01:00
Henrik Rydgard
7faddd6100
Consolidate the two TextureScaler copies into one.
...
Also lets us clean up ColorConv slightly.
2015-01-20 17:32:55 +01:00
Henrik Rydgard
2623a48b4a
Centralize color conversion functions in Common/ColorConv.
2015-01-20 17:32:54 +01:00
Unknown W. Brackets
05feac3eb0
Fix a potential divide by zero.
2015-01-19 08:43:43 -08:00
Unknown W. Brackets
340029f333
Avoid a bad buffer access on GE_PRIM_KEEP_PREVIOUS.
2015-01-17 18:43:01 -08:00
Henrik Rydgard
c2500744e1
D3D9 rectangle rendering fix (maxindex)
2015-01-15 23:58:07 +01:00
Unknown W. Brackets
d663cda2de
Transform rects using indices.
...
Not a hge difference. Minor cleanup.
2015-01-15 12:26:35 -08:00
Henrik Rydgard
2cc1bd327a
Make the reporting option more prominent. Also move a few options around.
...
Very minor change in indexgenerator.
2015-01-11 00:12:32 +01:00
Unknown W. Brackets
5cea64316a
Avoid using an offset framebuffer for large tex.
...
When texturing from the entire 512 height of a framebuffer, we still
should not trigger the offset framebuffer code. This is expected to help
Danball Senki BOOST but not break Breath of Fire 3.
2015-01-06 20:57:19 -08:00
Unknown W. Brackets
06e9d7680a
Handle a case of 480x360 framebuffers.
...
Region and scissor are 480x360, but viewport is just default (also,
throughmode is on.) We could add more checks, but just the height being a
bit higher is already unusual, so should be relatively safe.
Fixes #7277 .
2015-01-06 00:02:05 -08:00
Unknown W. Brackets
7f7bf937fc
Scale UVs in through and non-through.
...
This also shows them scaled to the w/h in the vertex preview, which is
probably easier to read and matches positions.
Additionally, fixes textures drawn fully not being highlighted at all.
2015-01-03 17:16:16 -08:00
Unknown W. Brackets
7ecff0acd6
Support more screenshot framebuffer formats.
2014-12-31 16:17:23 -08:00
Unknown W. Brackets
962d8c5224
dx9: Take screenshots (fixes #7197.)
2014-12-20 08:31:56 -08:00
Unknown W. Brackets
2e9f492b24
Silence an initialization warning.
...
Pretty sure it's wrong but this isn't that hot anyway.
2014-12-13 18:36:28 -08:00
Unknown W. Brackets
7ed67ad066
Use floats and SSE for spline colors.
2014-12-13 10:36:09 -08:00
Unknown W. Brackets
e130c1648d
Clean up some conversion warnings.
2014-12-13 10:35:47 -08:00
Henrik Rydgård
5d6d552e57
Merge pull request #7175 from xebra/spline_bezier
...
Improve spline/bezier tesselation
2014-12-13 17:45:15 +01:00
xebra
43e3028add
[spline/bezier]Writing vertices to the buffer directly.
2014-12-14 01:08:00 +09:00
Lioncash
dc436aebe8
GPU: Get rid of unused variable warnings
2014-12-12 09:29:41 -05:00
xebra
51a5935d9a
[spline/bezier]Bernstein function does not need to calculate at the edges.
2014-12-10 01:50:28 +09:00
xebra
9a83c99e19
[spline/bezier]Precompute bernstein derivative functions.
2014-12-10 01:41:02 +09:00
xebra
8ef4a61bf6
[spline/bezier]Spline subdivision counts should be 2 or higher. Related to #4234 #7111
2014-12-09 02:42:52 +09:00
Lioncash
a962bc5a6c
Mark some functions as const
2014-12-07 17:08:13 -05:00
xebra
f6b937fe59
[spline/bezier]Fix sometimes spline disappear in medium quality. Reported on #7111 .
2014-12-03 01:49:08 +09:00
xebra
2d59a15ade
[spline/bezier]Fix spline tex coords correctly, it seems perfect!
2014-12-03 01:26:40 +09:00
xebra
ad22ffc679
[spline/bezier]Support medium quality. It's half of high quality. High quality is the original.
2014-11-26 12:23:02 +09:00
xebra
8cc7d8c71a
[spline/bezier]Fix patch subdivision counts correctly.
2014-11-25 23:47:29 +09:00
xebra
f0ef073307
Fix NormalizeVertices() for indexed vertices.
2014-11-25 21:24:54 +09:00
xSacha
88b1c00a67
MIPS: Complete MIPSX rename for buildfix.
2014-11-19 07:55:44 +10:00
xSacha
3172fa22e2
Integrate new MIPS emitter.
2014-11-18 08:40:57 -08:00
Henrik Rydgard
4422b3deb7
x86: Minor soft-skinning optimization
2014-11-16 17:43:29 +01:00
Sacha
92b0f3b7d9
Minor change. Fix build.
2014-11-13 23:45:45 +10:00
xSacha
57e4088216
Introduce fake vertex decoder JIT as well.
...
Compiles and links on CI20 but gets unknown crash in GL driver.
2014-11-13 17:10:29 +10:00
Unknown W. Brackets
c02172ebd5
vertexjit: Oops, this wasn't supposed to be there.
...
Fixes #7081 .
2014-11-11 08:31:27 -08:00
Unknown W. Brackets
a838459627
vertexjit: Optimize weights on x64 (not 32-bit.)
...
A few percent in Gods Eater Burst and Kingdom Hearts.
2014-11-08 15:16:02 -08:00
Unknown W. Brackets
eee3ac79f4
Always clamp in ToRGB[A]?().
...
Before we only clamped with SSE, better to be consistent. This may also
be slightly faster.
2014-10-31 09:07:54 -07:00
Unknown W. Brackets
1b12b57e21
Fix reversed consts in hand-neon texhash.
2014-10-29 16:38:40 -07:00
Unknown W. Brackets
faea860c27
Attempt to match the SSE2 version of the hash.
...
Not tested, don't currently have an ARM device. May or may not have a
performance hit.
2014-10-29 16:37:45 -07:00
Unknown W. Brackets
3977f5a8ec
Add a non-SSE implementation of the QuickTexHash.
...
This way we can use it as a stable value for texture replacements.
2014-10-29 16:37:44 -07:00
Unknown W. Brackets
2b16b5b79b
Use XXH64 on 64-bit systems.
...
I'm not able to reproduce any real performance difference, but I know
there are some games which do more hashing and it may help there.
2014-10-26 17:49:24 -07:00
Henrik Rydgard
d24abb3af0
More GetPointer cleanup. memCardDirectory->memStickDirectory.
2014-10-19 23:20:51 +02:00
Henrik Rydgard
7cb5e7f53f
Some very minor optimizations. Remove little-used stat counter.
2014-10-19 21:12:25 +02:00
Henrik Rydgard
8177b4c43b
Avoid an ifdef using PTRBITS
2014-10-12 19:35:55 +02:00
Unknown W. Brackets
358462a7f4
Add a .gitattributes to normalize newlines.
...
No code changes.
2014-09-26 21:20:50 -07:00
Unknown W. Brackets
cee2827172
Normalize newlines, no code changes.
...
We really shouldn't let mixed newlines creep into the codebase.
They're annoying.
2014-09-24 23:10:13 -07:00
Unknown W. Brackets
9bcffc5b4d
Fix divide by zero in memcpy checks.
...
Happened in Resistance demo.
2014-09-21 21:36:26 -07:00
Unknown W. Brackets
4210ba44eb
Clean up a few more ImmPtr() cases.
2014-09-21 08:34:27 -07:00
Henrik Rydgård
23ade6108d
Merge pull request #6917 from unknownbrackets/vertexjit
...
Add x86 weight ToFloat handling for d3d9
2014-09-18 17:48:22 +02:00