[spline/bezier]oops

This commit is contained in:
xebra 2018-09-24 20:12:28 +09:00
parent c49d9e2f72
commit 8ad38dfaae
2 changed files with 2 additions and 18 deletions

View File

@ -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;
}
}

View File

@ -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;