Sam Spilsbury
656a442433
shader: Shader size is long uint, not uint.
2016-04-25 00:40:03 +08:00
Sam Spilsbury
c6709d97bc
shader: Handle non-CALL opcodes with a break
2016-04-25 00:39:54 +08:00
Sam Spilsbury
bbffa6ad69
shader: Format string must be provided inline and not as a variable
2016-04-24 23:40:52 +08:00
Henrik Rydgard
01a1555b5d
Replace std::map with std::array for graphics event breakpoints, and allow the compiler to inline. Saves 1%+ in vertex heavy situations.
2016-04-24 14:19:49 +02:00
Sam Spilsbury
39d4994c15
pica: Handle default lighting case
2016-04-23 11:54:02 +08:00
tfarley
562f36a144
HWRasterizer: reorder declarations to match defs
2016-04-22 10:52:02 -04:00
tfarley
3268cab26b
HWRasterizer: sync specular uniform for new shaders
2016-04-22 10:48:00 -04:00
bunnei
bab30bcd6e
Merge pull request #1436 from tfarley/hw-tex-forwarding
...
Hardware Renderer Texture Forwarding
2016-04-22 08:15:51 -04:00
tfarley
22f3a7e94c
HWRasterizer: Texture forwarding
2016-04-21 17:27:56 -04:00
tfarley
e46d086189
Config: Add scaled resolution option
2016-04-21 17:27:48 -04:00
bunnei
14cc1ed911
Merge pull request #1655 from JayFoxRox/hw-dot3
...
OpenGL: Implement color combiner Operation::Dot3_RGB
2016-04-21 16:39:36 -04:00
bunnei
142a5dc3f5
Merge pull request #1625 from JayFoxRox/sw-blend-func
...
Rasterizer: Allow all blend factors for alpha blend-func
2016-04-17 20:20:15 -04:00
Jannik Vogel
e2b63a2dd7
Rasterizer: Allow all blend factors for alpha blend-func
2016-04-17 22:44:24 +02:00
Lioncash
4501a9eb50
debug_utils: use std::make_unique for initializing PicaTrace
2016-04-14 22:05:28 -04:00
bunnei
aff35d3e58
Merge pull request #1665 from lioncash/file
...
IOFile: Minor API changes
2016-04-14 16:28:15 -04:00
bunnei
d7fe2784cc
shader_jit_x64: Rename RuntimeAssert to Compile_Assert.
2016-04-13 23:04:53 -04:00
bunnei
3f623b2561
shader_jit_x64.cpp: Rename JitCompiler to JitShader.
2016-04-13 23:04:53 -04:00
bunnei
847fb951e2
shader_jit_x64: Free memory that's no longer needed after compilation.
2016-04-13 23:04:52 -04:00
bunnei
60aa72e117
shader_jit_x64: Use a sorted vector instead of a set for keeping track of return addresses.
2016-04-13 23:04:52 -04:00
bunnei
60749f2cda
shader_jit_x64: Use CALL/RET instead of JMP for subroutines.
2016-04-13 23:04:52 -04:00
bunnei
1d45b57939
shader_jit_x64: Separate initialization and code generation for readability.
2016-04-13 23:04:50 -04:00
bunnei
6e0319eec9
shader_jit_x64: Get rid of unnecessary last_program_counter variable.
2016-04-13 23:04:49 -04:00
bunnei
f3afe24594
shader_jit_x64: Execute certain asserts at runtime.
...
- This is because we compile the full shader code space, and therefore its common to compile malformed instructions.
2016-04-13 23:04:49 -04:00
bunnei
ffcf7ecee9
shader: Remove unused 'state' argument from 'Setup' function.
2016-04-13 23:04:48 -04:00
bunnei
a5a74eb121
shader_jit_x64: Specify shader main offset at runtime.
2016-04-13 23:04:47 -04:00
bunnei
c9d10de644
shader_jit_x64: Allocate each program independently and persist for emu session.
2016-04-13 23:04:47 -04:00
bunnei
4632791a40
shader_jit_x64: Rewrite flow control to support arbitrary CALL and JMP instructions.
2016-04-13 23:04:44 -04:00
bunnei
135aec7bea
shader_jit_x64: Fix strict memory aliasing issues.
2016-04-13 23:04:43 -04:00
Lioncash
a4120ca66c
file_util: Don't expose IOFile internals through the API
2016-04-13 20:17:17 -04:00
Jannik Vogel
ff7c798d86
Pica: Remove geometry dumper (PICA_DUMP_GEOMETRY)
2016-04-10 22:07:06 +02:00
Jannik Vogel
0ad050f85d
OpenGL: Implement color combiner Operation::Dot3_RGB
2016-04-10 15:31:24 +02:00
Jannik Vogel
35a92b4097
OpenGL: Respect buffer-write allow registers
2016-04-08 22:57:11 +02:00
Jannik Vogel
c6bbc41984
OpenGL: Split buffer-write mask sync into seperate functions
2016-04-08 22:42:44 +02:00
Jannik Vogel
fa24df7340
Rasterizer: Respect buffer-write allow registers
2016-04-08 22:35:22 +02:00
Jannik Vogel
d47605b2ed
OpenGL: Keep stencil-test and framebuffer.depth_format in sync
2016-04-08 22:35:17 +02:00
bunnei
6e750ae12d
Merge pull request #1639 from linkmauve/fix-double-framebuffer-check
...
OpenGL: Fix a double framebuffer completeness checks.
2016-04-07 19:52:02 -04:00
Mathew Maidment
aa6380e5bc
Merge pull request #1643 from MerryMage/make_unique
...
Common: Remove Common::make_unique, use std::make_unique
2016-04-05 20:10:11 -04:00
MerryMage
a06dcfeb61
Common: Remove Common::make_unique, use std::make_unique
2016-04-05 13:31:17 +01:00
Emmanuel Gil Peyrot
3219be8ee0
OpenGL: Fix a double framebuffer completeness checks.
2016-04-03 17:00:44 +01:00
Jannik Vogel
693cbc1f8f
OpenGL: Check for framebuffer completeness
2016-04-03 17:06:05 +02:00
Jannik Vogel
c26b141407
Avoid warnings by casting to size_t for ARRAY_SIZE() comparisons
2016-04-01 02:14:43 +02:00
Yuri Kunde Schlesner
81004211dd
Pica: Improve accuracy of immediate-mode support
...
This partially fixes Etrian Odyssey IV.
2016-03-23 20:18:40 -07:00
Yuri Kunde Schlesner
0c447e0a06
OpenGL: Don't attempt to draw empty triangle batches
...
Our code did not handle this well, causing random crashes in some
situations.
2016-03-23 20:02:05 -07:00
bunnei
ebbba0d381
Merge pull request #1508 from JayFoxRox/vs-output-map
...
Respect vs output map
2016-03-22 11:59:12 -04:00
bunnei
784c5539ea
Merge pull request #1538 from lioncash/dot
...
shader_interpreter: use std::inner_product for the dot product
2016-03-20 00:35:06 -04:00
bunnei
58852bedbf
Merge pull request #1535 from JayFoxRox/fix-align
...
PICA: Alignment happens locally in vertex
2016-03-17 20:00:00 -04:00
Lioncash
63e956cc7a
video_core: Don't cast away const
2016-03-17 02:01:38 -04:00
Lioncash
4d89df8df2
shader_interpreter: use std::inner_product for the dot product
...
Same thing, less code.
2016-03-17 01:00:30 -04:00
Lioncash
c928b04eee
core/video_core: Make NumIds functions constexpr
2016-03-17 00:29:47 -04:00
Lioncash
39baad9926
core/video_core: Don't cast away const in subscript operators
...
Not to say these subscript operators aren't totally ugly as is.
2016-03-17 00:27:15 -04:00
Jannik Vogel
7eef9ebc3b
PICA: Alignment happens locally in vertex
2016-03-17 02:24:20 +01:00
bunnei
55f24e1cf4
Merge pull request #1519 from JayFoxRox/vp-offset-fix
...
PICA: Fix viewport offset
2016-03-16 14:19:53 -04:00
bunnei
96cafbe4cc
Merge pull request #1503 from bunnei/clear-jit-cache
...
Clear JIT cache
2016-03-16 13:18:51 -04:00
Jannik Vogel
9aad2f29bb
PICA: Fix MAD/MADI encoding
2016-03-15 20:01:25 +01:00
Jannik Vogel
964cfaea47
PICA: Fix viewport offset
2016-03-14 18:37:33 +01:00
Jannik Vogel
f746a00964
Respect vs output map
2016-03-14 13:03:34 +01:00
Jannik Vogel
a66c186e81
PICA: Align vertex attributes
2016-03-13 04:54:23 +01:00
bunnei
6efb710b28
shader_jit_x64: Clear cache after code space fills up.
2016-03-12 12:15:49 -05:00
bunnei
c103759cdc
shader_jit_x64: Make assert outputs more useful & cleanup formatting.
2016-03-12 12:06:28 -05:00
bunnei
46f78b7f19
shader: Update log message to use proper log class.
2016-03-12 12:03:32 -05:00
Yuri Kunde Schlesner
305e63d9ea
Merge pull request #1475 from lioncash/align
...
Common: Get rid of alignment macros
2016-03-09 20:08:38 -08:00
bunnei
4a2d1571bc
Merge pull request #1474 from lioncash/renderer
...
renderer_base: Minor changes
2016-03-09 10:57:38 -05:00
Lioncash
88d604383e
Common: Get rid of alignment macros
...
The gl rasterizer already uses alignas,
so we may as well move everything over.
2016-03-09 01:31:14 -05:00
bunnei
8530a2d7df
Merge pull request #1344 from LittleWhite-tb/error-output
...
Output errors in GUI
2016-03-08 23:12:04 -05:00
Lioncash
4b5b32e721
renderer_base: In-class initialize variables
2016-03-08 21:46:47 -05:00
Lioncash
be913040a8
render_base: Clarify/normalize getter functions
2016-03-08 21:45:24 -05:00
Lioncash
bf76afc68d
renderer_base: Don't directly expose the rasterizer unique_ptr
...
There's no reason to allow direct access to the unique_ptr instance. Only
its contained pointer.
2016-03-08 21:31:44 -05:00
LittleWhite
4be68dddfb
Improve error report from Init() functions
...
Add error popup when citra initialization failed
2016-03-08 22:05:25 +01:00
Yuri Kunde Schlesner
c58bc25d5b
Pica: Write depth value even when depth test is disabled
...
This has been confirmed on hardware. Fixes Etrian Odyssey IV.
2016-03-05 20:16:20 -08:00
Dwayne Slater
6b775034dd
Add immediate mode vertex submission
2016-03-02 22:16:38 -05:00
bunnei
2b00bdec1f
Merge pull request #1424 from MerryMage/lut_init
...
renderer_opengl: Initalise fragment shader LUT textures
2016-02-25 19:36:27 -05:00
MerryMage
0801363840
renderer_opengl: Initalise fragment shader LUT textures
2016-02-26 00:12:38 +00:00
bunnei
e04e6aabbc
Merge pull request #1395 from ds84182/padding-attributes
...
Add support for padding vertex attributes
2016-02-24 18:15:16 -08:00
Dwayne Slater
ed8072b48b
Fix out of bounds array access when loading a component >= 12
2016-02-20 19:03:14 -05:00
Dwayne Slater
82fc075ff6
Add support for padding vertex attributes
2016-02-20 19:00:31 -05:00
MerryMage
6c71858c5c
BitField: Make trivially copyable and remove assignment operator
2016-02-12 19:51:16 +00:00
bunnei
19557aaab3
pica: Cleanup lighting register definitions and documentation.
2016-02-05 17:20:25 -05:00
bunnei
c4d318f691
gl_rasterizer: Use alignas(16) instead of explicit padding.
2016-02-05 17:20:24 -05:00
bunnei
aaa7beeda8
renderer_opengl: Use GLvec3/GLvec4 aliases for commonly used types.
2016-02-05 17:20:23 -05:00
bunnei
8e9318f20a
gl_rasterizer: Fix issue with interpolation of opposite quaternions.
2016-02-05 17:20:23 -05:00
bunnei
b694423d09
pica_types: Fix typo in docstring.
2016-02-05 17:20:22 -05:00
bunnei
a949fd5f25
pica_types: Replace float24/20/16 with a template class.
2016-02-05 17:20:22 -05:00
bunnei
d171822dce
command_processor: Add an assertion to ensure LUTs are not written past their boundaries.
2016-02-05 17:20:20 -05:00
bunnei
310a1c30ca
gl_rasterizer: Remove unnecessary casts.
2016-02-05 17:20:19 -05:00
bunnei
c229503f4a
gl_rasterizer: Fix PicaShaderConfig on GCC.
2016-02-05 17:20:19 -05:00
bunnei
9dfb223d26
gl_rasterizer: Initial implementation of bump mapping.
2016-02-05 17:20:19 -05:00
bunnei
449902b558
gl_shader_gen: Fix bug in LUT range (should within range [0, 255] not [0, 256]).
2016-02-05 17:20:17 -05:00
bunnei
348c9c9ff3
gl_shader_gen: Implement lighting red, green, and blue reflection.
2016-02-05 17:20:16 -05:00
bunnei
01b407638c
gl_shader_gen: View should be normalized.
2016-02-05 17:20:15 -05:00
bunnei
c37de30cfc
gl_shader_gen: Implement fragment lighting fresnel effect.
2016-02-05 17:20:13 -05:00
bunnei
0e67c21c9e
gl_shader_gen: Implement fragment lighting specular 1 component.
2016-02-05 17:19:16 -05:00
bunnei
781b046579
gl_shader_gen: Add support for D0 LUT scaling.
2016-02-05 17:18:36 -05:00
bunnei
3d89dacd56
gl_shader_gen: Refactor lighting config to match Pica register naming.
...
- Also implement D0 LUT enable.
2016-02-05 17:17:35 -05:00
bunnei
6307999116
pica: Cleanup and add some comments to lighting registers.
2016-02-05 17:17:34 -05:00
bunnei
6878ba7608
gl_rasterizer: Minor naming refactor on Pica register naming.
2016-02-05 17:17:33 -05:00
bunnei
76f303538b
gl_shader_gen: Reorganize and cleanup lighting code.
...
- No functional difference.
2016-02-05 17:17:33 -05:00
bunnei
5f3bad8fb1
gl_shader_gen: Fix directional lights.
2016-02-05 17:17:32 -05:00
bunnei
bdc72d0904
gl_shader_gen: Fix bug with lighting where clamp highlights was only applied to last light.
2016-02-05 17:17:32 -05:00
bunnei
603b619cbe
gl_shader_gen: View vector needs to be normalized when computing half angle vector.
2016-02-05 17:17:31 -05:00
bunnei
021cb0bced
renderer_opengl: Use textures for fragment shader LUTs instead of UBOs.
...
- Gets us LUT interpolation for free.
- Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs.
2016-02-05 17:17:31 -05:00
bunnei
bf89870437
renderer_opengl: Initial implementation of basic specular lighting.
2016-02-05 17:17:30 -05:00
bunnei
e34fa6365f
renderer_opengl: Implement HW fragment lighting distance attenuation.
2016-02-05 17:17:30 -05:00
bunnei
e9af70eaf3
renderer_opengl: Implement HW fragment lighting LUTs within our default UBO.
2016-02-05 17:17:29 -05:00
bunnei
afbef52516
renderer_opengl: Implement diffuse component of HW fragment lighting.
2016-02-05 17:17:29 -05:00
bunnei
b003075570
pica: Implement decoding of basic fragment lighting components.
...
- Diffuse
- Distance attenuation
- float16/float20 types
- Vertex Shader 'view' output
2016-02-05 17:17:28 -05:00
bunnei
281bc90ad2
pica: Implement fragment lighting LUTs.
2016-02-05 17:17:27 -05:00
bunnei
4369767c72
pica: Add decodings for distance attenuation and LUT registers.
2016-02-05 17:17:26 -05:00
bunnei
38c7b20475
pica: Add pica_types module and move float24 definition.
2016-02-05 17:17:26 -05:00
tfarley
a15f4d1590
hwrasterizer: Use proper cached fb addr/size
2016-02-03 15:52:34 -05:00
Yuri Kunde Schlesner
05356543d9
OpenGL: Downgrade GL_DEBUG_SEVERITY_NOTIFICATION to Debug logging level
...
The nVidia driver is *extremely* spammy on this category, sending a
message on every buffer or texture upload, slowing down the emulator and
making the log useless.
2016-02-02 22:44:13 -08:00
bunnei
a43f8d2fb7
Merge pull request #1367 from yuriks/jit-jmp
...
Shader JIT: Fix off-by-one error when compiling JMPs
2016-01-27 09:19:28 -05:00
bunnei
c407b6ce2f
Merge pull request #1369 from yuriks/jmpu-inverted
...
Shader: Implement "invert condition" feature of IFU instruction
2016-01-26 09:58:16 -05:00
Yuri Kunde Schlesner
d01d1f7e01
Debugger: Use 3dbrew names for GPU registers
...
This list was imported from the 3dbrew wiki page and is pretty much
complete.
2016-01-24 20:29:44 -08:00
Yuri Kunde Schlesner
083d2d89a5
Shader: Implement "invert condition" feature of IFU instruction
...
If the bit 0 of the JMPU instruction is set, then the jump condition
will be inverted. That is, a jump will happen when the boolean is false
instead of when it is true.
2016-01-24 20:29:06 -08:00
Yuri Kunde Schlesner
c1071c1ff7
Shader JIT: Fix off-by-one error when compiling JMPs
...
There was a mistake in the JMP code which meant that one instruction at
the destination would be skipped when the jump was taken. This commit
also changes the meaning of the culprit parameter to make it less
confusing and avoid similar mistakes in the future.
2016-01-24 02:15:56 -08:00
bunnei
0b6cc0592d
Merge pull request #1334 from tfarley/hw-depth-modifiers
...
hwrasterizer: Use depth offset
2016-01-20 22:27:33 -05:00
tfarley
f53dbafdae
hwrasterizer: Use depth offset
2016-01-20 21:57:59 -05:00
Lioncash
4966568076
command_processor: Get rid of variable shadowing
2016-01-17 02:22:51 -05:00
bunnei
6a261e825c
Merge pull request #1196 from linkmauve/khr_debug
...
Add optional GL_KHR_debug support
2016-01-12 22:54:52 -05:00
Lioncash
5e17a586da
video_core: Make the renderer global a unique_ptr
2015-12-30 08:52:01 -05:00
Lioncash
97dc9634a2
swrasterizer: Add missing override specifier
2015-12-29 18:35:38 -05:00
Yuri Kunde Schlesner
015d7b9779
VideoCore: Sync state after changing rasterizers
...
This fixes various bugs that appear in the HW rasterizer after switching
between it and the SW one during emulation.
2015-12-20 17:37:15 -08:00
Yuri Kunde Schlesner
402692c08d
Merge pull request #1267 from yuriks/flipped-framebuffer
...
OpenGL: Flip framebuffers during transfer rather than when rendering
2015-12-09 20:35:15 -08:00
bunnei
3013f26d70
Merge pull request #1269 from Subv/triangle_fan
...
GPU/PrimitiveAssembler: Fixed drawing triangle fans.
2015-12-08 10:27:40 -05:00
Yuri Kunde Schlesner
195fedccf0
VideoCore: Unify interface to OpenGL and SW rasterizers
...
This removes explicit checks sprinkled all over the codebase to instead
just have the SW rasterizer expose an implementation with no-ops for
most operations.
2015-12-07 20:20:38 -08:00
Yuri Kunde Schlesner
03835d04f4
VideoCore: Rename HWRasterizer methods to be less confusing
2015-12-06 19:08:37 -08:00
Yuri Kunde Schlesner
da80ece8b9
OpenGL: Rename cache functions to better match what they actually do
2015-12-06 17:02:52 -08:00
Subv
7b33e163b9
GPU/PrimitiveAssembler: Fixed drawing triangle fans.
...
It was skipping the second vertex assignment and using uninitialized garbage when assembling the corresponding triangle.
2015-12-06 10:48:05 -05:00
Yuri Kunde Schlesner
cf81e08389
OpenGL: Flip framebuffers during transfer rather than when rendering
2015-12-04 22:23:39 -08:00
Yuri Kunde Schlesner
95dbc6eb0e
OpenGL: Add support for glFrontFace in the state tracker
2015-12-04 21:58:26 -08:00
Yuri Kunde Schlesner
e9c209ccc8
PICA: Properly emulate 1-stage delay in the combiner buffer
...
This was discovered and verified by @fincs. The tev combiner buffer
actually lags behind by one stage, meaning stage 1 reads the initial
color, stage 2 reads stage 0's output, and so on.
Fixes character portraits in Fire Emblem: Awakening and world textures
in Zelda: ALBW. Closes #1140 .
2015-11-30 22:45:18 -08:00
bunnei
f008dfbaca
renderer_opengl: Fix uniform issues introduced with kemenaran/avoid-explicit-uniform-location.
2015-11-25 22:33:24 -05:00
Pierre de La Morinerie
0735630744
Use regular uniform location
...
The support for GL_ARB_explicit_uniform_location is not that good
(53% according to http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_explicit_uniform_location ).
This fix the shader compilation on Intel HD 4000 (#1222 ).
2015-11-25 11:56:11 +01:00
Subv
823ce62f2f
FragShader: Use an UBO instead of several individual uniforms
2015-11-18 21:03:56 -05:00
Subv
7a37dba75b
GPU/Loaders: Log an error when a loader tries to load from a component beyond the available ones (12).
...
Related to #1170
2015-11-09 21:16:11 -05:00
Emmanuel Gil Peyrot
53df67376d
OpenGL: Log GL_KHR_debug messages we receive
...
This allows the driver to communicate errors, warnings and improvement
suggestions about our usage of the API.
2015-10-24 02:30:51 +01:00
bunnei
74186a5f01
gl_shader_gen: Use explicit locations for vertex shader attributes.
2015-10-21 22:29:56 -04:00
bunnei
e663f5c914
gl_shader_gen: Optimize code for AppendAlphaTestCondition.
...
- Also add a comment to AppendColorCombiner.
2015-10-21 22:29:56 -04:00
bunnei
e7b1f2ae0a
gl_rasterizer: Define enum types for each vertex texcoord attribute.
2015-10-21 21:59:47 -04:00
bunnei
0ebcff710e
gl_shader_gen: Various cleanups to shader generation.
2015-10-21 21:59:44 -04:00
bunnei
240a3b80d9
gl_rasterizer: Use MMH3 hash for shader cache hey.
...
- Includes a check to confirm no hash collisions.
2015-10-21 21:58:59 -04:00
bunnei
71edb55114
gl_shader_gen: Require explicit uniform locations.
...
- Fixes uniform issue on AMD.
2015-10-21 21:54:56 -04:00
bunnei
5ef2df056d
gl_shader_gen: Rename 'o' to 'attr' in vertex/fragment shaders.
2015-10-21 21:53:19 -04:00
bunnei
c2c4faef4c
gl_shader_gen: AppendAlphaModifier default should be 0.0, not vec4(0.0).
2015-10-21 21:53:18 -04:00
bunnei
bd833b8dd8
gl_shader_gen: Fix bug where TEV stage outputs should be clamped.
2015-10-21 21:53:18 -04:00
bunnei
f2e7f7e101
gl_rasterizer: Add documentation to ShaderCacheKey.
2015-10-21 21:53:17 -04:00
bunnei
4b5141954e
gl_shader_gen: Add additional function documentation.
2015-10-21 21:53:17 -04:00
bunnei
2a0a86f629
gl_shader_util: Cleanup header file + add docstring.
2015-10-21 21:53:16 -04:00
bunnei
a74774257e
gl_shader_gen: Various cleanups + moved TEV stage generation to its own function.
2015-10-21 21:53:16 -04:00
bunnei
c86b9d4242
renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups.
2015-10-21 21:53:14 -04:00
bunnei
3c057bd3d8
gl_rasterizer: Move logic for creating ShaderCacheKey to a static function.
2015-10-21 21:53:05 -04:00
bunnei
b02a533d94
gl_shader_util: Use vec3 constants for AppendColorCombiner.
2015-10-21 21:51:24 -04:00
bunnei
37b0aa5af7
gl_rasterizer: Fix typo in uploading TEV const color uniforms.
2015-10-21 21:51:24 -04:00
bunnei
82f3e6dc69
gl_shader_util: Fix precision bug with alpha testing.
...
- Alpha testing is not done with float32 precision, this makes the HW renderer match the SW renderer.
2015-10-21 21:51:23 -04:00
Subv
e3f4233cef
Initial implementation of fragment shader generation with caching.
2015-10-21 21:51:23 -04:00
Emmanuel Gil Peyrot
14af5919ba
CitraQt, SkyEye, Loader, VideoCore: Remove newlines in LOG_* calls.
...
The LOG_* function itself already appends one.
2015-10-09 22:14:56 +01:00
Rohit Nirmal
32391cffdd
Silence -Wsign-compare warnings.
2015-10-06 22:16:15 -05:00
Martin Lindhe
bafb7afba2
fix some xcode 7.0 warnings
2015-09-29 23:11:09 +02:00
Lioncash
751fbfdcc3
general: Silence some warnings when using clang
2015-09-16 08:51:53 -04:00
Lioncash
aec28ed91e
video_core: Reorganize headers
2015-09-11 07:31:15 -04:00
Lioncash
1fa772393b
video_core: Remove unnecessary includes from headers
2015-09-11 00:10:03 -04:00
bunnei
a008b28659
Merge pull request #1133 from lioncash/emplace-back
...
gl_rasterizer: Replace push_back calls with emplace_back in AddTriangle
2015-09-10 15:07:06 -04:00
bunnei
0d5604fdcb
Merge pull request #1136 from lioncash/proto
...
renderer_opengl: Remove unimplemented function declaration
2015-09-10 11:29:33 -04:00
Lioncash
8a3428f16c
renderer_opengl: Remove unimplemented function declaration
2015-09-10 10:45:44 -04:00
Lioncash
526eb33d1e
video_core: Remove unused variables
2015-09-10 10:26:21 -04:00
Lioncash
7b72b71605
gl_rasterizer: Replace push_back calls with emplace_back in AddTriangle
2015-09-10 00:20:30 -04:00
aroulin
1484a23530
Shader JIT: Use SCALE constant from emitter
2015-09-07 16:50:28 +02:00
aroulin
87e3b9ffc0
Shader: Fix size_t to int casts of register offsets
2015-09-07 16:50:28 +02:00
Yuri Kunde Schlesner
b044c047c4
OpenGL: Use Sampler Objects to decouple sampler config from textures
...
Fixes #978
2015-09-03 15:09:51 -03:00
Yuri Kunde Schlesner
466e608c19
OpenGL: Remove ugly and endian-unsafe color pointer casts
2015-09-03 15:09:51 -03:00
Yuri Kunde Schlesner
ec28f037e6
OpenGL: Add support for Sampler Objects to state tracker
2015-09-03 15:09:50 -03:00
Yuri Kunde Schlesner
cc19a76656
Merge pull request #1087 from yuriks/opengl-glad
...
Replace the previous OpenGL loader with a glad-generated 3.3 one
2015-09-03 15:07:01 -03:00
bunnei
918ca40c68
Merge pull request #1088 from aroulin/x64-emitter-abi-call
...
x64: Proper stack alignment in shader JIT function calls
2015-09-02 08:46:58 -04:00
aroulin
ba998b85a1
video_core: Fix format specifiers warnings
2015-09-02 08:20:00 +02:00
aroulin
179ad35c2e
x64: Proper stack alignment in shader JIT function calls
...
Import Dolphin stack handling and register saving routines
Also removes the x86 parts from abi files
2015-09-01 23:39:52 +02:00
Tony Wasserka
071510b367
Merge pull request #1092 from Subv/vertex_offset
...
Pica: Add the vertex_offset register to the Pica registers map.
2015-08-31 18:17:59 +02:00
Subv
58a04c0776
Pica: Added the primitive_restart register (0x25f) to the registers map.
2015-08-31 09:14:18 -05:00
Subv
149ea561a6
Pica: Add the vertex_offset register to the Pica registers map.
2015-08-31 07:02:30 -05:00
aroulin
84959be150
Shader JIT: Fix SGE/SGEI NaN behavior
...
SGE was incorrectly emulated w.r.t. NaN behavior as the CMPSS SSE
instruction was used with NLT
2015-08-31 08:16:15 +02:00
bunnei
e77dc4e9d2
Merge pull request #1059 from Subv/vertex_offset
...
GPU: Implemented register 0x22A PICA_REG_DRAW_VERTEX_OFFSET
2015-08-30 17:12:33 -04:00
Subv
12a11472f1
GPU: Implemented register 0x22A.
...
This is the equivalent of the "first" parameter in glDrawArrays, it tells the GPU the vertex index at which to start rendering.
Register 0x22A doesn't affect indexed rendering.
2015-08-30 15:46:22 -05:00
Yuri Kunde Schlesner
a1a5570e97
Replace the previous OpenGL loader with a glad-generated 3.3 one
...
The main advantage of switching to glad from glLoadGen is that, apart
from being actively maintained, it supports a customizable entrypoint
loader function, which makes it possible to also support OpenGL ES.
2015-08-30 08:45:56 -03:00
bunnei
58e9f78844
Merge pull request #1049 from Subv/stencil
...
Rasterizer: Corrected the stencil implementation.
2015-08-29 20:06:25 -04:00
Yuri Kunde Schlesner
c5a4025b65
Merge pull request #1065 from yuriks/shader-fp
...
Shader FP compliance fixes
2015-08-27 16:34:13 -07:00
bunnei
f3cef178e3
gl_rasterizer_cache: Detect and ignore unnecessary texture flushes.
2015-08-27 19:07:53 -04:00
aroulin
f52d8c1a9b
Shader JIT: Fix float to integer rounding in MOVA
...
MOVA converts new address register values from floats to integers using truncation
2015-08-27 15:26:41 +02:00
archshift
dd0e1061ef
Shader JIT: ifdef out reference to ifdef'd out shader_map
...
shader_map was only defined on x86 architectures, but was cleared on shutdown
with no ifdef protection. Ifdef this out so non-x86 architectures can be built.
2015-08-26 22:28:19 +00:00
Yuri Kunde Schlesner
0fcabd2b11
Integrate the MicroProfile profiling library
...
This brings goodies such as a configurable user interface and
multi-threaded timeline view.
2015-08-24 22:16:28 -03:00
bunnei
afd45d1d7f
Merge pull request #1063 from Subv/hw_renderer_debug_fb
...
HWRenderer: Only reload the framebuffer from gpu memory if the hw renderer is in use during a breakpoint
2015-08-24 13:02:44 -04:00
Subv
583d777b1a
HWRenderer: Added a workaround for the Intel Windows driver bug that causes glTexSubImage2D to not change the stencil buffer.
...
Reported here https://communities.intel.com/message/324464
2015-08-24 11:28:28 -05:00
Yuri Kunde Schlesner
eff10959de
fixup! Shaders: Fix multiplications between 0.0 and inf
2015-08-24 02:10:11 -03:00
Yuri Kunde Schlesner
d8ef20c856
Shader JIT: Tiny micro-optimization in DPH
2015-08-24 01:48:37 -03:00
Yuri Kunde Schlesner
630a850d4d
Shaders: Fix multiplications between 0.0 and inf
...
The PICA200 semantics for multiplication are so that when multiplying
inf by exactly 0.0, the result is 0.0, instead of NaN, as defined by
IEEE. This is relied upon by games.
Fixes #1024 (missing OoT interface items)
2015-08-24 01:48:15 -03:00
Yuri Kunde Schlesner
082b74fa24
Shaders: Explicitly conform to PICA semantics in MAX/MIN
2015-08-24 01:46:58 -03:00
Yuri Kunde Schlesner
76247170df
Shader JIT: Add name to second scratch register (XMM4)
2015-08-24 01:46:10 -03:00
Lioncash
fa5076eb9b
shader_jit: Replace two MDisp usages with MatR
2015-08-24 00:39:50 -04:00
Yuri Kunde Schlesner
455147ee95
Shader JIT: Fix CMP NaN behavior to match hardware
2015-08-24 01:29:40 -03:00
bunnei
83c214f6d8
Merge pull request #1062 from aroulin/shader-rcp-rsq
...
Shader: RCP and RSQ computes only the 1st component
2015-08-23 17:56:35 -04:00
Subv
d1b9383d86
HWRenderer: Only reload the framebuffer from gpu memory if the hw renderer is in use during a breakpoint.
2015-08-23 15:26:17 -05:00
aroulin
03c5cfead4
Shader: Use std::sqrt for float instead of sqrt
2015-08-23 22:03:07 +02:00
aroulin
fa552f11ef
Shader: RCP and RSQ computes only the 1st component
2015-08-23 22:01:17 +02:00
aroulin
2f1514b904
Shader: implement DPH/DPHI in JIT
2015-08-22 11:09:53 +02:00
aroulin
2e7cf2f6cf
Shader: implement DPH/DPHI in interpreter
...
Tests revealed that the component with w=1 is
SRC1 and not SRC2, it is now fixed on 3dbrew.
2015-08-22 11:09:53 +02:00
Subv
0c7da9b815
HWRasterizer: Implemented stencil ops 6 and 7.
2015-08-21 11:05:56 -05:00
Subv
7c1f84a92b
SWRasterizer: Implemented stencil ops 6 and 7.
...
IncrementWrap and DecrementWrap, verified with hwtests.
2015-08-21 11:01:42 -05:00
Subv
e43eb130d4
HWRasterizer: Implemented stencil op 1 (GL_ZERO)
2015-08-21 10:59:49 -05:00
Subv
fef1462371
SWRasterizer: Implemented stencil action 1 (GL_ZERO).
...
Verified with hwtests.
2015-08-21 10:35:25 -05:00
Subv
b3e530d005
SWRasterizer: Removed a todo. Verified with hwtests.
2015-08-21 10:09:15 -05:00
Subv
8e6336d96b
SWRenderer: The stencil depth_pass action is executed even if depth testing is disabled.
...
The HW renderer already did this.
2015-08-21 09:48:43 -05:00
Subv
e74825e3d0
Rasterizer: Abstract duplicated stencil code into a lambda.
2015-08-21 09:45:36 -05:00
Subv
46f660a789
GLRasterizer: Implemented stencil testing in the hw renderer.
2015-08-20 10:11:09 -05:00
Subv
186873420f
GPU/Rasterizer: Corrected the stencil implementation.
...
Verified the behavior with hardware tests.
2015-08-20 10:10:35 -05:00
aroulin
f3e8f42718
Shader: implement SGE, SGEI and SLT in JIT
2015-08-19 14:29:39 +02:00
aroulin
863730f6a7
Shader: implement SGE, SGEI in interpreter
2015-08-19 14:29:39 +02:00
bunnei
3c5ff418ca
Merge pull request #1047 from aroulin/shader-ex2-lg2
...
Shader: Save caller-saved registers in JIT before a CALL
2015-08-18 22:02:25 -04:00
aroulin
2f9eb98f03
Shader: Save caller-saved registers in JIT before a CALL
2015-08-19 03:40:07 +02:00
bunnei
026379ed55
Merge pull request #1037 from aroulin/shader-ex2-lg2
...
Shader: Implement EX2 and LG2 in interpreter/JIT
2015-08-18 19:42:32 -04:00
bunnei
1f18c9f8dd
Merge pull request #1034 from yuriks/rg8-textures
...
videocore: Added RG8 texture support
2015-08-16 22:17:12 -04:00
aroulin
7d3a6016d6
Shader: implement EX2 and LG2 in JIT
2015-08-17 01:12:34 +02:00
LittleWhite
9d6748fa94
Fix Linux GCC 4.9 build (complaining about undeclared memset)
2015-08-16 17:21:08 +02:00
aroulin
638e47c04d
Shader: implement EX2 and LG2 in interpreter
2015-08-16 15:54:30 +02:00
Tony Wasserka
96820ae42a
Build fix for Debug configurations.
2015-08-16 15:14:54 +02:00
Tony Wasserka
f5144e6c10
Merge pull request #997 from Lectem/cmdlist_full_debug
...
citra-qt: Improve pica command list widget (add mask, fix some issues)
2015-08-16 13:34:45 +02:00
Tony Wasserka
33ba604fd9
Introduce a shader tracer to allow inspection of input/output values for each processed instruction.
2015-08-16 14:12:11 +02:00
Tony Wasserka
2e3601f415
Pica/DebugUtils: Include uniform information into shader dumps.
2015-08-16 13:22:01 +02:00
Tony Wasserka
4cb302c8ae
citra-qt: Improve shader debugger.
...
Now supports dumping the current shader and recognizes a larger number of output semantics.
2015-08-16 13:22:00 +02:00
Patrick Martin
5b65d95310
videocore: Added RG8 texture support
2015-08-16 02:21:50 -03:00
bunnei
db97090cad
Shader: Use a POD struct for registers.
2015-08-15 18:03:27 -04:00
bunnei
b39c053785
Rename ARCHITECTURE_X64 definition to ARCHITECTURE_x86_64.
2015-08-15 18:03:27 -04:00
bunnei
0ee00861f6
Common: Cleanup CPU capability detection code.
2015-08-15 18:03:26 -04:00
bunnei
a1942238f5
Common: Move cpu_detect to x64 directory.
2015-08-15 18:03:26 -04:00
bunnei
bd7e691f78
x64: Refactor to remove fake interfaces and general cleanups.
2015-08-15 18:03:25 -04:00
bunnei
cfb354f11f
JIT: Support negative address offsets.
2015-08-15 18:01:22 -04:00
bunnei
094ae6fadb
Shader: Initial implementation of x86_x64 JIT compiler for Pica vertex shaders.
...
- Config: Add an option for selecting to use shader JIT or interpreter.
- Qt: Add a menu option for enabling/disabling the shader JIT.
2015-08-15 18:01:07 -04:00
bunnei
d67e2f78b7
Common: Added MurmurHash3 hash function for general-purpose use.
2015-08-15 17:33:46 -04:00
bunnei
3f69c2039d
Shader: Define a common interface for running vertex shader programs.
2015-08-15 17:33:44 -04:00
bunnei
18527b9e21
Shader: Move shader code to its own subdirectory, "shader".
2015-08-15 17:33:42 -04:00
bunnei
642b9b5030
GPU: Refactor "VertexShader" namespace to "Shader".
...
- Also renames "vertex_shader.*" to "shader_interpreter.*"
2015-08-15 17:33:41 -04:00
bunnei
35f3360663
Merge pull request #893 from linkmauve/remove-uint._t-int._t
...
Replace standard uint*_t and int*_t with CommonTypes’ u* and s* types
2015-08-11 17:55:24 -04:00
Emmanuel Gil Peyrot
5115d0177e
ARM Core, Video Core, CitraQt, Citrace: Use CommonTypes types instead of the standard u?int*_t types.
2015-08-11 22:38:44 +01:00
Yuri Kunde Schlesner
254582aa35
OpenGL: Fix state tracking in situations with reused object handles
...
If an OpenGL object is created, bound to a binding using the state
tracker, and then destroyed, a newly created object can be assigned the
same numeric handle by OpenGL. However, even though it is a new object,
and thus needs to be bound to the binding again, the state tracker
compared the current and previous handles and concluded that no change
needed to be made, leading to failure to bind objects in certain cases.
This manifested as broken text in VVVVVV, which this commit fixes along
with similar texturing problems in other games.
2015-08-06 00:59:37 -03:00
Yuri Kunde Schlesner
ff68db61bc
OpenGL: Remove redundant texture.enable_2d field from OpenGLState
...
All uses of this field where it's false can just set the texture id to 0
instead.
2015-08-05 22:55:22 -03:00
Yuri Kunde Schlesner
a96502edd3
Videocore: Implement simple vertex caching
...
This gives a ~2/3 reduction in the amount of vertices that need to be
processed through the vertex loaders and the vertex shader, yielding a
good speedup.
2015-08-04 23:41:47 -03:00
bunnei
bb7eb5c574
Merge pull request #1006 from yuriks/fb-commit-profile
...
OpenGL: Add a profiler category measuring framebuffer readback
2015-07-30 10:39:38 -04:00
bunnei
31c1bb901b
Merge pull request #963 from yuriks/gpu-fixes
...
Misc. GPU vertex loading fixes
2015-07-29 16:45:17 -04:00
Yuri Kunde Schlesner
428154da45
OpenGL: Add a profiler category measuring framebuffer readback
2015-07-28 17:37:46 -03:00
bunnei
e1a3fed6ff
Merge pull request #991 from yuriks/globjects
...
OpenGL: Make OpenGL object resource wrappers fully inline
2015-07-26 16:37:33 -04:00
bunnei
cb76453ec4
Merge pull request #992 from yuriks/hot-path-debug
...
VideoCore: #ifdef out some debugging routines
2015-07-26 11:45:51 -04:00
Lectem
facb2555a9
citra-qt/debug_utils: Use lock_guard everywhere
...
unique_lock were being used as lock_guards.
Also replaced manual lock/unlock by lock_guard for harmonization.
2015-07-26 16:28:44 +02:00
Lectem
e663751f8b
citra-qt/command list: Add mask column
2015-07-26 16:23:12 +02:00
Yuri Kunde Schlesner
1762267de4
OpenGL: Make OpenGL object resource wrappers fully inline
...
The functions are so simple that having them separate only bloats the
code and hinders optimization.
2015-07-26 10:58:58 -03:00
Tony Wasserka
72237a9305
Merge pull request #987 from yuriks/regnames
...
Videocore: Don't reinitialize register name map on every query.
2015-07-26 15:56:56 +02:00
Yuri Kunde Schlesner
e130dac7de
Videocore: Don't reinitialize register name map on every query
...
This greatly speeds up the command list debug widget.
2015-07-26 10:10:10 -03:00
Yuri Kunde Schlesner
4909a1486e
Videocore: Simplify variables in vertex shader interpreter
...
Simplifies the code and gives a tiny speed-up.
2015-07-26 08:49:35 -03:00
Yuri Kunde Schlesner
877d2a0e48
Videocore: Replace std::stack in shader interpreter with static_vector
...
Shaves off 1/3rd of the vertex shader time in Fire Emblem
2015-07-26 08:49:35 -03:00
Yuri Kunde Schlesner
13347997ba
VideoCore: #ifdef out some debugging routines
...
Some disabled debugging functionality was being called from rendering
routines in VideoCore. Although disabled, many of them still allocated
memory or did some extra work that was enough to show up in a profiler.
Gives a slight (~2ms) speedup.
2015-07-26 06:55:47 -03:00
Yuri Kunde Schlesner
00529c71d4
Address error that remained in last merge
2015-07-25 16:54:51 -03:00
Yuri Kunde Schlesner
9a0f9f12cd
Merge pull request #892 from zawata/another-warning-fixes
...
Yet More Warning Fixes
2015-07-25 12:50:32 -07:00
Tony Wasserka
1760eb5ca6
Merge pull request #980 from Subv/more_breakpoints
...
Qt/GPU Breakpoints: Added three more breakpoint types.
2015-07-24 01:58:11 +02:00
Yuri Kunde Schlesner
1fe9b0b82e
VideoCore: Fix values of unset components in input attribute arrays
...
If an input attribute array had a field with less than 4 components, the
remaining components were left unset if not specified by a default
vertex attribute. If neither mechanism would set a component, it would
assume a garbage value.
It has been verified that the hardware behavior is to instead to set the
missing components from the fixed default of (0 0 0 1). The default
vertex attribute values aren't used at all if a vertex array is
specified for that attribute.
Fixes UI graphics on Fire Emblem: Awakening, a small texturing glitch
when selecting a character in Cubic Ninja, as well as eliminating the
unset-W hack which was required for Ocarina of Time to not have
garbled triangles.
This change has been tested against hardware.
2015-07-23 16:51:25 -03:00
Yuri Kunde Schlesner
4e09202226
VideoCore: Saturate vertex colors before interpolating
...
During testing, it was discovered that hardware does not interpolate
colors output by the vertex shader as-is. Rather, it drops the sign and
saturates the value to 1.0. This is done before interpolation, such that
(e.g.) interpolating outputs 1.5 and -0.5 is equivalent to as if the
shader had output the values 1.0 and 0.5 instead, with the interpolated
value never crossing 0.0.
This change has been tested against hardware.
2015-07-23 16:51:24 -03:00
Subv
6c0ea5f5e8
Qt/GPU Breakpoints: Added three more breakpoint types:
...
* IncomingDisplayTransfer: Triggered just before a display transfer is performed.
* GSPCommandProcessed: Triggered right after a GSP command is processed.
* BufferSwapped: Triggered when the frames flip
2015-07-23 11:47:34 -05:00
bunnei
cea45af64d
Merge pull request #977 from yuriks/glenable-tex2d
...
GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls
2015-07-23 10:07:35 -04:00
Subv
7b4961e968
Rasterizer/GL: Set the border color when binding a texture.
2015-07-22 18:41:37 -05:00
Yuri Kunde Schlesner
e5c4fe0098
GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls
...
In OpenGL 3, texturing is always enabled, and this call is invalid.
While it produced no effect in the rest of the execution, it wouldn't
have the intended effect of disabling texturing for that unit. Instead
bind a null texture to the unit.
2015-07-22 01:22:09 -03:00
bunnei
3a5352baf8
Merge pull request #968 from Subv/texture_filtering
...
GPU: Added registers for min and mag texture filters
2015-07-21 18:27:50 -04:00
Subv
009e34f08a
GPU: Added registers for min and mag texture filters and implemented them in the hw renderer.
2015-07-21 16:26:09 -05:00
Tony Wasserka
aa6dfdb827
Merge pull request #929 from neobrain/geoshader_definitions
...
Pica/Shader: Add geometry shader definitions.
2015-07-21 15:24:48 +02:00
bunnei
9a3b21bcf9
Merge pull request #944 from Subv/spam
...
GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist.
2015-07-19 22:40:57 -04:00
Yuri Kunde Schlesner
ae985bf500
Pica: Correct switched S/T texture wrapping registers
...
This was found and hwtested by Lectem
2015-07-19 19:27:23 -03:00
Yuri Kunde Schlesner
5a75cf8fd2
Pica: Fix DP3 instruction, which wasn't assigning to the w component
2015-07-19 19:01:59 -03:00
Subv
a694caeee0
GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist.
2015-07-19 14:09:23 -05:00
Subv
3600c32483
Rasterizer/Textures: Fixed a bug where the I4 format would get twice the real stride.
...
Also added its name to the texture viewer widget
2015-07-19 13:15:23 -05:00
zawata
6933a50aeb
Vertex Shader : Undo casting
2015-07-19 04:12:42 -07:00
zawata
04756bdaf6
Video_Core : Type fixes
2015-07-19 04:12:40 -07:00
zawata
f7050021de
Video_Core: Finally fix pesky warning
2015-07-19 04:08:44 -07:00
zawata
017437e8d7
Video_Core : Change Tabs to Spaces
...
This really should be universalized, I keep getting errors creating
commits because lines I've edited use tabs instead of spaces(and yes I
did read the contributing guide and i know they are supposed to be
spaces)
2015-07-19 03:59:50 -07:00
zawata
716120da3d
Video_Core : Fix Conversion Warnings
2015-07-19 03:59:49 -07:00
Tony Wasserka
33568494af
Pica/Shader: Add geometry shader definitions.
2015-07-15 17:31:57 +02:00
Tony Wasserka
0ea2319f3c
Merge pull request #931 from neobrain/move_default_attr_handler
...
Pica/CommandProcessor: Move default attribute setup to the proper position.
2015-07-15 17:22:50 +02:00
Tony Wasserka
aeec12dc33
Pica/CommandProcessor: Move default attribute setup to the proper position.
2015-07-15 17:56:38 +02:00
Tony Wasserka
d2c3ecc8d8
Pica/Clipper: Output proper number of triangles in debugging logs.
2015-07-15 18:01:43 +02:00
Lectem
d08e9b29e2
VideoCore: Implement the DOT3_RGB combiner
2015-07-14 02:16:10 -03:00
Tony Wasserka
5e79706db2
Pica: Implement stencil testing.
2015-07-13 23:54:39 +02:00
Tony Wasserka
0799b40caa
Clean up command_processor.cpp.
2015-07-13 22:27:21 +02:00
Tony Wasserka
902fa4da52
Add CiTrace recording support.
...
This is exposed in the GUI as a new "CiTrace Recording" widget.
Playback is implemented by a standalone 3DS homebrew application (which only runs reliably within Citra currently; on an actual 3DS it will often crash still).
2015-07-13 22:27:20 +02:00
Tony Wasserka
ae7120f5d9
Merge pull request #907 from Lectem/clamp_to_border
...
Add GL_CLAMP_TO_BORDER support.
2015-07-12 03:19:46 +02:00
Lectem
58d1c6398e
Added GL_CLAMP_TO_BORDER support
2015-07-09 22:23:26 +02:00
Emmanuel Gil Peyrot
4964a359e1
Core: Cleanup hw includes.
2015-06-28 00:46:39 +01:00
Emmanuel Gil Peyrot
f48b28ad27
Core, VideoCore: Replace or fix exit() calls.
2015-06-28 00:36:55 +01:00
Emmanuel Gil Peyrot
45c4781544
CitraQt: Cleanup includes.
2015-06-28 00:36:54 +01:00
Emmanuel Gil Peyrot
22ae87530b
Common: Cleanup emu_window includes.
2015-06-28 00:36:54 +01:00
Emmanuel Gil Peyrot
596b7c4f63
Common: Cleanup key_map includes.
2015-06-28 00:36:54 +01:00
zawata
92bfec0566
VideoCore: Fix floating point warning
2015-06-26 21:38:04 -07:00
Emmanuel Gil Peyrot
94fc644430
VideoCore: Log the GL driver’s vendor and renderer.
2015-06-16 00:02:23 +01:00
Yuri Kunde Schlesner
9b7d85a4f5
video_core: add extra braces around initializer
...
Trivial change and fixes several warnings in the clang build.
2015-06-14 00:33:08 -03:00
tfarley
26bc816d7a
Renderer formatting edits
2015-06-08 19:19:15 -04:00
tfarley
66b0d799ee
Render-to-texture flush, interval math fix
2015-06-08 19:18:20 -04:00
tfarley
5025b35563
Liberal texture unbind (clout menu)
2015-06-08 19:18:19 -04:00
tfarley
fa2c92a3ac
Depth format fix (crush3d intro/black screens)
2015-06-08 19:18:18 -04:00
tfarley
d42275f11c
Implemented glColorMask
2015-06-08 19:18:17 -04:00
archshift
0414ad20cb
Merge pull request #811 from archshift/commonify
...
Commonify video_core utility headers
2015-05-31 09:55:29 -07:00
bunnei
33b9abb91e
Pica: Use zero for the SecondaryFragmentColor source.
...
- This is a workaround until we support fragment lighting.
2015-05-31 01:52:42 -04:00
bunnei
dcbc653b90
rasterizer: Remove unnecessary 'using' for BlendEquation.
2015-05-31 01:52:42 -04:00
bunnei
e6ace38815
Pica: Implement LogicOp function.
2015-05-31 01:52:41 -04:00
bunnei
3b5ff61201
rasterizer: Implement AddSigned combiner function for alpha channel.
2015-05-31 01:52:40 -04:00
bunnei
1574c44586
vertex_shader: Use address offset on src2 in inverted mode.
2015-05-31 01:52:40 -04:00
bunnei
02c9fe202c
Pica: Implement command buffer execution registers.
2015-05-31 01:52:39 -04:00
bunnei
4ac6c1a3b5
vertex_shader: Implement SLT/SLTI instructions.
2015-05-31 01:27:50 -04:00
bunnei
875bd29766
vertex_shader: Implement MIN instruction.
2015-05-31 01:27:49 -04:00
archshift
76690392bf
Move video_core/color.h to common/color.h
2015-05-30 11:17:37 -07:00
archshift
5df2d1b5f7
Move video_core/math.h to common/vector_math.h
...
The file only contained vector manipulation code, and such widely-useable code doesn't belong in video_core.
2015-05-30 11:17:36 -07:00
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
2015-05-29 21:59:29 +01:00
Lioncash
951353558e
gl_state: Remove unnecessary const specifier on Apply
2015-05-23 00:58:32 -04:00
Lioncash
dc587fa295
video_core/utils: Remove unused variables in GetMortonOffset
2015-05-23 00:38:37 -04:00
bunnei
1b42d55a9d
Pica: Create 'State' structure and move state memory there.
2015-05-22 22:59:42 -04:00
Lioncash
23d5df9d9c
gl_state: Fix a condition typo in Apply
2015-05-22 19:49:12 -04:00
tfarley
05dc633a8c
OpenGL renderer
2015-05-22 15:51:18 -07:00
bunnei
f0365f28c2
Merge pull request #772 from lioncash/warn
...
core/video_core: Fix a few warnings when compiling on MSVC.
2015-05-18 08:08:49 -04:00
Subv
24d9416930
GPU/DefaultAttributes: Clear up a comment in command_processor
2015-05-17 14:13:11 -05:00
Subv
658c44af5c
GPU/DefaultAttributes: Let the attribute data from the loaders overwrite the default attributes, if set.
...
closes #735
2015-05-17 11:52:17 -05:00
Yuri Kunde Schlesner
7ada357b2d
Memmap: Re-organize memory function in two files
...
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
2015-05-15 00:04:38 -03:00
Lioncash
497f4bee0c
pica: Add the ULL specifier in IsDefaultAttribute
...
This is necessary otherwise there are warnings about a 32-bit result being casted to a 64-bit value.
2015-05-14 14:23:23 -04:00
Yuri Kunde Schlesner
def5913d19
GPU: Add more fine grained profiling for vertex shader and rasterization
2015-05-12 15:59:52 -03:00
archshift
40310e2132
Implement I4 texture format
...
@neobrain, could you confirm that this is correct?
It's been tested with various different games and fixes different textures, including in Animal Crossing, Kirby Triple Deluxe, and SMB3D.
2015-05-10 18:59:22 -07:00
bunnei
23e8be573e
rasterizer: Implemented combiner output scaling.
2015-05-09 22:26:17 -04:00
bunnei
ff767eeb40
rasterizer: Implemented AddSigned combiner op.
2015-05-09 22:12:39 -04:00
bunnei
547da374b8
rasterizer: Fixed a depth testing bug.
2015-05-09 22:12:38 -04:00
bunnei
a806b420a6
rasterizer: Implement combiner buffer input.
2015-05-09 22:12:36 -04:00
bunnei
44927f0306
rasterizer: Return zero'd vectors on error conditions.
2015-05-09 22:12:35 -04:00
bunnei
692a74c09e
vertex_shader: Implement FLR instruction.
2015-05-09 22:12:34 -04:00
bunnei
f935130a0f
vertex_shader: Implement MADI instruction.
...
nihstro: Update submodule to latest upstream/master to support MADI instruction decoding.
2015-05-09 22:12:34 -04:00
Yuri Kunde Schlesner
17a8cae003
Memory: Add GetPhysicalPointer helper function
2015-05-09 04:02:32 -03:00
Yuri Kunde Schlesner
28a9e4c1d5
Memory: Support more regions in the VAddr-PAddr translation functions
...
Also adds better documentation and removes the one-off reimplementation
of the function in pica.h.
2015-05-09 03:08:11 -03:00
Yuri Kunde Schlesner
1c0b87edc2
Memory: Re-organize and rename memory area address constants
2015-05-09 01:29:52 -03:00
Yuri Kunde Schlesner
4f4d230dac
Merge pull request #721 from yuriks/more-cleanups
...
More cleanups
2015-05-07 11:45:45 -07:00
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
2015-05-07 15:45:22 -03:00
bunnei
337f1e1b96
Merge pull request #695 from Subv/crash_f
...
GPU: Implemented default vertex shader attributes.
2015-05-06 19:33:03 -04:00
Subv
0e5ca080a8
GPU: Implemented default vertex shader attributes.
...
Fixes some games crashing.
2015-05-06 18:11:46 -05:00
Emmanuel Gil Peyrot
36b48082d5
VideoCore: Remove a superfluous auto variable declaration in debug_utils.
2015-04-29 13:37:12 +02:00
Rohit Nirmal
f15c142c5e
Silence some -Wsign-compare warnings.
2015-04-09 18:55:01 -05:00
Gareth Higgins
8060c519a6
Changed occurences of colour to color for consistency
2015-04-05 02:36:43 -04:00
archshift
cae89fb315
Allow the user to set the background clear color during emulation
...
The background color can be seen at the sides of the bottom screen or when the window is wider than normal.
2015-04-03 15:35:51 -07:00
bunnei
c1f5cb7dd5
Merge pull request #652 from neobrain/shader_output_fix
...
Pica/VertexShader: Fix a bug caused due to incorrect assumptions of consecutive output register tables.
2015-03-16 18:35:34 -04:00
Emmanuel Gil Peyrot
92fd2a1ee3
VideoCore: Add static_cast around expressions where the compiler doesn’t deduce the right type.
2015-03-16 15:14:04 +01:00
Tony Wasserka
e4f5ec6272
Pica/VertexShader: Fix a bug caused due to incorrect assumptions of consecutive output register tables.
...
We now write create a temporary buffer for output registers and copy all of them to the actual output vertex structure after the shader has run. This is technically not necessary, but it's easier to vectorize in the future.
2015-03-12 14:18:46 +01:00
bunnei
b56829df02
Merge pull request #629 from archshift/lcdfb
...
Implement SetLcdForceBlack and add implementation for color filling in the GPU code
2015-03-10 18:08:55 -04:00
bunnei
ec5bc54575
Merge pull request #643 from Subv/dem_feels
...
GPU: Implemented more depth buffer formats.
2015-03-09 22:06:30 -04:00
Subv
1248e291f0
GPU: Added the stencil test structure to the Pica Regs struct.
2015-03-09 20:13:21 -05:00
Subv
414b0741c4
GPU: Implemented more depth buffer formats.
...
This fixes the horizontal lines in Picross E, Cubic Ninja, Cave Story 3D and possibly others
2015-03-09 20:12:39 -05:00
archshift
041e99b613
Added LCD registers, and implementation for color filling in OGL code.
2015-03-09 15:51:41 -07:00
Tony Wasserka
5742367341
Pica/PrimitiveAssembly: Fix triangle strips and fans being generated with incorrect winding order.
2015-03-09 21:49:49 +01:00
archshift
7d43aef4d0
Update nihstro submodule to the initial release version.
...
Includes more opcodes to implement in the future.
2015-03-08 13:52:38 -07:00
bunnei
06bf471581
Merge pull request #636 from bunnei/refactor-screen-win
...
Set framebuffer layout from EmuWindow.
2015-03-07 18:18:40 -05:00
bunnei
9960c49c21
Set framebuffer layout from EmuWindow.
2015-03-07 17:21:19 -05:00
Subv
4b8d4d0ed5
GPU/Textures: Fixed ETC texture decoding.
2015-03-07 16:21:54 -05:00
Tony Wasserka
93e32bce72
Merge pull request #538 from yuriks/perf-stat
...
Add profiling infrastructure and widget
2015-03-07 15:30:40 +01:00
bunnei
34c31db14a
GPU: Added RGB565/RGB8 framebuffer support and various cleanups.
...
- Centralizes color format encode/decode functions.
- Fixes endianness issues.
- Implements remaining framebuffer formats in the debugger.
2015-03-03 18:26:03 -05:00
Yuri Kunde Schlesner
cd1fbfcf1b
Add profiling infrastructure and widget
2015-03-01 21:47:13 -03:00
archshift
7f9ee69a2b
Added RGBA5551 compatibility in the rasterizer
...
This allows Virtual Console games to display properly.
2015-02-27 19:15:08 -08:00
Subv
c564c21668
GPU: Implemented bits 3 and 1 from the display transfer flags.
...
Bit 3 is used to specify a raw copy, where no processing is done to the data, seems to behave exactly as a DMA.
Bit 1 is used to specify whether to convert from a tiled format to a linear format or viceversa.
2015-02-26 21:17:14 -05:00
Yuri Kunde Schlesner
ea3c99f3a2
Video core: Fix A4 texture decoding
...
It was trying to take the LSB from `coarse_x`, which would always be 0
and thus would always return the same texel from each byte. To add
insult to the injury, the conditional was actually the wrong way around
too.
Fixes blocky text in OoT.
2015-02-25 23:05:14 -03:00
Yuri Kunde Schlesner
3c50da6fc0
Video core: Fix pixelation/blockiness in textures.
...
This was caused during morton decoding by me not masking the bits of
each coordinate before merging them, so the bits from x could set bits
in y if it was >255.
2015-02-25 22:16:01 -03:00
bunnei
ed255ebaec
Rasterizer: Add support for RGBA4 framebuffer format.
2015-02-24 19:58:33 -05:00
bunnei
733c19ddd3
Rasterize with the correct color component order.
...
- Fixes a regression with #594 .
2015-02-22 13:57:24 -05:00
Tony Wasserka
34f21334ad
Merge pull request #593 from Subv/search_problem
...
Pica/VertexShader: Fixed LOOP with more than one iteration.
2015-02-22 15:51:12 +01:00
Subv
9a03e9c61d
Pica/VertexShader: Fixed LOOP with more than one iteration.
...
Previously it wouldn't jump back to the start of the loop code once it reached the end of the block.
Fixes the texture problems in a lot of games.
2015-02-21 12:52:21 -05:00
bunnei
5f9939070e
Merge pull request #588 from archshift/somebranch
...
Sweeping cleanup of Common
2015-02-20 11:41:30 -05:00
archshift
302f0b32f5
Remove duplication of INSERT_PADDING_WORDS between pica.h and gpu.h
2015-02-19 22:26:25 -08:00
Subv
5410367ebf
Rasterizer: Fixed a warning in GetWrappedTexCoord.
...
Redeclaring the variable inside the switch was causing weird behavior.
2015-02-18 23:52:47 -05:00
bunnei
ec8f2210e3
Merge pull request #580 from lioncash/emplace
...
core/video_core: Use in-place construction where possible
2015-02-18 17:36:34 -05:00
Tony Wasserka
2eee3a87f9
Pica/Rasterizer: Replace exit() calls with UNIMPLEMENTED().
2015-02-18 14:52:27 +01:00
Tony Wasserka
6e5a903286
Pica/Rasterizer: Make some local lambdas static.
2015-02-18 14:50:28 +01:00
Tony Wasserka
1561204342
Pica/BlendUnit: Implement separate color/alpha blend equations.
2015-02-18 14:50:28 +01:00
Tony Wasserka
81ebb4d682
Pica/TextureEnvironment: Add a note.
2015-02-18 14:50:28 +01:00
Tony Wasserka
e11fb96408
Pica/TextureEnvironment: Treat texture combiner source 1 as the PrimaryColor.
...
Not really sure where the difference is, but some applications seem to use this 1:1 the same way...
2015-02-18 14:50:28 +01:00
Tony Wasserka
04cd06d5c2
Pica/TextureEnvironment: Add support for the MAD-like texture combiners and clean up texture environment logic.
2015-02-18 14:50:28 +01:00
Tony Wasserka
087edcfbec
Pica/OutputMerger: Fix flipped framebuffers.
2015-02-18 14:50:28 +01:00
Tony Wasserka
6ca752ccbc
Pica/TextureUnit: Implement mirrored repeating texture wrapping.
2015-02-18 14:50:28 +01:00
Tony Wasserka
8bd7a896ea
Pica: Fix a bug in the register definitions, relating to texture wrapping.
2015-02-18 14:50:28 +01:00
Tony Wasserka
aaf30ca4ee
Pica/OutputMerger: Implement color format checking.
2015-02-18 14:50:28 +01:00
Tony Wasserka
3b5710bae6
Pica/Rasterizer: Rasterize actual pixel centers instead of pixel corners.
2015-02-18 14:50:28 +01:00
Tony Wasserka
3cb22d31a7
Pica/Rasterizer: Fix garbage pixels at triangle borders.
2015-02-18 14:50:28 +01:00
Tony Wasserka
638b370fb5
Pica/Rasterizer: Clean up and fix backface culling.
2015-02-18 14:50:28 +01:00
Tony Wasserka
365236fa4c
Pica: Cleanup clipping code and change screenspace z to range from -1..0.
...
The change in depth range seems to reflect better to what applications are expecting, and makes for cleaner code overall (hence is more likely to reflect hardware behavior).
2015-02-18 14:50:03 +01:00
Tony Wasserka
70a764d992
Pica/VertexShader: Implement the LOOP instruction.
2015-02-18 14:02:59 +01:00
Tony Wasserka
6c26ec72a5
Pica/CommandProcessor: Properly implement shader load destination offset registers.
2015-02-18 14:02:59 +01:00
Tony Wasserka
67120270f2
Pica/CommandProcessor: Work around initialized vertex attributes some more.
2015-02-18 14:02:59 +01:00
Lioncash
5d2366e1e9
core/video_core: Use in-place construction where possible
2015-02-17 17:57:23 -05:00
Emmanuel Gil Peyrot
8a1c08a0af
VideoCore: Fix a typo in Vec4 MakeVec(T, Vec3<T>), where the second argument was Vec2<T> instead.
2015-02-16 21:51:37 +00:00
Emmanuel Gil Peyrot
c439b3074d
video_core: Implement the remaining framebuffer formats in the OpenGL renderer.
2015-02-15 14:08:12 +00:00
bunnei
12181c8a64
Merge pull request #529 from Subv/master
...
Build: Fixed some warnings
2015-02-14 15:50:26 -05:00
Subv
8e2b248e05
Build: Fixed some warnings
2015-02-12 09:25:35 -05:00
Darius Goad
5db62cc758
Fix Min and Max blend equations
2015-02-11 15:33:44 -06:00
archshift
ef24e72b26
Asserts: break/crash program, fit to style guide; log.h->assert.h
...
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
2015-02-10 18:30:31 -08:00
Darius Goad
536958fb29
Add more blend equations from 3dbrew
2015-02-09 20:41:06 -06:00
bunnei
1eb591d6fd
Rasterizer: Implement the other color and alpha modifiers.
2015-02-04 22:15:51 -05:00
bunnei
8c93a28fed
VideoCore: Added same-component swizzlers to math utility functions.
2015-02-04 22:15:44 -05:00
bunnei
72cc512b1e
Pica: Implement blend factors.
2015-01-31 01:40:05 -05:00
bunnei
b522cf4e6a
Pica: Implement color/alpha channel enable.
2015-01-27 22:03:34 -05:00
bunnei
b2c55bf772
Rasterizer: Implemented alpha testing.
2015-01-27 14:39:17 -05:00
bunnei
ff83d23ed5
GPU: Implement the remaining depth testing functions.
2015-01-25 23:34:14 -05:00
Yuri Kunde Schlesner
5961a2852d
GSP: Update framebuffer info on all interrupts
...
Hardware testing determined that the GSP processes shared memory
framebuffer update info even when no memory transfer or filling GX
commands are used. They are now updated on every interrupt, which isn't
confirmed correct but matches hardware behaviour more closely.
This also reverts the hack introduced in #404 . It made a few games
behave better, but I believe it's incorrect and also breaks other games.
2015-01-14 05:20:12 -02:00
bunnei
93f36c49f7
Merge pull request #473 from archshift/pp3ports
...
Pica/Rasterizer: Add ETC1 texture decompression support.
2015-01-13 18:11:18 -05:00
Tony Wasserka
f2b74b4fb3
Pica/Rasterizer: Add ETC1 texture decompression support.
2015-01-13 14:42:40 -08:00
bunnei
99c0716d4d
Merge pull request #478 from archshift/pp3ports4
...
Pica/VertexShader: Implement the MAD instruction.
2015-01-12 21:55:35 -05:00
Tony Wasserka
2b9a9a45b7
Pica/VertexShader: Implement JMPC/JMPU/CALLC/CALLU.
2015-01-12 15:47:21 -08:00
Tony Wasserka
e02db3904b
Pica/VertexShader: Implement the MAD instruction.
2015-01-12 15:34:36 -08:00
bunnei
f7a3f45f1e
GSP: Toggle active framebuffer each frame
2015-01-07 18:06:00 -05:00
Tony Wasserka
bc187be0c1
Pica/Rasterizer: Remove some redundant casts.
2014-12-31 16:32:56 +01:00
Tony Wasserka
9675d19b47
Pica/Rasterizer: Make orient2d a free function and rename it to SignedArea.
2014-12-31 16:32:56 +01:00
Tony Wasserka
47543d62cf
Pica: Cleanup color conversion.
2014-12-31 16:32:55 +01:00
Tony Wasserka
614baa39d1
VideoCore: Remove some unused functions.
2014-12-31 16:32:55 +01:00
Tony Wasserka
d13bd327ba
Pica/Rasterizer: Fix a bug related to multitexturing and texture wrapping.
2014-12-31 16:32:55 +01:00
Tony Wasserka
195d73a385
Pica/Rasterizer: Clean up long code lines.
2014-12-31 16:32:55 +01:00
Tony Wasserka
40c7200841
Pica/VertexShader: Coding style fixes.
2014-12-31 16:32:55 +01:00
Tony Wasserka
323a56f898
Pica/CommandProcessor: Cleanups.
2014-12-31 16:32:55 +01:00
Tony Wasserka
b2d461020d
Pica/CommandProcessor: Workaround games not setting the input position's w component.
2014-12-31 16:32:55 +01:00
Tony Wasserka
0f49424022
Pica/Rasterizer: Implement backface culling.
2014-12-31 16:32:55 +01:00
Tony Wasserka
3b78af904e
Pica/Rasterizer: Textures seem to be laid out flipped vertically.
...
Not sure if this is a correct fix. Probably should instead change the decoding logic itself.
2014-12-31 16:32:55 +01:00
Tony Wasserka
3da52ead9b
Pica/DebugUtils: Fix a bug in RGBA4 texture decoding.
2014-12-31 16:32:55 +01:00
Tony Wasserka
a7ae0330b1
Pica/Rasterizer: Implement alpha blending.
2014-12-31 16:32:55 +01:00
Tony Wasserka
e229ff8c83
Pica/Rasterizer: Implement depth testing.
2014-12-31 16:32:55 +01:00
Tony Wasserka
77bb58afeb
Pica/Rasterizer: Further enhance Tev support.
2014-12-31 15:35:54 +01:00
Tony Wasserka
36291bc3f6
Pica: Add output merger definitions.
2014-12-31 15:35:54 +01:00
Tony Wasserka
632655e292
Pica: Fix A4, IA4 and IA8 texture formats.
...
Both IA4 and IA8 had their component order mixed up. Additionally, IA4 used the wrong number of nibbles per texel. A4 skipped every second texel.
2014-12-31 15:35:24 +01:00
Tony Wasserka
b7a48c422a
Pica/CommandProcessor: Add support for integer uniforms.
2014-12-31 15:33:09 +01:00
Yuri Kunde Schlesner
8369ee5803
Rasterizer: Pre-divide vertex attributes by W
...
Execute the division-by-W for perspective-correct interpolation of
values in the clipper, moving them out of the rasterization inner loop.
2014-12-29 02:08:11 -02:00
Yuri Kunde Schlesner
fe186d3a59
GPU: Bitwise texture swizzling
...
Replace the loop-based texture address swizzling code by a bit-twiddling
implementation, providing a very small speed up. Also simplify
addressing code.
2014-12-29 02:08:11 -02:00
Yuri Kunde Schlesner
2012e1420f
Rasterizer: Common sub-expression elimination
...
Move the computation of some values out of loops so that they're not
constantly recalculated even when they don't change.
2014-12-29 02:08:10 -02:00
Yuri Kunde Schlesner
7e9bc85cc8
Clipper: Compact buffers on each clipping pass
...
Use a new buffer management scheme in the clipper that allows using a
bounded minimal amount of buffer space. Even though it copies more data
it is still slightly faster likely due to using less cache.
2014-12-29 02:08:10 -02:00
Yuri Kunde Schlesner
a320d1a5b4
Clipper: Avoid dynamic allocations
...
The triangle clipper was allocating its temporary input, output and work
buffers using a std::vector. Since this is a hot path, it's desirable to
use stack allocation instead.
2014-12-29 02:08:09 -02:00
Yuri Kunde Schlesner
d151d797b1
Vertex Shader: Zero OutputVertex to avoid denormals
...
Unused OutputVertex attributes were being left un-initialized. The
leftover garbage sometimes decoded as floating-point denormalized
values, causing fallbacks to microcode and massive slowdowns in the rest
of the rasterization pipeline even though the results were unused. By
zeroing the structure we ensure these attributes only contain harmless
zeros.
2014-12-29 02:08:09 -02:00
bunnei
3b9d181b8e
GPU: Implement frameskip and remove forced framebuffer swap hack.
2014-12-28 22:14:05 -05:00
bunnei
01c675685e
Merge pull request #327 from Apology11/master
...
Fix visual studio ambiguous symbol error
2014-12-26 21:43:59 -05:00
bunnei
2188af4a65
Merge pull request #322 from chinhodado/master
...
More warning cleanups
2014-12-22 00:12:43 -05:00
bunnei
0de6a08d75
Merge pull request #291 from purpasmart96/license
...
License change
2014-12-21 16:05:44 -05:00
Apology11
8d81e23d6e
Fix visual studio ambiguous symbol error
2014-12-21 18:34:20 +01:00
Chin
0199a7d9ef
More warning cleanups
2014-12-21 10:58:55 -05:00
purpasmart96
ebfd831ccb
License change
2014-12-20 21:20:24 -08:00
Tony Wasserka
08f42c2b8c
Pica/VertexShader: Promote a log message to critical status.
2014-12-20 18:06:56 +01:00
Tony Wasserka
17f31de364
Pica/VertexShader: Small optimization.
2014-12-20 18:06:56 +01:00
Tony Wasserka
a664574ecb
Pica/VertexShader: Be robust against invalid inputs.
...
More specifically, this also fixes crashes by Citra trying to load a src2 register even if the current instruction does not use that.
2014-12-20 18:06:56 +01:00
Tony Wasserka
ad5db467d7
Pica/VertexShader: Clarify a comment.
2014-12-20 18:06:56 +01:00
Tony Wasserka
871418e62b
Pica/DebugUtils: Further cleanups to LookupTexture.
2014-12-20 18:06:56 +01:00
Tony Wasserka
88e9efe4b8
Pica/DebugUtils: Fix two warnings.
2014-12-20 18:06:56 +01:00
Tony Wasserka
6e275778c9
Pica/DebugUtils: Better document LookupTexture.
2014-12-20 18:06:55 +01:00
Tony Wasserka
e4e9710d18
Pica/Rasterizer: Get rid of C-style casts.
2014-12-20 18:06:55 +01:00
Tony Wasserka
d81370682f
Pica/DebugUtils: Make a number of variables static.
...
Makes for cleaner and faster code.
2014-12-20 18:06:55 +01:00
Tony Wasserka
6bd41de276
Pica/VertexShader: Cleanup flow control logic and implement CMP/IFU instructions.
2014-12-20 18:06:55 +01:00
Tony Wasserka
22afb9d830
Pica/VertexShader: Run instruction handlers according to the effective opcode.
...
This allows for proper emulation of the different CMP/LRP/MAD instructions.
2014-12-20 18:06:55 +01:00
Tony Wasserka
cd163fb59a
Pica/VertexShader: Implement MAX instructions.
2014-12-20 18:06:55 +01:00
Tony Wasserka
aff808b2fd
Pica: Add support for boolean uniforms.
2014-12-20 18:06:55 +01:00
Tony Wasserka
67618a2c55
Pica/VertexShader: Add support for MOVA, CMP and IFC.
2014-12-20 18:06:55 +01:00
Tony Wasserka
cb1804e0ab
Pica/VertexShader: Move code around a bit.
2014-12-20 18:06:55 +01:00
Tony Wasserka
b85524c760
Pica/VertexShader: Some cleanups using std::array.
2014-12-20 18:06:55 +01:00
Tony Wasserka
ce36ad454e
Pica/VertexShader: Support negating src2.
2014-12-20 18:06:55 +01:00
Tony Wasserka
cc5746abfe
Pica/DebugUtils: Replace duplicated SHBIN structures in favor of nihstro's ones.
2014-12-20 18:06:55 +01:00
Tony Wasserka
8ce1d32460
Pica/VertexShader: Remove (now) duplicated shader bytecode definitions in favor of nihstro's ones.
2014-12-20 18:06:55 +01:00
Tony Wasserka
79c29243ed
Pica/DebugUtils: Add an event triggered after loading a vertex.
2014-12-20 18:06:55 +01:00
Tony Wasserka
cd322e328e
Pica/PrimitiveAssembly: Implement triangle strips.
2014-12-20 18:06:54 +01:00
Tony Wasserka
346012f29e
Pica/CommandProcessor: Add a safety check for invalid (?) GPU configurations.
2014-12-20 18:06:54 +01:00
Tony Wasserka
1e960e9ee2
Pica/CommandProcessor: Fix vertex decoding if multiple memory areas are accessed for different attributes.
2014-12-20 18:06:54 +01:00
Tony Wasserka
1c972ef3b9
Add support for a ridiculous number of texture formats.
2014-12-20 18:06:54 +01:00
Tony Wasserka
40f123b7c0
Pica: Unify ugly address translation hacks.
2014-12-20 18:06:53 +01:00
Tony Wasserka
7e210e0229
Pica: Further improve Tev emulation.
2014-12-20 18:05:53 +01:00
Tony Wasserka
3df88d59b0
Pica: Merge texture lookup logic for DebugUtils and Rasterizer.
...
This effectively adds support for a lot texture formats in the rasterizer.
2014-12-20 18:05:53 +01:00
Tony Wasserka
0fba1d48a6
Pica: Implement texture wrapping.
2014-12-20 18:05:53 +01:00
Tony Wasserka
c81f1a9ebc
Pica/DebugUtils: Add support for RGBA8, RGBA5551, RGBA4 and A8 texture formats.
2014-12-20 18:05:53 +01:00
Tony Wasserka
fd2539121c
Pica: Initial support for multitexturing.
2014-12-20 18:05:53 +01:00
Chin
e795692614
Clean up some warnings
2014-12-20 10:03:36 -05:00
chinhodado
d31c23e958
Properly erase/remove an observer
2014-12-19 14:24:44 -05:00
Yuri Kunde Schlesner
0600e2d8b5
Convert old logging calls to new logging macros
2014-12-13 02:08:02 -02:00
bunnei
a6791e4fc7
Merge pull request #267 from bunnei/apt-shared-font
...
APT shared font loading
2014-12-12 22:12:12 -05:00
Tony Wasserka
33e61ef514
Merge pull request #261 from neobrain/boost
...
Add Boost as a submodule and add some minor cleanups using Boost.Range
2014-12-12 17:32:57 +01:00
bunnei
4cb7a44d4e
MemMap: Renamed "GSP" heap to "linear", as this is not specific to GSP.
...
- Linear simply indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA (such as the GPU).
2014-12-12 00:15:47 -05:00
bunnei
f94d8f9603
GSP: Trigger GPU interrupts at more accurate locations.
2014-12-09 19:07:14 -05:00
bunnei
170123982d
GPU: Fixed bug in command list size decoding.
2014-12-09 19:07:13 -05:00
Tony Wasserka
0305435edd
Pica: Re-enable command names on MSVC.
...
The affected code is no longer limited by compiler support on that platform.
2014-12-09 16:37:34 +01:00
Tony Wasserka
79bb403089
More coding style fixes.
2014-12-09 16:37:34 +01:00
Tony Wasserka
0cd27a511e
Some code cleanup.
2014-12-09 16:37:34 +01:00
Tony Wasserka
2793619dce
citra_qt: Add enhanced texture debugging widgets.
...
Double-clicking a texture parameter command in the pica command lists will spawn these as a new tab in the pica command list dock area.
2014-12-09 16:37:34 +01:00
Tony Wasserka
fd194d95b0
citra-qt: Add texture viewer to Pica command list.
...
The texture viewer is enabled when selecting a write command to one of the texture config registers.
2014-12-09 16:37:34 +01:00
Tony Wasserka
2c71ec7052
Pica/DebugUtils: Add breakpoint functionality.
2014-12-09 16:37:34 +01:00
Tony Wasserka
8db65723d2
Build fix for something which shouldn't have compiled successfully to begin with.
2014-12-09 16:37:34 +01:00
Tony Wasserka
4d4572c697
Integrate Boost into build system and perform a trivial cleanup in vertex_shader.cpp.
2014-12-07 23:52:17 +01:00
Rohit Nirmal
8a62423970
Change NULLs to nullptrs.
2014-12-03 12:57:57 -06:00
bunnei
63b1453dd8
Merge pull request #236 from rohit-n/sign-compare
...
Silence a few -Wsign-compare warnings.
2014-12-03 10:04:47 -05:00
Rohit Nirmal
f9b53c3e94
Silence a few -Wsign-compare warnings.
2014-11-30 22:29:23 -06:00
vaguilar
95b33ee0a7
Fixed viewport error caused by rounding
2014-11-30 09:53:50 -08:00
Emmanuel Gil Peyrot
739bb58c3a
Remove tabs in all files except in skyeye imports and in generated GL code
2014-11-19 09:04:03 +00:00
Emmanuel Gil Peyrot
f5d38649c7
Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated
2014-11-19 09:03:07 +00:00
Tony Wasserka
c5c6e095f0
OpenGL Renderer: Cleanup viewport extent calculation.
2014-11-18 13:09:01 +01:00
Tony Wasserka
bd8f491e4c
Fixup EmuWindow interface and implementations thereof.
2014-11-18 13:09:01 +01:00
Kevin Hartman
221a9b023d
Viewport scaling and display density independence
...
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window.
On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.
2014-11-18 13:06:05 +01:00
Tony Wasserka
8717c79fe4
Merge pull request #195 from lioncash/control
...
vertex_shader: Fix control reaches end of function warning
2014-11-16 22:50:00 +01:00
Lioncash
bd76783d91
vertex_shader: Fix control reaches end of function warning
2014-11-16 16:44:14 -05:00
Lioncash
ac58b76e71
Fix two format strings.
2014-11-14 12:08:26 -05:00
bunnei
01e37962e7
Merge pull request #162 from SeannyM/warning-fixes
...
Fix some warnings
2014-10-29 21:07:27 -04:00
Sean
9a012ff007
Fix some warnings
2014-10-29 20:26:15 -04:00
Gareth Poole
38df9e96dd
Renamed souce files of services to match port names
2014-10-29 15:55:51 -04:00
Yuri Kunde Schlesner
d72708c1f5
Add override
keyword through the code.
...
This was automated using `clang-modernize`.
2014-10-26 16:18:05 -02:00
Yuri Kunde Schlesner
15c59f3974
Only check OpenGL shader log if size is >1.
...
This prevents a crash when the buffer size returned by the driver is 0,
in which case no space is allocated to store even the NULL byte and
glGetShaderInfoLog errors out.
Thanks to @Relys for the bug report.
2014-10-21 16:07:39 -02:00
Yuri Kunde Schlesner
11642fd3a2
Rework OpenGL renderer.
...
The OpenGL renderer has been revised, with the following changes:
- Initialization and rendering have been refactored to reduce the number of
redundant objects used.
- Framebuffer rotation is now done directly, using texture mapping.
- Vertex coordinates are now given in pixels, and the projection matrix
isn't hardcoded anymore.
2014-10-12 14:38:53 +02:00
Yuri Kunde Schlesner
5f598a5e2c
OpenGL renderer: Shuffle initialization code around and rename functions.
2014-10-12 14:37:24 +02:00
Yuri Kunde Schlesner
787a1b047c
Remove virtual inheritance from RendererOpenGL
...
Also make destructor virtual so that instances are properly destructed.
2014-10-12 14:37:24 +02:00
Lioncash
eb5054e6eb
Fix warnings in video_core
2014-10-07 20:35:13 -04:00
Emmanuel Gil Peyrot
6b7b36a874
Common: Rename the File namespace to FileUtil, to match the filename and prevent collisions.
2014-09-17 14:35:45 +00:00
bunnei
31d9cf4d17
Merge pull request #110 from lioncash/warnings
...
Core: Fix warnings in gpu.cpp
2014-09-14 21:28:44 -04:00
bunnei
5481115e71
Merge pull request #97 from archshift/cleanup
...
Small, general code cleanup
2014-09-13 22:58:58 -04:00
Lioncash
6cc7c73b80
Core: Fix warnings in gpu.cpp
2014-09-13 22:55:41 -04:00
Kevin Hartman
02fd19b2f6
Added support for multiple input device types for KeyMap and connected Qt.
2014-09-12 01:15:14 -07:00
archshift
8fe5f2e2fe
Moved common_types::Rect from common to Common namespace
2014-09-08 15:43:36 -07:00
archshift
81baa477b5
renderer_opengl.cpp: improved alignment for readability
2014-09-07 12:09:02 -07:00
archshift
1c02c03e32
Dead code removal: video_core.cpp, load_symbol_map.cpp
2014-09-07 12:09:02 -07:00
archshift
0167e9140e
utils: cleaned up DumpTGA, removing redundancies
2014-09-07 12:09:02 -07:00
Yuri Kunde Schlesner
c57de3e404
Remove hand-crafted Visual Studio solution.
2014-09-01 18:06:30 -03:00
Yuri Kunde Schlesner
45976da975
CMake cleanup
...
Several cleanups to the buildsystem:
- Do better factoring of common libs between platforms.
- Add support to building on Windows.
- Remove Qt4 support.
- Re-sort file lists and add missing headers.
2014-09-01 18:06:30 -03:00
Yuri Kunde Schlesner
478289140d
Replace GLEW with a glLoadGen loader.
...
This should fix the GL loading errors that occur in some drivers due to
the use of deprecated functions by GLEW. Side benefits are more accurate
auto-completion (deprecated function and symbols don't exist) and faster
pointer loading (less entrypoints to load). In addition it removes an
external library depency, simplifying the build system a bit and
eliminating one set of binary libraries for Windows.
2014-09-01 17:41:56 -03:00
Yuri Kunde Schlesner
9d172ab550
Downgrade GLSL version to 1.50 (compatible with GL 3.2)
2014-08-28 05:38:13 -03:00
bunnei
20d169e4a1
VideoCore: Fixes rendering issues on Qt and corrects framebuffer output size.
2014-08-26 17:34:52 -04:00
Kevin Hartman
cbfd6b6e52
Rewrite of OpenGL renderer, including OS X support
...
Screen contents are now displayed using textured quads. This can be updated to expose an FBO once an OpenGL backend for when Pica rendering is being worked on. That FBO's texture can then be applied to the quads.
Previously, FBO blitting was used in order to display screen contents, which did not work on OS X. The new textured quad approach is less of a compatibility risk.
2014-08-25 20:56:59 -07:00
Tony Wasserka
a79644c9ba
Pica/Rasterizer: Clarify a TODO.
2014-08-25 22:03:19 +02:00
Tony Wasserka
697b50c3ff
Pica/VertexShader: Fix a bug in the call stack handling.
2014-08-25 22:03:19 +02:00
Tony Wasserka
b5b3aeb576
Math: Warning fixes.
2014-08-25 22:03:19 +02:00
Tony Wasserka
2f1c129f64
Pica: Consolidate the primitive assembly code in PrimitiveAssembly and GeometryDumper.
2014-08-25 22:03:19 +02:00
Tony Wasserka
9679d231df
Pica/Rasterizer: Add texturing support.
2014-08-25 22:03:18 +02:00
Tony Wasserka
34fa0b6d9c
Pica/DebugUtils: Add convenient tev setup printer.
2014-08-25 22:03:18 +02:00
Tony Wasserka
27cab6477e
Pica/Rasterizer: Add initial implementation of texture combiners.
2014-08-25 22:03:18 +02:00
Tony Wasserka
c4691b784b
Pica: Add support for dumping textures.
2014-08-25 22:03:18 +02:00
Tony Wasserka
162d641a30
Pica/Math: Improved the design of the Vec2/Vec3/Vec4 classes and simplified rasterizer code accordingly.
...
- Swizzlers now return const objects so that things like "first_vec4.xyz() = some_vec3" now will fail to compile (ideally we should support some vector holding references to make this actually work).
- The methods "InsertBeforeX/Y/Z" and "Append" have been replaced by more versions of MakeVec, which now also supports building new vectors from vectors.
- Vector library now follows C++ type promotion rules (hence, the result of Vec2<u8> with another Vec2<u8> is now a Vec2<int>).
2014-08-25 22:03:18 +02:00
Tony Wasserka
62c36a4ef0
Pica/VertexShader: Fix a bug in the bitfield definitions and add the "negate" field for swizzlers.
2014-08-25 22:03:18 +02:00
Tony Wasserka
26ade98411
Pica/citra-qt: Replace command list view and command list debugging code with something more sophisticated.
2014-08-25 22:03:18 +02:00
Tony Wasserka
0465adf206
Pica/CommandProcessor: Implement parameter masking.
2014-08-25 22:03:18 +02:00
Tony Wasserka
f37e39deb9
Pica: Add debug utilities for dumping shaders.
2014-08-25 22:03:18 +02:00
Tony Wasserka
6ea003c7b5
Pica: Add debug utility functions for dumping geometry data.
2014-08-25 22:03:18 +02:00
Sacha
a3a70e56ac
Fix the threading for GL Context in Qt5.
...
Connect the emu_thread start/finish to a moveContext slot.
2014-08-25 00:47:00 +10:00
bunnei
388356f629
Merge pull request #42 from archshift/glexp
...
Use glewExperimental to fix crashes with citra-glfw
2014-08-13 13:10:45 -04:00
archshift
662a1993e6
float24: Remove private default constructor
...
Fixes building with clang.
2014-08-13 02:54:16 -07:00
archshift
d71af1bd20
Use glewExperimental on Linux in order to fix GLFW-mode
2014-08-12 13:42:04 -07:00
Tony Wasserka
94d742fe17
Pica: Add basic rasterizer.
2014-08-12 13:50:07 +02:00
Tony Wasserka
94aa9da562
Pica: Add triangle clipper.
2014-08-12 13:49:33 +02:00
Tony Wasserka
9a76a2d061
Pica: Add primitive assembly stage.
2014-08-12 13:48:56 +02:00
Tony Wasserka
c526512619
Pica: Add vertex shader implementation.
2014-08-12 13:48:10 +02:00
Tony Wasserka
d443f0a921
Pica: Implement vertex loading.
2014-08-12 13:47:31 +02:00
Tony Wasserka
1a43f69477
Pica: Add register definition for vertex loading and rendering.
2014-08-12 13:47:31 +02:00
Tony Wasserka
76a586de49
Pica: Add command processor.
2014-08-12 13:47:30 +02:00
Tony Wasserka
98ad16a45b
Pica: Add float24 structure.
...
24-bit floating points are used internally for calculations on the GPU, however the current code will still emulate that with 32-bit floating points.
In the future we might want to accurately perform the calculations with correct bitness in the future, but for now we just wrap the calculations around this class.
2014-08-12 13:46:24 +02:00
Tony Wasserka
8528c810cf
Video core: Add utility class for vector operations.
...
I wrote most of this for ppsspp, so I hold full copyright over it.
In addition to the original release in ppsspp, this provides functionality to easily extend e.g. two-dimensional vectors to three-dimensional vectors.
2014-08-12 13:46:20 +02:00
Tony Wasserka
7b6a7d7dfb
Pica/GPU: Change hardware registers to use physical addresses rather than virtual ones.
...
This cleans up the mess that address reading/writing had become and makes the code a *lot* more sensible.
This adds a physical<->virtual address converter to mem_map.h. For further accuracy, we will want to properly extend this to support a wider range of address regions. For now, this makes simply homebrew applications work in a good manner though.
2014-08-12 13:32:56 +02:00