Commit Graph

11173 Commits

Author SHA1 Message Date
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
espes 9d9c29bd34 minor psh memory leak 2015-07-06 17:20:56 +10:00
espes bd2e03b5ba add g-lru-cache -_- 2015-07-06 14:25:12 +10:00
espes da30a91d6f make the texture cache bigger 2015-07-06 14:23:34 +10:00
espes 1e026f54d6 dont crash when setting mipmap filters on linear textures... 2015-07-06 14:22:55 +10:00
espes 5f83b50954 lru 2015-07-06 14:04:33 +10:00
espes 033157be3c texture caching again 2015-07-06 13:17:12 +10:00
espes d83e0307ec minor cleanups to swizzle 2015-07-06 03:07:24 +10:00
espes 6cb87ee1e5 minor mcpx changes 2015-07-06 01:53:10 +10:00
espes b2d970b7b3 stub YUV2 texture format 2015-07-06 01:36:42 +10:00
espes 452d048b2c cache shader constant locations 2015-07-06 01:35:54 +10:00
espes 12f2f5f668 field gpio hack 2015-07-05 22:58:01 +10:00
espes c2ba186cbb kinda wire apu ep up 2015-07-05 13:29:49 +10:00
espes cfd7431c21 blending -_- 2015-07-04 23:02:40 +10:00
espes 79e8643d16 a couple more dsp instructions 2015-07-04 21:32:02 +10:00
espes b21312d8ac this glFinish is useless 2015-07-03 16:05:28 +10:00
espes 3afc4facd3 probably don't divide by zero when normalizing vsh output depth 2015-07-03 15:55:45 +10:00
espes 60c0d7e433 use more specific internal formats, like wine 2015-07-03 02:08:39 +10:00
espes 60eab9e4f4 new texutre format 2015-07-03 01:42:16 +10:00
espes f49702010c fix handling of inline array strides 2015-07-02 23:19:30 +10:00
espes a1872ce97e fix inline UB_D3D attributes; call frame terminator for debugging 2015-07-02 22:03:30 +10:00
espes fa4abd286b set gl context once only in puller thread 2015-07-02 21:56:56 +10:00
espes d098d7f86d puller thread shold be joinable? 2015-07-02 21:55:29 +10:00
espes 5a131570bb rejig glo extension stuff 2015-07-02 21:54:33 +10:00
espes b9eda55bfb stub out acpi gpio regs 2015-07-02 16:55:41 +10:00
espes 9c1123bd4e (╯°□°)╯︵ ┻━┻ 2015-06-21 22:04:35 +10:00
espes 68db7724c7 dsp debug print to stdout 2015-06-21 22:03:43 +10:00
espes b1dfbc6037 maybe this is more correct handling of flip_stall? 2015-06-21 16:41:10 +10:00
espes f0184232aa dont busywait for surface flip 2015-06-21 11:50:53 +10:00
espes ff304138d7 Merge tag 'v1.7.2' into xbox 2015-06-21 04:07:41 +10:00
espes cab5558bc1 untested surface format 2015-06-21 03:57:14 +10:00
espes e91dff0bed maybe slightly less racey 2015-06-21 03:57:08 +10:00
espes 0ca0cc251d build fixes 2015-06-21 01:41:32 +10:00
espes 282894119a Merge tag 'v1.7.0' into xbox17
Conflicts:
	blockdev.c
	hw/audio/ac97.c
