From 8ad38dfaae30ed460edb6bbfd3c3172ff2d71a3a Mon Sep 17 00:00:00 2001 From: xebra Date: Mon, 24 Sep 2018 20:12:28 +0900 Subject: [PATCH] [spline/bezier]oops --- GPU/GPUCommon.cpp | 17 ++--------------- GPU/GPUState.h | 3 --- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index d3b24ba58e..ff6b91d039 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1760,12 +1760,8 @@ void GPUCommon::Execute_Bezier(u32 op, u32 diff) { if (CanUseHardwareTessellation(patchPrim)) { gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE); gstate_c.bezier = true; - int num_patches_u = (bz_ucount - 1) / 3; - bool patchesChanged = gstate_c.spline_num_patches_u != num_patches_u; - bool countsChanged = gstate_c.spline_num_points_u != bz_ucount; - if (patchesChanged || countsChanged) { + if (gstate_c.spline_num_points_u != bz_ucount) { gstate_c.Dirty(DIRTY_BEZIERSPLINE); - gstate_c.spline_num_patches_u = num_patches_u; gstate_c.spline_num_points_u = bz_ucount; } } @@ -1828,17 +1824,8 @@ void GPUCommon::Execute_Spline(u32 op, u32 diff) { if (CanUseHardwareTessellation(patchPrim)) { gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE); gstate_c.spline = true; - int tess_u = gstate.getPatchDivisionU(); - int tess_v = gstate.getPatchDivisionV(); - int num_patches_u = sp_ucount - 3; - bool divsChanged = gstate_c.spline_tess_u != tess_u || gstate_c.spline_tess_v != tess_v; - bool patchesChanged = gstate_c.spline_num_patches_u != num_patches_u; - bool countsChanged = gstate_c.spline_num_points_u != sp_ucount; - if (divsChanged || patchesChanged || countsChanged) { + if (gstate_c.spline_num_points_u != sp_ucount) { gstate_c.Dirty(DIRTY_BEZIERSPLINE); - gstate_c.spline_tess_u = tess_u; - gstate_c.spline_tess_v = tess_v; - gstate_c.spline_num_patches_u = num_patches_u; gstate_c.spline_num_points_u = sp_ucount; } } diff --git a/GPU/GPUState.h b/GPU/GPUState.h index d0287c3bcb..cb6aad524a 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -602,9 +602,6 @@ struct GPUStateCache { bool bezier; bool spline; - int spline_tess_u; - int spline_tess_v; - int spline_num_patches_u; int spline_num_points_u; bool useShaderDepal;