Commit graph

  • bf1ff4257f update CxbxUpdateNativeD3DResources() using NV2ARenderStates Jack Chen 2023-08-15 01:07:48 +08:00
  • 2c47499e76 update CxbxUpdateHostVertexShaderConstants() using NV2ARenderStates Jack Chen 2023-08-15 01:05:34 +08:00
  • 357c27bf64 update UpdateFixedFunctionVertexShaderState() using NV2A RenderStates and TextureStates Jack Chen 2023-08-15 01:00:27 +08:00
  • 196e70b030 minor code fix for XboxRenderState Jack Chen 2023-08-15 00:27:19 +08:00
  • c1672f586f update CxbxrImpl_LazySetTextureState() logics Jack Chen 2023-08-15 00:16:19 +08:00
  • 5f36c0228a update CxbxrImpl_LazySetSpecFogCombiner() logics Jack Chen 2023-08-14 18:07:49 +08:00
  • 87796fc561 Update CxbxrLazySetLights() logic. unpatch SetMaterial() and GetMaterial() Jack Chen 2023-08-14 16:55:17 +08:00
  • f8953dc6bb update CxbxrImpl_LazySetPointParameters() logic and fix point size data type. Jack Chen 2023-08-14 01:05:36 +08:00
  • 270cb83c52 Restructure LazyUpdateXXX() routines. Update LazyUpdateCombiners() and fixed mode pixel shader generation logics. Jack Chen 2023-08-13 23:21:53 +08:00
  • 30932874a6 Implemented SetModelView, verified. Jack Chen 2023-08-12 00:12:55 +08:00
  • 3ad509d21a unpatch D3DDevice_RunPushBuffer() to avoid reentrance of pgraph_handle_method(). Jack Chen 2023-07-30 20:00:33 +08:00
  • ae428719d1 Add/update pgraph KelvinPrimitive state to xboxRenderState conversion code except most LazySetXXX() related render states. Jack Chen 2023-07-28 16:46:45 +08:00
  • e5ee08cef1 unpatch VertexShader related apis, SetVertexShaderConstant related apis. reconstruct the pgraph handlers for these apis. add full 3 shaders for passthrough vertex shader Jack Chen 2023-07-27 22:19:06 +08:00
  • 971318a89a
    Merge pull request #2426 from Margen67/ci CI-971318a PatrickvL 2023-07-27 13:56:36 +02:00
  • b62d39da7d CI: Fix output Margen67 2023-07-25 11:57:45 -07:00
  • 5a0d706283 disable EmuKickOff() and EmuKickOffWait() to remove mutex lock reentrance issue. Jack Chen 2023-07-25 10:02:48 +08:00
  • ebcbbd416c modify Begin(), End(), SetVertexDataXXX(). all SetVertexDataXXX redirect to SetVertexData4f(). Jack Chen 2023-07-25 01:41:37 +08:00
  • b10f3623e2 add HLE handler in pgraph, modify SetVertesShader() patch and add pgraph handler. Jack Chen 2023-07-25 01:13:29 +08:00
  • d0805323d1 add g_pXbox_pPush and g_pXbox_pPushLimit, together with init code. Jack Chen 2023-07-25 00:24:19 +08:00
  • 04e8f8beaa add MakeSpace() Jack Chen 2023-07-25 00:17:27 +08:00
  • 3119e57bcb ground zero commit for HLE handlers inside pgraph. Jack Chen 2023-07-24 22:52:37 +08:00
  • 4895a1443a revise symbol name from D3DDEVICE to D3D_g_pDevice per database change Jack Chen 2023-07-10 10:40:51 +08:00
  • 84a8302d51 update submodule Jack Chen 2023-07-09 23:38:22 +08:00
  • 4a8b65cbda rebase to master 6c530fb, PR#2418 Jack Chen 2023-07-09 23:38:05 +08:00
  • f1297c0875 Revert primitive count for line loop to line strip convertion. Jack Chen 2023-06-26 22:30:20 +08:00
  • f992680d57 use pg->KelvinPrimitive.SetControl0 to replace pg->pgraph_regs[NV_PGRAPH_CONTROL_0 / 4]. fix overlay color space convert. jackchentwkh 2022-07-09 16:50:50 +08:00
  • 795c9839e0 change EmuKickOffWait() to use is_nv2a_pfifo_busy() in loop check. Add EmuKickOffWait() calls before CxbxUpdataNativeD3DResources() calls to ensure all pushbuffer are processed before HLE draw calls. this fixed FastVSConstant sample fast rendering. but overall rendering speed becomes very slow. jackchentwkh 2022-07-09 14:59:00 +08:00
  • 7909bb6f7f add is_nv2a_pfifo_bufy() check pfifo status by comparing dma_get and dma_put directly jackchentwkh 2022-07-09 14:56:32 +08:00
  • 31bfd2a439 check for pushbuffer mismatches with fixup jackchentwkh 2022-07-09 01:34:01 +08:00
  • 731f00d3e2 add trampolines to pushbuffer when pushbuffer is recording. jackchentwkh 2022-07-09 01:33:34 +08:00
  • bcaf1e381f remove unnecessary EmuKickOffWait() calls. keep only must have ones. jackchentwkh 2022-07-09 00:29:10 +08:00
  • bebe7c111a move g_pXbox_D3DDevice initialization to Direct3D_CreateDevice_Start() for correct initialization order. jackchentwkh 2022-07-08 23:45:04 +08:00
  • 3652b1edb3 Use EmuKickOffWait() move g_pXbox_D3DDevice initialization to Direct3D_CreateDevice_End() for more general compatibility. jackchentwkh 2022-07-08 23:33:45 +08:00
  • 05827e9e96 removed unnecessary quad to triangle primitive count conversion. the HostPrimitiveCount is converted in VertexBufferConverter.Apply() already. jackchentwkh 2022-07-08 23:28:01 +08:00
  • 94bbc51f69 Rebase to RunVertexStateShader change D3DDevice_KickOff trampoline to CDevice_KickOff fix few more patches to make rebase code working. jackchentwkh 2022-07-08 23:23:19 +08:00
  • f4e3c60c98 use XboxRenderStates in D3D_draw_state_update() instead of update host d3d RenderState directly remove duplicate EmuXB2PC_FillMode() jackchentwkh 2021-08-08 16:21:15 +08:00
  • cdc0bdb3b7 add call to pgraph_SetViewport(d) in D3D_draw_state_update(), implement SetViewport with NV2A content. jackchentwkh 2021-08-08 16:10:36 +08:00
  • 8964a0a1df add trampoline in EMUPATCH(D3DDevice_LoadVertexShaderProgram) jackchentwkh 2021-08-03 02:44:51 +08:00
  • 084c765cdf refine combiner state update handler jackchentwkh 2021-08-03 01:38:25 +08:00
  • ae4c9ed3e4 add D3DRS_FILLMODE/D3DRS_ZENABLE/D3DRS_STENCILENABLE update to host jackchentwkh 2021-08-01 02:00:41 +08:00
  • 3573b4db36 rearrange other d3d states update in block with condition jackchentwkh 2021-08-01 01:54:56 +08:00
  • 279dcd55d7 use constexpr as other constants jackchentwkh 2021-07-31 18:31:11 +08:00
  • 8602d99755 add D3DDevice_Clear trampoline, set NV2A_stateFlags |= X_STATE_RECORDPUSHBUFFER in EMUPATCH(D3DDevice_BeginPushBuffer), clear NV2A_stateFlags &= ~X_STATE_RECORDPUSHBUFFER in EMUPATCH(D3DDevice_EndPushBuffer) jackchentwkh 2021-08-01 01:37:18 +08:00
  • 6905cf0f58 add trampoline to D3DDevice_Clear() jackchentwkh 2021-08-01 01:18:20 +08:00
  • 7a2b5f157d remove duplicate is_pushbuffer_recording() in direct3d9.cpp jackchentwkh 2021-08-01 00:53:16 +08:00
  • f9c6c5e9be add EmuXB2PC_FillMode(), implement D3D_draw_clear(), correct X_STATE_RUNPUSHBUFFERWASCALLED reset in EmuExecutePushBuffer(), use NV2A_stateFlags in is_pushbuffer_recording() jackchentwkh 2021-07-31 18:26:18 +08:00
  • 7e65d1aef3 add XMIN/XMAN to NV097_SET_CLEAR_RECT_HORIZONTAL, YMIN/YMAX to NV097_SET_CLEAR_RECT_VERTICAL jackchentwkh 2021-07-31 18:23:22 +08:00
  • ce52bd4b8e replace wrongly used pgraph_SetNV2AStateFlag() with NV2A_DirtyFlags |= X_D3DDIRTYFLAG_XXX flags jackchentwkh 2021-07-31 18:24:36 +08:00
  • 9ba56320d6 add NV097_SET_BACK_SCENE_AMBIENT_COLOR/NV097_SET_BACK_MATERIAL_ALPHA/NV097_SET_BACK_MATERIAL_EMISSIONR/NV097_SET_BACK_SPECULAR_PARAMS method handler jackchentwkh 2021-07-31 10:32:13 +08:00
  • 5cb80f7faa add bit field defines of NV097_SET_LIGHT_CONTROL jackchentwkh 2021-07-31 10:29:49 +08:00
  • 6cc813e7da refine fog state update code jackchentwkh 2021-07-28 19:06:13 +08:00
  • 02fbdb0629 add X_D3DDIRTYFLAG_SPECFOG_COMBINER state update handler jackchentwkh 2021-07-28 15:51:16 +08:00
  • 6c43540bdb add pgraph_SetNV2AStateFlag(X_D3DDIRTYFLAG_SPECFOG_COMBINER) to fog related method handlers jackchentwkh 2021-07-28 15:50:43 +08:00
  • 14e0d673c2 typo fix, correct SetFogParamsScale name jackchentwkh 2021-07-28 15:50:09 +08:00
  • 6854c484d5 add point sprite/point smooth/point scale handling to NV2A jackchentwkh 2021-07-28 14:23:19 +08:00
  • 7ac0961f30 add comments for vertex constant registers used in NV097_SET_VIEWPORT_OFFSET/NV097_SET_VIEWPORT_SCALE jackchentwkh 2021-07-28 14:22:37 +08:00
  • fe17dd8cf8 KelvinPrimitive.SetCombinerSpecularFogCW[] before pgraph_SetNV2AStateFlag(X_STATE_COMBINERNEEDSSPECULAR) jackchentwkh 2021-07-28 12:11:51 +08:00
  • 357a67213d use combiner OPs/Args from KelvinPrimitive when available in GetFixedFunctionShader() jackchentwkh 2021-07-28 10:44:32 +08:00
  • 3d8618e472 add D3D_combiner_state_update(), convert_NV2A_combiner_reg_to_xbox_reg(), update NV2A_colorOP[]/NV2A_colorArgX[]/NV2A_alphaOP[]/NV2A_alphaArgX[]/NV2A_resultArg[] jackchentwkh 2021-07-28 10:43:47 +08:00
  • 7587be4a18 clean up unused comments, add NV2A_DirtyFlags |= X_D3DDIRTYFLAG_POINTPARAMS when point params related methods got called. jackchentwkh 2021-07-28 10:41:27 +08:00
  • 2b6804c640 add X_D3DTA_XXX defines jackchentwkh 2021-07-28 10:38:33 +08:00
  • 7e00286d4a add bit field of NV097_SET_COMBINER_COLOR_ICW jackchentwkh 2021-07-28 10:36:47 +08:00
  • 88c38735b6 use g_pNV2A_SetTexture[stage] in CxbxUpdateHostTextures() and CxbxUpdateHostTextureScaling() when in pushbuffer replay jackchentwkh 2021-07-26 17:21:24 +08:00
  • ede31fe87e refine D3D_texture_stage_update(), jackchentwkh 2021-07-26 17:20:27 +08:00
  • a322cf2f93 replace pg->texture_dirty[slot] with NV2A_DirtyFlags |= X_D3DDIRTYFLAG_TEXTURE_STATE_0<<slot, add SetTexture[slot].Control1/ImageRect reset code, reset SetTexture[] when control0 set with 0, seperate bumpenv dirty flag to pg->bumpenv_dirty[] jackchentwkh 2021-07-26 17:19:16 +08:00
  • d151de7e01 change texture_dirty[] to bumpenv_dirty[] jackchentwkh 2021-07-26 17:15:18 +08:00
  • 37d7a09f50 add NV097_SET_TEXTURE_ADDRESS bit field defines jackchentwkh 2021-07-26 17:14:27 +08:00
  • d4c19fdc84 add X_D3DDIRTYFLAG_TEXTURE_STATE_0~3, X_VERTEXFORMAT bit masks jackchentwkh 2021-07-26 17:13:54 +08:00
  • 0adbbbb252 replace g_nv2a_is_pushpuffer_replay with NV2A_stateFlags |/& X_STATE_RUNPUSHBUFFERWASCALLED jackchentwkh 2021-07-25 20:55:26 +08:00
  • 94b4a16c79 typo fix jackchentwkh 2021-07-25 19:42:43 +08:00
  • 6c01eb57a5 avoid draw call process when there is no draw mode set, test case GUN jackchentwkh 2021-07-25 19:41:30 +08:00
  • f708683794 avoid inline array draw call when D3D_StreamZeroStride == 0, test case GUN jackchentwkh 2021-07-25 19:39:47 +08:00
  • 03642a7a6d comment edit jackchentwkh 2021-07-25 19:36:44 +08:00
  • c2ce2c5a71 add quadstrip implementation, modify quadlist implementation jackchentwkh 2021-07-25 19:36:16 +08:00
  • 713812019e determine whether colorOp is X_D3DTOP_DISABLE via Kelvin content in GetFixedFunctionShader() jackchentwkh 2021-07-25 16:00:04 +08:00
  • ac345a9912 add NV097_SET_COMBINER_COLOR_ICW_A_SOURCE and NV097_SET_COMBINER_COLOR_ICW_B_MAP bit field defines jackchentwkh 2021-07-25 15:58:05 +08:00
  • f08f353ee6 use KelvinPrimitive.SetPointSmoothEnable in pixel shader generation jackchentwkh 2021-07-25 11:22:15 +08:00
  • 6995259fee add comments for SetTexture[].Address, and NV2A_stateFlags & X_STATE_COMBINERNEEDSSPECULAR jackchentwkh 2021-07-25 11:21:48 +08:00
  • 71a2412810 use colorsign from kelvin, and KelvinPrimitive.SetColorKeyColor[] in pixel shader generation jackchentwkh 2021-07-25 10:11:51 +08:00
  • d916cdbbc6 add bit field comment for SetTexture[].Address/Control0/Contrl1/Filter/Palette/BorderColor jackchentwkh 2021-07-25 10:10:29 +08:00
  • 607cf4b826 use alphakill and colorkeyop from Kelvin in pixel shader generation jackchentwkh 2021-07-25 08:59:30 +08:00
  • 6917b1984a update comments jackchentwkh 2021-07-25 08:58:13 +08:00
  • 64185844a7 create unions for SetPointParams[] and SetFogParams[] and provide meaningful names for submembers jackchentwkh 2021-07-25 08:57:49 +08:00
  • 77f959255d Re-did "Populate PSDef fields sequentially, reading from Kelvin fields (and reviewed their sources)" ...although this time including the optimization to memcpy adjacent fields (but still mentioning them in comments). PatrickvL 2021-07-23 12:57:46 +02:00
  • 411f803550 add pgraph_SetNV2AStateFlag(X_STATE_COMBINERNEEDSSPECULAR) and pgraph_ClearNV2AStateFlag(X_STATE_COMBINERNEEDSSPECULAR) calls in jackchentwkh 2021-07-23 17:12:44 +08:00
  • c761a9af1c add pgraph_SetNV2AStateFlag(), pgraph_ClearNV2AStateFlag(), pgraph_GetNV2AStateFlag(), pgraph_purge_dirty_and_state_flag() jackchentwkh 2021-07-23 17:11:17 +08:00
  • 6cd575887b add X_STATE_ definitions for xbox d3d state flags, also used by NV2A state flags jackchentwkh 2021-07-23 17:08:53 +08:00
  • 8a2ba16dc7 correct wrong bit test and clear operator jackchentwkh 2021-07-23 14:39:32 +08:00
  • e57ffdd947 relocate extern globals and functions jackchentwkh 2021-07-23 14:35:37 +08:00
  • b70078ba02 use NV2A env in SnapshotRuntimeVariables(), GetFixedFunctionShader(), UpdateFixedFunctionPixelShaderState(), DxbxUpdateActivePixelShader() jackchentwkh 2021-07-23 14:33:17 +08:00
  • dd824a6360 enable call to D3D_texture_stage_update() in D3D_texture_stage_update() for pixel shader setup, add g_pNV2A_SetTexture[xbox::X_D3DTS_STAGECOUNT] global for texture stage textures using KelvinPrimitive content jackchentwkh 2021-07-23 14:31:16 +08:00
  • 4195b33cd5 Populate PSDef fields sequentially, reading from Kelvin fields (and reviewed their sources) PatrickvL 2021-07-22 18:03:43 +02:00
  • df7b264951 pixel shader implementation jackchentwkh 2021-07-22 23:19:17 +08:00
  • 427dfb4efc rearrange D3D_draw_state_update() update sequence to follow xbox d3d behavior jackchentwkh 2021-07-22 15:06:58 +08:00
  • 58552afed7 add NV2A_DirtyFlags global for nv2a dirty flag, pgraph_use_UserPixelShader() and pgraph_use_FixedPixelShader() for using pixel shader jackchentwkh 2021-07-22 14:20:03 +08:00
  • 3942a2f314 add X_D3DDIRTYFLAG_ bit masks defines for xbox/nv2a dirty flags jackchentwkh 2021-07-22 14:19:01 +08:00
  • 093e429f2d correct xbox d3d transform matrix offset calculation in CxbxImpl_SetTransformFast(). disable pushbuffer waiting in swap() jackchentwkh 2021-07-21 14:41:19 +08:00
  • 5bed791124 add pgraph_use_DirectModelView()/pgraph_use_Transform() calls in EMUPATCH(D3DDevice_SetModelView) jackchentwkh 2021-07-21 13:26:17 +08:00
  • ba550a608d solve merge confliction left over, removed unused notes in comments. jackchentwkh 2021-07-21 13:19:15 +08:00
  • 0d69c1d14d Replaced value assertions with offset assertions, performed at compile-time, saving on runtime costs Removed obsolete KelvinState (we use KelvinPrimitive now) PatrickvL 2021-07-20 16:20:48 +02:00