Commit Graph

11244 Commits

Author SHA1 Message Date
espes b6f014bf11 some more texture formats 2015-08-14 10:49:01 +10:00
espes 713baf6a03 confusing hack to efficient handle surface write mask changes 2015-08-14 10:04:00 +10:00
espes 81f495ef8e add EXP macro mask arg 2015-08-14 10:03:17 +10:00
espes 7356590230 Merge pull request #32 from JayFoxRox/fix-vs
Fix vs
2015-08-14 09:26:02 +10:00
espes af6b40e666 carbon-copy from NV2A_GL_DPRINTF when gl debugging not enabled 2015-08-14 09:19:52 +10:00
espes c7b3f646da update surface when changing write enable masks 2015-08-14 09:18:52 +10:00
Jannik Vogel 2ca9eb531b Fix vertex-shader bug which lead to accidental swizzling 2015-08-14 01:00:00 +02:00
Jannik Vogel a8a41f877f Use mix in final combiner 2015-08-14 00:58:45 +02:00
espes 4a2d7033b7 debug build fix 2015-08-14 08:47:25 +10:00
espes 0cdd5a4410 clarify DXT mipmapping hack 2015-08-14 08:34:27 +10:00
Jannik Vogel 4ec73858fe DXT hash length fix + don't load invalid GL-DXT mipmaps 2015-08-13 14:04:51 +10:00
espes 85484e52cf Merge branch 'xbox' of github.com:espes/xqemu into xbox 2015-08-11 15:04:13 -07:00
espes ee5232669f chihiro, blkmemory debug prints 2015-08-11 12:17:25 -07:00
espes 3d895a7879 s/pgraph_upload_gl_texture/upload_gl_texture/ 2015-08-11 12:12:11 -07:00
espes c3ef6d815b factor pgraph_update_surface 2015-08-11 12:10:36 -07:00
Jannik Vogel 0260b29578 Split GLSL compilation into function 2015-08-11 03:20:44 +02:00
Jannik Vogel 848eaf2b74 Move debug routines and macros to nv2a_debug 2015-08-11 03:20:37 +02:00
Jannik Vogel 725a8e14b6 Move back NV2A_VERTEX_ATTR_* to nv2a.c 2015-08-11 03:17:37 +02:00
Jannik Vogel 4f441ad6e0 Use v0 to v15 instead of custom attribs 2015-08-11 03:17:37 +02:00
Jannik Vogel c9c2ab44ca use ARRAYSIZE 2015-08-11 03:17:37 +02:00
espes 0ad73ef17e Merge pull request #28 from JayFoxRox/compile-fix
Also compile/link nv2a_shaders.c
2015-08-10 15:06:57 -07:00
espes d0cbf2f7e0 Merge pull request #29 from JayFoxRox/copyright
Copyright: JayFoxRox is Jannik Vogel
2015-08-10 15:05:43 -07:00
espes 051a340218 disable debug flags by default 2015-08-10 15:05:13 -07:00
Jannik Vogel ff70038637 Copyright: JayFoxRox is Jannik Vogel 2015-08-11 00:01:08 +02:00
Jannik Vogel 10cc38de7f Also compile/link nv2a_shaders.c 2015-08-10 23:45:01 +02:00
espes 1a7a9534ab pass vertex data between shader stages in a struct 2015-08-10 10:42:46 -07:00
espes 27cf9cd4da split out shader generation from nv2a.c 2015-08-10 09:21:45 -07:00
espes 87060feaac Merge pull request #27 from JayFoxRox/cubemap-and-volume-textures
Cubemap and volume textures
2015-08-09 07:37:50 -07:00
Jannik Vogel d80645afa4 Vertex3f support 2015-08-09 04:20:26 +02:00
Jannik Vogel 0e5b4f1eff hacky DRAW_ARRAY merging + faster GL draw calls and more asserts 2015-08-09 04:20:26 +02:00
espes 6ba631b0bc Merge pull request #24 from JayFoxRox/visibility-test
Handle REPORT for visibility-tests
2015-08-08 07:15:50 -07:00
espes 9c69879288 Merge pull request #25 from JayFoxRox/fix-warning
pgraph_apply_anti_aliasing_factor shouldn't return anything
2015-08-08 07:06:18 -07:00
Jannik Vogel 0d4ee8ec2e Volume texture support 2015-08-08 02:14:08 +02:00
Jannik Vogel c96d32e553 New swizzle functions 2015-08-08 02:14:08 +02:00
Jannik Vogel 7b32112df4 Make cubemaps work 2015-08-08 02:14:08 +02:00
Jannik Vogel 49597ca04f pgraph_apply_anti_aliasing_factor shouldn't return anything 2015-08-07 19:49:44 +02:00
Jannik Vogel 609a4cf423 Add FIXME about possible bug with CLEAR 2015-08-07 19:44:16 +02:00
Jannik Vogel 68d0bcde6f Clear framebuffers so we don't have different sizes per attachment 2015-08-07 19:36:23 +02:00
Jannik Vogel 7d9f182fe0 Handle REPORT for visibility-tests 2015-08-07 06:35:46 +02:00
espes 440d0a4ed4 Merge pull request #22 from JayFoxRox/quads
Quads using 4 vertices
2015-07-30 05:53:41 +10:00
espes 1dcaf6b3c4 :/ 2015-07-30 03:32:36 +10:00
espes b13b2d362a Merge pull request #21 from JayFoxRox/renderstates
Add face-culling, frontface and polygon-mode
2015-07-29 08:36:04 +10:00
Jannik Vogel 4fc7b1bb7f Very basic anti-aliasing handling 2015-07-28 18:22:59 +02:00
Jannik Vogel 202ede0501 Quads using 4 vertices 2015-07-28 11:25:28 +02:00
Jannik Vogel a440bb322f Add face-culling, frontface and polygon-mode 2015-07-28 02:19:34 +02:00
Jannik Vogel 7fc1fdb8fe Clamp D0,D1,B0,B1 2015-07-27 00:06:39 +02:00
Jannik Vogel ff55f1fe3e Fix texture format SZ_A8 (0x19) 2015-07-24 14:58:00 +02:00
Jannik Vogel d93ef1a731 Better short mapping code 2015-07-21 12:01:37 +02:00
Jannik Vogel e3dfc2e713 Rename inline_buffer_buffer to inline_buffer 2015-07-21 11:55:37 +02:00
Jannik Vogel 3bce85c694 Prefix functions with pgraph_ 2015-07-21 11:55:23 +02:00
Jannik Vogel e5cf290041 Added short inline-buffers (Untested but asserted) 2015-07-17 15:41:06 +02:00
Jannik Vogel 34ba061b60 Better and complete buffering for the inline-buffers 2015-07-17 13:47:07 +02:00
Jannik Vogel 7802178db7 Finish vertex with generic attributes too 2015-07-17 13:14:29 +02:00
espes d78ba60014 fix uniform name buffer overflows... 2015-07-17 13:49:31 +10:00
espes fe28f90556 GL_CLAMP was removed in gl3 2015-07-17 13:45:58 +10:00
espes 90a37819b8 fix pointer cast warnings 2015-07-17 13:44:17 +10:00
Jannik Vogel 8c445b5c69 Fix Texgen by doing skinning fixup later 2015-07-17 02:28:50 +02:00
Jannik Vogel 58411243d1 Fix delta-R6G5B5 code (incl. new mapping algorithm) 2015-07-17 00:46:20 +02:00
Jannik Vogel 811673cfde Give VSH and PSH types a prefix 2015-07-16 22:59:54 +02:00
Jannik Vogel d99880dac6 Fix skinning normals and cleanup 2015-07-16 22:59:54 +02:00
Jannik Vogel 915a1ed410 Style + FIXME for assert 2015-07-16 22:59:54 +02:00
Jannik Vogel 8a43da637a Fix some parts of skinning 2015-07-16 22:59:54 +02:00
Jannik Vogel 3ffbb446eb Add some FIXME 2015-07-16 22:59:54 +02:00
Jannik Vogel 5f0759c27e Explanation for GL extensions 2015-07-16 22:59:54 +02:00
Jannik Vogel ce65240897 Remove req. for GL_EXT_texture_snorm (Part of GL3.3) 2015-07-16 22:59:54 +02:00
Jannik Vogel fc3b5d0c88 Skinning, Texgen and Texture matrices WIP 2015-07-16 22:59:54 +02:00
Jannik Vogel 2d46263821 Rename composite GLSL var to compositeMat 2015-07-16 22:59:54 +02:00
Jannik Vogel 71ad6234fa Cleanup PSH and alphakill 2015-07-16 22:59:54 +02:00
Jannik Vogel 939ad0121a Prepare for vertex weights 2015-07-16 22:59:54 +02:00
Jannik Vogel 9ea1c53c8e Texture matrix registers 2015-07-16 22:59:54 +02:00
Jannik Vogel cc89da0c20 Store Matrices (4x MV, 4x iMV, Proj) 2015-07-16 22:59:54 +02:00
Jannik Vogel bb232fb082 Skinning registers 2015-07-16 22:59:54 +02:00
Jannik Vogel add2a25a92 Add TEXTURE_FILTER_?SIGNED assert, functionality not yet known (maybe delta tex?) 2015-07-16 22:59:54 +02:00
Jannik Vogel 20e0ac58a9 Bumpmapping Lum registers, better var name and fix for Bumpmapping 2015-07-16 22:59:53 +02:00
Jannik Vogel 53a6b628c9 Normalization registers 2015-07-16 22:59:53 +02:00
Jannik Vogel f8933e3724 Texgen registers 2015-07-16 22:59:53 +02:00
Jannik Vogel f8ace72667 Better style in nv2a 2015-07-16 22:59:53 +02:00
Jannik Vogel dd935fffa6 New delta texture modes (req. GL_EXT_texture_snorm) and RGB_565
internal format (req. GL_ARB_ES2_compatibility)
2015-07-16 22:59:53 +02:00
Jannik Vogel 114679b2a2 Add texture addressing 2015-07-16 22:59:53 +02:00
Jannik Vogel 7f4d7e9ccc Alphakill, Texkill and Bumpmapping 2015-07-16 22:59:53 +02:00
Jannik Vogel c1dbffe5fd More texture modes 2015-07-16 22:59:53 +02:00
Jannik Vogel 6113195caa Cleanup NV2A warnings 2015-07-16 15:32:19 +02:00
espes f12f82146a bigger mask for PCRTC_START... 2015-07-15 05:01:16 +10:00
espes a197b7d493 vga hack becuase 16-bit surfaces are broken in cocoa
This is easier to fix properly when recent console overhauls are merged in.
2015-07-15 03:13:43 +10:00
espes cfe80b9613 implement dsp max instruction 2015-07-15 03:12:19 +10:00
espes 2f436be848 improve inline buffer handling 2015-07-14 22:42:43 +10:00
espes ebd0e71614 s/swizzle_mask/gl_swizzle_mask/ 2015-07-14 21:11:52 +10:00
espes ec7a83d745 some style and const-correctness fixes 2015-07-14 02:52:59 +10:00
Jannik Vogel 2e0a16873d Cleanup uyvy 2015-07-14 02:51:20 +10:00
Jannik Vogel 285d50f334 Add uyvy textures 2015-07-14 02:51:20 +10:00
Jannik Vogel 33791c7412 Use new swizzle_mask for luminance textures 2015-07-14 02:51:20 +10:00
Jannik Vogel 66c4b94a88 Remove spaces 2015-07-14 02:51:19 +10:00
Jannik Vogel a3d110025e Fix GL3 error with luminance 2015-07-14 02:51:19 +10:00
Jannik Vogel 5e0a80b649 Some new texture formats + YUV conversion=WIP 2015-07-14 02:51:19 +10:00
Jannik Vogel f4ba11f180 Added first palette texture mode 2015-07-14 02:51:19 +10:00
espes c82a15d28e Merge pull request #13 from JayFoxRox/attribute-fix
Use newly converted buffer after conversion
2015-07-14 02:41:18 +10:00
espes ba0bb10c98 Merge pull request #12 from JayFoxRox/mipmap-fix
Fix GL3 mipmaps by forcing at least 1x1
2015-07-14 02:39:28 +10:00
espes 3ca7c1fe42 ymax instead of ymin for clip seems to work better 2015-07-14 02:38:24 +10:00
espes 82b884beaa Merge pull request #7 from JayFoxRox/surface-flip
Surface flip
2015-07-14 02:33:16 +10:00
Jannik Vogel f34954e6e8 Use newly converted buffer after conversion 2015-07-13 18:32:39 +02:00
Jannik Vogel bd5cb25887 Fix GL3 mipmaps by forcing at least 1x1 2015-07-13 18:28:36 +02:00
espes 23c9ee9517 Merge pull request #8 from JayFoxRox/clear-masks
Clear masks
2015-07-14 02:09:29 +10:00
espes 213767cee5 disable gl debugging by default 2015-07-14 01:55:05 +10:00
Jannik Vogel a753f3d06c Cleanup clear code 2015-07-13 17:53:18 +02:00
Jannik Vogel 414e72299e Proper clear masks and region 2015-07-13 17:46:07 +02:00
Jannik Vogel 1efddc36d5 Remove dead code and remind about inplace+vram 2015-07-13 17:42:14 +02:00
Jannik Vogel 1040e2605b Surface flip on upload 2015-07-13 17:24:28 +02:00
Jannik Vogel c919b19824 Remove redundant NV2A text 2015-07-13 17:21:31 +02:00
Jannik Vogel cd54aa6158 Style and more debug info 2015-07-13 17:21:31 +02:00
Jannik Vogel 8faac03869 More GL Debug output 2015-07-13 17:21:31 +02:00
espes a50409ef19 don't assert for passthrough texture mode 2015-07-13 23:30:06 +10:00
espes 94b2c7ea7c initial support for paletted textures 2015-07-13 23:18:26 +10:00
espes 9dea936168 checking for exactly opengl 3.3 breaks forward-compatible contexts 2015-07-13 23:05:56 +10:00
espes 3e2523518c Merge pull request #5 from JayFoxRox/glx-gl-3.3
GLX version for GL 3.3 Core
2015-07-13 23:00:31 +10:00
Jannik Vogel c32594ed12 Check GL Version in NV2A 2015-07-13 14:22:47 +02:00
espes 74653cae79 Merge pull request #6 from JayFoxRox/xid-rumble
XID Rumble
2015-07-13 22:06:03 +10:00
Jannik Vogel 7bfec09454 Improve XID code quality 2015-07-13 12:44:52 +02:00
espes 7509c1d444 use texture swizzle mask for alpha textures 2015-07-13 15:08:57 +10:00
espes 6ffb0ffbd0 s32k is probably signed 2015-07-13 14:50:31 +10:00
espes 6e965b2c1d make attribute uploads lazy 2015-07-13 13:45:39 +10:00
espes bf7948c70d maybe fix ARL instruction 2015-07-13 01:21:07 +10:00
Jannik Vogel 1aa0eee37c S1 (as UV?) should be normalized, fixes textures in Halo 2015-07-12 21:55:49 +10:00
Jannik Vogel ffba4cfb7a XID Rumble 2015-07-12 13:06:44 +02:00
espes be5a78e918 actually do the sse4.2 compile check for fast_hash 2015-07-12 01:58:24 +10:00
espes 1a4664a9f8 a bunch of trailing whitespace has accumulated 2015-07-12 01:34:03 +10:00
espes 537b05b838 fix fixed-function, and cleanups 2015-07-12 01:26:48 +10:00
espes 0a9ad10583 this is maybe less silly 2015-07-11 23:50:47 +10:00
espes c31498a236 not even necessary 2015-07-11 13:49:08 +10:00
espes 04eba3b3a2 wip gl3 2015-07-10 11:43:22 +10:00
espes ba428582f5 fix multi-level compressed textures 2015-07-09 12:00:34 +10:00
espes 0aa97bf57d seemingly broken alpha test, and some other fixes 2015-07-08 22:11:32 +10:00
espes c36d60100f masks must be reset for clear 2015-07-08 04:35:35 +10:00
espes 3a35fc06b1 im bad at git add --patch 2015-07-08 04:05:51 +10:00
espes 8c5e15f2d9 fix sphinx 2015-07-08 04:03:02 +10:00
espes 614a22b49b not obviously less broken 2015-07-08 03:35:50 +10:00
espes ba45e5249f probably broken stenciling 2015-07-08 02:52:08 +10:00
espes e80aca79f1 still confused 2015-07-07 23:49:45 +10:00
espes 1d8adc942f im confused about when to do a framebuffer update 2015-07-07 21:07:36 +10:00
espes 0a2d1ef9e4 don't update unmodified uniforms. makes apitrace faster 2015-07-07 21:06:17 +10:00
espes 49abc9afae depth test. this is broken 2015-07-07 19:39:19 +10:00
espes 29d7473484 start on doing framebuffers properly 2015-07-07 19:02:55 +10:00
espes 694cedb8e0 TextureState -> TextureShape 2015-07-07 16:54:09 +10:00
espes 0b6291b46f lock even less... 2015-07-07 15:35:03 +10:00
espes 5a7e1e6532 who needs this lock 2015-07-07 15:19:07 +10:00
espes dd34dda3c6 less ridiculously inefficient puller 2015-07-07 15:06:21 +10:00
espes cf84c27491 get rid of some pfifo shadow 2015-07-07 14:45:35 +10:00
espes a290a7fae6 move texture data hash out of texture state 2015-07-07 02:15:07 +10:00
espes c14aa2e038 yeah alright, don't use magic numbers for blend factors 2015-07-06 22:59:28 +10:00
espes a71d2433dc put texture cache behind flag 2015-07-06 17:51:13 +10:00
espes 228dc80ef3 make the texture cache smaller again 2015-07-06 17:21:33 +10:00