2015-06-21 00:56:44 +10:00
espes bce8d4ec76 some minor signature cleanups 2015-06-18 15:39:44 +10:00
espes 9e58566c29 ifdef out xbox rtc hacks 2015-06-15 21:11:01 +10:00
espes c75d30d5e5 tidy dsp dma DPRINTF 2015-06-15 16:22:53 +10:00
espes cfb5a59e10 some dma tweaks 2015-06-15 13:36:43 +10:00
espes a92748812b copy more code in bootstrap 2015-06-14 23:58:05 +10:00
espes 3e6fc14a4c cleanup, integrate with apu 2015-06-14 22:51:54 +10:00
espes 77374dde69 minor cleanups 2015-06-14 20:18:07 +10:00
espes 9a882a9db9 more inst 2015-06-14 19:52:12 +10:00
espes 5cfb52aebf instructions, mix 2015-06-14 16:16:39 +10:00
espes 7f336a762e dma kinda 2015-06-14 10:50:51 +10:00
espes 8f556211d9 more rejig 2015-06-14 00:52:15 +10:00
espes ecba64bbd7 interrupt naming 2015-06-14 00:52:15 +10:00
espes 291a95d3f0 init more 2015-06-14 00:52:15 +10:00
espes 1d568ccecf less args 2015-06-14 00:52:15 +10:00
espes 9f3c4f70e9 untested instructions 2015-06-14 00:52:14 +10:00
espes b0e67a7a1f some instructions, shitily 2015-06-14 00:52:14 +10:00
espes 9901c77dc4 ssstttaaattteee 2015-06-14 00:52:14 +10:00
espes 761a3b98e8 btw 2015-06-14 00:52:14 +10:00
espes 50635c450a better 2015-06-14 00:52:14 +10:00
espes 7c49af6e1f ... 2015-06-14 00:52:14 +10:00
espes 9490ae7e78 factor 2015-06-14 00:52:14 +10:00
espes 7302ce570f rejig dispatch, some new instructions 2015-06-14 00:52:13 +10:00
espes 1017e21968 wip some instructions, cleanups 2015-06-14 00:52:13 +10:00
espes fb5e9617a9 adapted 2015-06-14 00:52:13 +10:00
espes 35e0ab7e69 kill dsp_core 2015-06-14 00:52:13 +10:00
espes 8d029a7c2e kill wut 2015-06-14 00:52:13 +10:00
espes 537edc85f3 style, build 2015-06-14 00:52:12 +10:00
espes 6f22e7679b import hatari dsp 2015-06-14 00:52:12 +10:00
espes 4bb3043bf5 bah 2015-06-14 00:52:04 +10:00
espes 9c534afa34 clean up vsh program loading 2015-04-21 01:59:24 -07:00
espes 21e55dc3c0 this was bugging me 2015-04-21 01:59:24 -07:00
espes a100275422 not going to fix this any time soon... 2015-04-21 01:59:24 -07:00
espes 98b5749b29 cheanups to smc 2015-04-21 01:59:24 -07:00
espes 80bb4653bb don't ignore a broken bootrom path 2015-04-21 01:59:23 -07:00
Dr. David Alan Gilbert 8fde73e138 Allow mismatched virtio config-len
Commit 'virtio: validate config_len on load' restricted config_len
loaded from the wire to match the config_len that the device had.

Unfortunately, there are cases where this isn't true, the one
we found it on was the wce addition in virtio-blk.

Allow mismatched config-lengths:
   *) If the version on the wire is shorter then fine
   *) If the version on the wire is longer, load what we have space
      for and skip the rest.

(This is mst@redhat.com's rework of what I originally posted)

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 2f5732e964)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2014-07-15 19:28:02 -05:00
Le Tan 14d9fb02c2 pci: assign devfn to pci_dev before calling pci_device_iommu_address_space()
In function do_pci_register_device() in file hw/pci/pci.c, move the assignment
of pci_dev->devfn to the position before the call to
pci_device_iommu_address_space(pci_dev) which will use the value of
pci_dev->devfn.

Fixes: 9eda7d373e
    pci: Introduce helper to retrieve a PCI device's DMA address space

Cc: qemu-stable@nongnu.org
Signed-off-by: Le Tan <tamlokveer@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit efc8188e93)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2014-07-15 19:28:02 -05:00
Andreas Färber 53e4895c98 hw: Fix qemu_allocate_irqs() leaks
Replace qemu_allocate_irqs(foo, bar, 1)[0]
with qemu_allocate_irq(foo, bar, 0).

This avoids leaking the dereferenced qemu_irq *.

Cc: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
[PC Changes:
 * Applied change to instance in sh4/sh7750.c
]
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Kirill Batuzov <batuzovk@ispras.ru>
[AF: Fix IRQ index in sh4/sh7750.c]
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>

(cherry picked from commit f3c7d0389f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2014-07-15 19:28:02 -05:00
Andreas Färber bb485bf2e8 sdhci: Fix misuse of qemu_free_irqs()
It does a g_free() on the pointer, so don't pass a local &foo reference.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
(cherry picked from commit 127a4e1a51)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2014-07-15 19:28:02 -05:00