Commit Graph

  • 1f11e92cd1 Solve lnt-comparison-bitwise-precedence Warning "Comparison operator has a higher precedence than bitwise operator." PatrickvL 2023-12-08 18:02:10 +0100
  • 737c3e9a36 Fix typo (pXborSurface > pXboxSurface) PatrickvL 2023-12-08 17:56:30 +0100
  • 910fb5c6d9 Make a note in places where EmuKickOffWait can now be used to implement a TODO remark PatrickvL 2023-12-08 16:51:22 +0100
  • 1fcbfc340f Move all HLE_PushInit() calls to HLE_PushPrepare() and safeguard it against yet-unknown g_pXbox_D3DDevice. PatrickvL 2023-12-08 16:50:35 +0100
  • a9184ace46 correct EmuKickOff to EmuKickOffWait medievil1 2023-12-08 05:21:22 -0500
  • 7bd2cb02e3 g_pXbox_pPush = nullptr fix medievil1 2023-12-05 22:19:48 -0500
  • 610809c9a7 fix for viewport and clip window setup in multi-sample mode. Jack Chen 2023-11-19 12:46:37 +0800
  • 0030d525ca use g_RenderUpscaleFactor in depth stencil surface creation. Jack Chen 2023-11-19 01:16:12 +0800
  • eee8271e54 ApplyComplexRenderState() with X_D3DRS_MULTISAMPLEMODE and X_D3DRS_MULTISAMPLERENDERTARGETMODE and calls SetXboxMultiSampleType() Jack Chen 2023-11-19 00:53:30 +0800
  • ef68ef1b85 use multi-sample scale from NV2A in GetMultiSampleScaleRaw() Jack Chen 2023-11-18 23:12:26 +0800
  • 1f0feed255 remove usages of xbox view matrix in fixed mode vertex shader state and light state setup. unpatch D3DDevice_SetTransform() Jack Chen 2023-11-18 21:26:29 +0800
  • 684d3338f2 Always copy hlsl files if they changed in the sources Require files to be explicitly declared in CXBXR_HEADER_EMU in order to be copied Anthony 2023-11-18 11:34:05 +1300
  • ae140bb6bf Copy and install hlsl files in the cxbx project Anthony 2023-11-16 23:00:18 +1300
  • fa14a4ee33 In get_kelvin_texture_palette_data, don't use GET_MASK for palette_offset - this fixes a mistaken assumption about consistency & alignment. PatrickvL 2023-11-15 17:39:18 +0100
  • b6fa877477 In GetHostResourceKey, only fetch palette when actually processing an IsPaletizedTexture PatrickvL 2023-11-15 17:39:18 +0100
  • 7e63eea878 Correct palette_offset (it had to use GET_MASK) PatrickvL 2023-11-15 17:13:17 +0100
  • 12e2b1ca6d Oops PatrickvL 2023-11-15 12:19:25 +0100
  • 64e2da20f8 Remove all Xbox D3D palette handling (no more patching, no HLE_API, almost no Nv097 SET_PALETTE handling). Instead, refactor pgraph code such, that our Direct3D render code accessed the exact same palette data as the OpenGL render code. PatrickvL 2023-11-15 10:34:36 +0100
  • 601a6007b7 Fix style of one logging function PatrickvL 2023-11-15 08:47:35 +0100
  • 88b19a6d2f rename g_NV2A_Palette_Data to g_NV2A_Palette. fix g_NV2A_Palette setup logic and g_pNV2A_Palette_Data setup logic in NV097_SET_TEXTURE_PALETTE method handler in EmuNV2A_PGRAPH.cpp this should fix palette texture. Jack Chen 2023-11-15 06:57:21 +0800
  • 1bedee29dd Moved all Direct3D logging functions Consolidated logging variants into one each (there's no use to log their origin) No CxbxImpl_* needs WINAPI No CxbxImpl_* returns xbox types EMUPATCH'es all return xbox types Moved EMUPATCH'es into xbox namespace: XGSetSurfaceHeader, XGSetTextureHeader, XGSetVertexBufferHeader, CreateStandAloneSurface, D3D_UpdateProjectionViewportTransform Don't repeat xbox namespace within namespace section PatrickvL 2023-11-14 02:19:29 +0100
  • 2284621be3 Move all Direct3D logging functions towards an include PatrickvL 2023-11-13 23:38:57 +0100
  • 97025a5652 All LTCG_DECL D3D patches now perform logging though a separate namespace. PatrickvL 2023-11-13 23:11:17 +0100
  • a7bdc0ec1a Use NR_DWORDS for pTexture too. Also some more code-cleanup PatrickvL 2023-11-13 20:51:59 +0100
  • 4057e18f65 fix mis-calculated dword_count in D3DDevice_SetTexture() when pTexture<> nullptr. this fixs HeatShimmer sample. Jack Chen 2023-11-13 21:41:40 +0800
  • acfcc3b55e Solve a few compiler warnings (mainly initializing uninitialized variables) and some code cleanup (removing a TODO that's been addressed now) PatrickvL 2023-11-12 15:47:28 +0100
  • a3e0f1d1f1 Remove more unnecessary changes PatrickvL 2023-11-12 14:16:33 +0100
  • a5b8f15a14 reformat todo Anthony 2023-11-12 20:04:39 +1300
  • 2c8a764fc7 Save a backup copy of hlsl files Anthony 2023-11-12 19:56:20 +1300
  • 1d5be05435 Fix after rebase PatrickvL 2023-11-11 22:20:22 +0100
  • c85d6caf89 Merge branch 'master' into pushbuffer_based_rendering PatrickvL 2023-11-11 20:07:43 +0100
  • 2f2a3498e9 More reverting to have less differences with master PatrickvL 2023-11-11 13:44:20 +0100
  • 605271245c review comments Anthony 2023-11-11 22:19:46 +1300
  • 93e36f7be3 Rename shaderhlsl to shadersources and updateshaders to update Anthony 2023-11-10 23:02:28 +1300
  • a7bc6a307d fixup remove unused variable Anthony 2023-11-09 19:36:32 +1300
  • 7ad047bcea reduce crashing if the shaders are broken and get hotloaded Anthony 2023-11-09 18:53:53 +1300
  • 0f21e25d7d Support hotloading pixelshaders Anthony 2023-11-09 17:16:16 +1300
  • 79884bdf3d Move shader hlsl management into Shader.cpp - g_ShaderHlsl keeps track of hlsl - VS and PS source their hlsl from g_ShaderHlsl Anthony 2023-11-09 01:43:52 +1300
  • 260e2fb7c8 Ensure filewatcher is closed if something goes wrong and avoid creating multiple watchers Anthony 2023-11-08 21:57:52 +1300
  • 4d221c3c81 tidy vertex shader loading Anthony 2023-11-07 23:06:08 +1300
  • 712d3bee2f move passthrough shader to a file Anthony 2023-11-07 22:27:05 +1300
  • 3cd551d827 Reload/recompile vertex shaders hlsl if they change Anthony 2023-10-07 21:24:53 +1300
  • 397f33143d Rename VertexShaderSource to VertexShaderCache because it was a weird name Anthony 2023-10-05 20:31:47 +1300
  • 3a74d92247 Fix X_D3DDevice_SetLight light argument index PatrickvL 2023-11-09 00:12:57 +0100
  • 18b9f338eb Reduce 2 semicolons at line-end into 1 PatrickvL 2023-11-08 23:01:19 +0100
  • 940dac89c4 Revert unintentional differences with master also cleanup style a few pieces of code. PatrickvL 2023-11-08 22:01:32 +0100
  • e1958357b9 In HLE_PushPrepare() make a clear distinction between the total dword_count and the argument_count (which is one less) PatrickvL 2023-11-08 12:07:43 +0100
  • b71e53da68 Correct misunderstanding and mismatches in how EmuKickOffWait interacts with the X_D3DAPI_ENUM handlers in HLE_API_handle_method(). PatrickvL 2023-11-08 11:19:07 +0100
  • 98847cccba Sorted declaration of X_D3DAPI_ENUM elements and those case's in HLE_API_handle_method() PatrickvL 2023-11-08 09:27:20 +0100
  • b9afc1bf51 Slightly rename HLE_API_METHOD into NV097_HLE_API PatrickvL 2023-11-05 15:04:47 +0100
  • 3dc9036d39 Extract HLE_API_handle_method out of pgraph_handle_method PatrickvL 2023-11-05 14:51:13 +0100
  • 761c6d72b9 Remove a few more unneeded X_D3DAPI_ENUM's PatrickvL 2023-11-05 14:39:29 +0100
  • fa4a037738 Revert back to using [[fallthrough]]; which apparently became standardized since C++17 PatrickvL 2023-11-05 14:27:51 +0100
  • 45e0768c66 Actually call (instead of read memory location of) is_pgraph_using_NV2A_Kelvin! Fix double closing quote on 1 #include clause Mark a few (not all by a long shot!) FALL_THROUGH's (and declare it somewhat cross-platform-ish way for fun) Initialize more otherwise uninitialized members / variables At the very least, assert on nullptr results Fix some datatype compatibility warnings More explicit type-casts PatrickvL 2023-11-05 01:22:47 +0100
  • d51f9ff145 Correct patch header comments Removed/inserted empty separator lines Removed external declarations on variables that aren't used anymore (and no longer exist) PatrickvL 2023-11-04 23:54:43 +0100
  • ea9d9f1f63 Remove non-logging code from "Overload for logging" functions (anything else belongs in its callers) PatrickvL 2023-11-04 23:31:59 +0100
  • e1c9324dce Remove HLE API enum elements for LTCG variants, because those should push the same values to the push buffer anyway PatrickvL 2023-11-04 23:27:46 +0100
  • c72ea57085 Solve regression (an off-by-one error when invoking PUSH_ENCODE) Also some cleanup PatrickvL 2023-11-04 17:47:25 +0100
  • 342b8eb100 Wrap up refactoring-away PBTokenArray and Cxbxr_PushHLESyncToken. For this, introduced and used HLE_PushEnd() Consistently name X_D3DAPI_ENUM variables 'hleAPI' PatrickvL 2023-11-04 11:04:35 +0100
  • 9c8af36eab Use PUSH_ENCODE() to formulate HLE_API commands with. and specify DWORD counts instead of byte counts. PatrickvL 2023-11-04 00:55:02 +0100
  • ae6ecb29f4 Solve a few compile warnings; Remove or comment-out unused variables Perform explicit type-casts when implicit casts loose data Change literal doubles into literal floats Correct type of loop variables Simplify masking boolean expressions Introduce and use LTCG_DECL, declared as __declspec(naked) to distinguish from any possible other use-case of __declspec(naked). Comment why all LTCG_DECL variables cannot be initialized PatrickvL 2023-11-04 12:46:30 +0100
  • 0fea12db19 Avoid uninitialized compiler messages in EmuKrnlRtl.cpp too. PatrickvL 2023-11-04 13:09:27 +0100
  • 372451205e XbPushBuffer.cpp : Solve compiler warnings (double literals getting downcast to floats, instead write them as floats) and one obvious bug (== was used were = was clearly intended) PatrickvL 2023-11-04 01:18:06 +0100
  • 84d9538967 Direct3D9.cpp : Non-functional style changes (although ultimately automatic correction is arguably better): PatrickvL 2023-11-01 11:21:30 +0100
  • a9a1cc64b5 Direct3D9.cpp : Sort XB_TRAMPOLINES declaration lines on function name in alphanumerical ascending order PatrickvL 2023-11-01 11:19:23 +0100
  • 85354890b4 Direct3D9.h : Avoid needless differences with master, by moving D3DDevice_BeginPushBuffer and D3DDevice_EndPushBuffer back their original location Correct comment headers for XGSetSurfaceHeader, XGSetTextureHeader and XGSetVertexBufferHeader PatrickvL 2023-11-01 11:06:01 +0100
  • 7cbe58a89c fix submodule XBSymbolDatabase header Jack Chen 2023-11-01 06:47:42 +0800
  • 5cc17b40ce fix CxbxrImpl_CopyRects() when source and destination surfaces are INTZ format. this fixs MotionBlur sample Jack Chen 2023-10-31 17:47:27 +0800
  • 6ce9b19cb2 fix EmuKickOffWait() and use asm to force release build not optimize out the while loop for waiting. this shall fix the timing issue in release build. Jack Chen 2023-10-31 10:33:12 +0800
  • 7c216f4c70 avoid dummy render target when pRenderTarget->Data is nullptr Jack Chen 2023-10-31 06:05:29 +0800
  • 7bdbac792d implement D3DDevice_SetTile(), D3DDevice_GetTile(). Jack Chen 2023-10-30 12:48:50 +0800
  • 2efe6d9e36 correct define of HLE_API_PUSHBFFER_COMMAND_12 Jack Chen 2023-10-30 09:33:31 +0800
  • 67999cdb89 Revert "unpatch D3DDevice_BlockUntilVerticalBlank()" Jack Chen 2023-10-29 23:50:10 +0800
  • c3f52e33cc chihiro: prevent JVS register updates from being missed due to long delays Luke Usher 2022-03-01 20:38:05 +0000
  • 78f7e097d5 chihiro: emulate a chihiro system when boot.id is present Luke Usher 2022-03-01 20:37:24 +0000
  • 30e00d8f24 chihiro: fix an issue where media board detection failed due to instant response time Luke Usher 2022-03-01 20:37:10 +0000
  • 04ce11fd87 Cleanly rebase chihiro-work on develop RadWolfie 2021-04-25 16:01:05 -0500
  • 7a73f36c50 remove CDevice_KickOff_0__LTCG_ecx1 trampoline and symbol which doesn't exist. Jack Chen 2023-10-29 16:31:23 +0800
  • 57b9e91580 correct calling convection for CDevice_KickOff_4 trampoline Jack Chen 2023-10-29 16:27:01 +0800
  • 2a24a56442 update KickOff trampolines to adpot symbol database update. Jack Chen 2023-10-29 10:05:08 +0800
  • 53c978f801 unpatch D3DDevice_BlockUntilVerticalBlank() Jack Chen 2023-10-29 09:26:02 +0800
  • 21a8d9f856 use CreateTexture() with INTZ format for depth buffer surface creation and setup. use g_DepthBufferCache for depth stencil surface cache. link texture input in D3DDevice_SetTexture() with depth surface cache. this enables using depth stencil surface as texture. fixs focus blue sample. Jack Chen 2023-10-28 20:36:52 +0800
  • 070860fd9e add comments for todo lists Jack Chen 2023-10-27 09:00:25 +0800
  • e866a56a59 unpatch D3DDevice_SetVertexShader() and D3DDevice_SetVertexShader_0(). now we setup necessary D3D globals in D3DDevice_CreateDevice_End() and skip pushbuffer token setup before we finish trampoline to D3DDevice_CreateDevice(). Jack Chen 2023-10-26 15:22:35 +0800
  • a9c138dc7e implement NV097_LAUNCH_TRANSFORM_PROGRAM method handler and unpatch D3DDevice_RunVertexStateShader(). this fixs Spy Vs. Spy Jack Chen 2023-10-26 14:09:52 +0800
  • 697d17ba69 add soft method handlers for pushbuffer fixup. Jack Chen 2023-10-26 10:05:04 +0800
  • d9c110720c simplified the data over lap check between stream source and dirty render target by checking the data offsets are equal or not. Jack Chen 2023-10-24 07:59:55 +0800
  • 42ee30a25b only check for texcoord index when we're in DrawArrays or InlineElements draw modes. vertex stream only valids in these two draw modes. Jack Chen 2023-10-24 07:44:21 +0800
  • 9cbe84f2d2 use map cache for dirty render target surface and check vertex streams composed from NV2A with dirty render target. update xbox data from host data if there are data over lapped between vertex stream and dirty render target. fixs Displacement Map sample and PaintEffect sample again without having to patch XGSetVertexBufferHeader(). Jack Chen 2023-10-24 07:42:13 +0800
  • e5c9c0f483 update comment in CxbxUpdateHostTextureScaling() Jack Chen 2023-10-24 06:57:46 +0800
  • 0ec560e0ab rename NV2A viewport global Jack Chen 2023-10-24 06:40:15 +0800
  • b80460771d
    Merge e1c12a6978 into c7e75d7c5c medievil1 2023-10-21 21:14:13 -0600
  • c7e75d7c5c
    Merge pull request #2432 from Margen67/ci CI-c7e75d7 ergo720 2023-10-21 16:19:43 +0200
  • 969867d233 unpatch D3DDevice_SetViewport() since we already has viewport composed from NV2A Jack Chen 2023-10-21 19:46:12 +0800
  • 7e597ee4ea unpatch D3DDevice_SetScreenSpaceOffset() since these variables are never used. Jack Chen 2023-10-21 19:45:21 +0800
  • 73ab4fbbf6 clean up D3DDevice_SetTransform_0__LTCG_eax1_edx2() Jack Chen 2023-10-21 19:44:36 +0800
  • e81ce35cb5 revise CDevice_KickOff_0 trampoline to CDevice_KickOff_0_ecx and CDevice_KickOff__0_edx trampolines, and use them in CxbxrImpl_KickOff(). add D3D_MakeRequestedSpace_4__LTCG_eax_RequestedSpace trampoline for LTCG titles and use it in CxbxrImpl_MakeSpace() Jack Chen 2023-10-21 17:01:29 +0800
  • f48e4966bb disable data transfer from render target to xbox for vertex buffers. for now. todo: need a new cache implementation and dirty/check logic. Jack Chen 2023-10-21 04:33:27 +0800
  • 98387228ea do not forcing g_bUsePassthroughHLSL to always be true. allowing F7 to swich between using HLSL and actual vertexh shader programs. Jack Chen 2023-10-21 04:32:11 +0800
  • 7d8bb5db7c fix wornly set prgaph method in D3DDevice_SetRenderTarget() patch Jack Chen 2023-10-20 19:06:30 +0800