Commit Graph

595 Commits (aacc3a4a59a9a66c3768c8cbba0ab4c03a4e5920)

Author SHA1 Message Date
Jannik Vogel f746a00964 Respect vs output map 9 years ago
Jannik Vogel a66c186e81 PICA: Align vertex attributes 9 years ago
bunnei 6efb710b28 shader_jit_x64: Clear cache after code space fills up. 9 years ago
bunnei c103759cdc shader_jit_x64: Make assert outputs more useful & cleanup formatting. 9 years ago
bunnei 46f78b7f19 shader: Update log message to use proper log class. 9 years ago
Yuri Kunde Schlesner 305e63d9ea Merge pull request #1475 from lioncash/align
Common: Get rid of alignment macros
9 years ago
bunnei 4a2d1571bc Merge pull request #1474 from lioncash/renderer
renderer_base: Minor changes
9 years ago
Lioncash 88d604383e Common: Get rid of alignment macros
The gl rasterizer already uses alignas,
so we may as well move everything over.
9 years ago
bunnei 8530a2d7df Merge pull request #1344 from LittleWhite-tb/error-output
Output errors in GUI
9 years ago
Lioncash 4b5b32e721 renderer_base: In-class initialize variables 9 years ago
Lioncash be913040a8 render_base: Clarify/normalize getter functions 9 years ago
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.
9 years ago
LittleWhite 4be68dddfb Improve error report from Init() functions
Add error popup when citra initialization failed
9 years ago
Yuri Kunde Schlesner c58bc25d5b Pica: Write depth value even when depth test is disabled
This has been confirmed on hardware. Fixes Etrian Odyssey IV.
9 years ago
Dwayne Slater 6b775034dd Add immediate mode vertex submission 9 years ago
bunnei 2b00bdec1f Merge pull request #1424 from MerryMage/lut_init
renderer_opengl: Initalise fragment shader LUT textures
9 years ago
MerryMage 0801363840 renderer_opengl: Initalise fragment shader LUT textures 9 years ago
bunnei e04e6aabbc Merge pull request #1395 from ds84182/padding-attributes
Add support for padding vertex attributes
9 years ago
Dwayne Slater ed8072b48b Fix out of bounds array access when loading a component >= 12 9 years ago
Dwayne Slater 82fc075ff6 Add support for padding vertex attributes 9 years ago
MerryMage 6c71858c5c BitField: Make trivially copyable and remove assignment operator 9 years ago
bunnei 19557aaab3 pica: Cleanup lighting register definitions and documentation. 9 years ago
bunnei c4d318f691 gl_rasterizer: Use alignas(16) instead of explicit padding. 9 years ago
bunnei aaa7beeda8 renderer_opengl: Use GLvec3/GLvec4 aliases for commonly used types. 9 years ago
bunnei 8e9318f20a gl_rasterizer: Fix issue with interpolation of opposite quaternions. 9 years ago
bunnei b694423d09 pica_types: Fix typo in docstring. 9 years ago
bunnei a949fd5f25 pica_types: Replace float24/20/16 with a template class. 9 years ago
bunnei d171822dce command_processor: Add an assertion to ensure LUTs are not written past their boundaries. 9 years ago
bunnei 310a1c30ca gl_rasterizer: Remove unnecessary casts. 9 years ago
bunnei c229503f4a gl_rasterizer: Fix PicaShaderConfig on GCC. 9 years ago
bunnei 9dfb223d26 gl_rasterizer: Initial implementation of bump mapping. 9 years ago
bunnei 449902b558 gl_shader_gen: Fix bug in LUT range (should within range [0, 255] not [0, 256]). 9 years ago
bunnei 348c9c9ff3 gl_shader_gen: Implement lighting red, green, and blue reflection. 9 years ago
bunnei 01b407638c gl_shader_gen: View should be normalized. 9 years ago
bunnei c37de30cfc gl_shader_gen: Implement fragment lighting fresnel effect. 9 years ago
bunnei 0e67c21c9e gl_shader_gen: Implement fragment lighting specular 1 component. 9 years ago
bunnei 781b046579 gl_shader_gen: Add support for D0 LUT scaling. 9 years ago
bunnei 3d89dacd56 gl_shader_gen: Refactor lighting config to match Pica register naming.
- Also implement D0 LUT enable.
9 years ago
bunnei 6307999116 pica: Cleanup and add some comments to lighting registers. 9 years ago
bunnei 6878ba7608 gl_rasterizer: Minor naming refactor on Pica register naming. 9 years ago
bunnei 76f303538b gl_shader_gen: Reorganize and cleanup lighting code.
- No functional difference.
9 years ago
bunnei 5f3bad8fb1 gl_shader_gen: Fix directional lights. 9 years ago
bunnei bdc72d0904 gl_shader_gen: Fix bug with lighting where clamp highlights was only applied to last light. 9 years ago
bunnei 603b619cbe gl_shader_gen: View vector needs to be normalized when computing half angle vector. 9 years ago
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.
9 years ago
bunnei bf89870437 renderer_opengl: Initial implementation of basic specular lighting. 9 years ago
bunnei e34fa6365f renderer_opengl: Implement HW fragment lighting distance attenuation. 9 years ago
bunnei e9af70eaf3 renderer_opengl: Implement HW fragment lighting LUTs within our default UBO. 9 years ago
bunnei afbef52516 renderer_opengl: Implement diffuse component of HW fragment lighting. 9 years ago
bunnei b003075570 pica: Implement decoding of basic fragment lighting components.
- Diffuse
- Distance attenuation
- float16/float20 types
- Vertex Shader 'view' output
9 years ago
bunnei 281bc90ad2 pica: Implement fragment lighting LUTs. 9 years ago
bunnei 4369767c72 pica: Add decodings for distance attenuation and LUT registers. 9 years ago
bunnei 38c7b20475 pica: Add pica_types module and move float24 definition. 9 years ago
tfarley a15f4d1590 hwrasterizer: Use proper cached fb addr/size 9 years ago
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.
9 years ago
bunnei a43f8d2fb7 Merge pull request #1367 from yuriks/jit-jmp
Shader JIT: Fix off-by-one error when compiling JMPs
9 years ago
bunnei c407b6ce2f Merge pull request #1369 from yuriks/jmpu-inverted
Shader: Implement "invert condition" feature of IFU instruction
9 years ago
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.
9 years ago
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.
9 years ago
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.
9 years ago
bunnei 0b6cc0592d Merge pull request #1334 from tfarley/hw-depth-modifiers
hwrasterizer: Use depth offset
9 years ago
tfarley f53dbafdae hwrasterizer: Use depth offset 9 years ago
Lioncash 4966568076 command_processor: Get rid of variable shadowing 9 years ago
bunnei 6a261e825c Merge pull request #1196 from linkmauve/khr_debug
Add optional GL_KHR_debug support
9 years ago
Lioncash 5e17a586da video_core: Make the renderer global a unique_ptr 9 years ago
Lioncash 97dc9634a2 swrasterizer: Add missing override specifier 9 years ago
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.
9 years ago
Yuri Kunde Schlesner 402692c08d Merge pull request #1267 from yuriks/flipped-framebuffer
OpenGL: Flip framebuffers during transfer rather than when rendering
9 years ago
bunnei 3013f26d70 Merge pull request #1269 from Subv/triangle_fan
GPU/PrimitiveAssembler: Fixed drawing triangle fans.
9 years ago
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.
9 years ago
Yuri Kunde Schlesner 03835d04f4 VideoCore: Rename HWRasterizer methods to be less confusing 9 years ago
Yuri Kunde Schlesner da80ece8b9 OpenGL: Rename cache functions to better match what they actually do 9 years ago
Subv 7b33e163b9 GPU/PrimitiveAssembler: Fixed drawing triangle fans.
It was skipping the second vertex assignment and using uninitialized garbage when assembling the corresponding triangle.
9 years ago
Yuri Kunde Schlesner cf81e08389 OpenGL: Flip framebuffers during transfer rather than when rendering 9 years ago
Yuri Kunde Schlesner 95dbc6eb0e OpenGL: Add support for glFrontFace in the state tracker 9 years ago
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.
9 years ago
bunnei f008dfbaca renderer_opengl: Fix uniform issues introduced with kemenaran/avoid-explicit-uniform-location. 9 years ago
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).
9 years ago
Subv 823ce62f2f FragShader: Use an UBO instead of several individual uniforms 9 years ago
Subv 7a37dba75b GPU/Loaders: Log an error when a loader tries to load from a component beyond the available ones (12).
Related to #1170
9 years ago
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.
9 years ago
bunnei 74186a5f01 gl_shader_gen: Use explicit locations for vertex shader attributes. 9 years ago
bunnei e663f5c914 gl_shader_gen: Optimize code for AppendAlphaTestCondition.
- Also add a comment to AppendColorCombiner.
9 years ago
bunnei e7b1f2ae0a gl_rasterizer: Define enum types for each vertex texcoord attribute. 9 years ago
bunnei 0ebcff710e gl_shader_gen: Various cleanups to shader generation. 9 years ago
bunnei 240a3b80d9 gl_rasterizer: Use MMH3 hash for shader cache hey.
- Includes a check to confirm no hash collisions.
9 years ago
bunnei 71edb55114 gl_shader_gen: Require explicit uniform locations.
- Fixes uniform issue on AMD.
9 years ago
bunnei 5ef2df056d gl_shader_gen: Rename 'o' to 'attr' in vertex/fragment shaders. 9 years ago
bunnei c2c4faef4c gl_shader_gen: AppendAlphaModifier default should be 0.0, not vec4(0.0). 9 years ago
bunnei bd833b8dd8 gl_shader_gen: Fix bug where TEV stage outputs should be clamped. 9 years ago
bunnei f2e7f7e101 gl_rasterizer: Add documentation to ShaderCacheKey. 9 years ago
bunnei 4b5141954e gl_shader_gen: Add additional function documentation. 9 years ago
bunnei 2a0a86f629 gl_shader_util: Cleanup header file + add docstring. 9 years ago
bunnei a74774257e gl_shader_gen: Various cleanups + moved TEV stage generation to its own function. 9 years ago
bunnei c86b9d4242 renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups. 9 years ago
bunnei 3c057bd3d8 gl_rasterizer: Move logic for creating ShaderCacheKey to a static function. 9 years ago
bunnei b02a533d94 gl_shader_util: Use vec3 constants for AppendColorCombiner. 9 years ago
bunnei 37b0aa5af7 gl_rasterizer: Fix typo in uploading TEV const color uniforms. 9 years ago
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.
9 years ago
Subv e3f4233cef Initial implementation of fragment shader generation with caching. 9 years ago