Skip to content

Commit

Permalink
[spline/bezier]oops
Browse files Browse the repository at this point in the history
  • Loading branch information
xebra committed Oct 7, 2018
1 parent c49d9e2 commit 8ad38df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
17 changes: 2 additions & 15 deletions GPU/GPUCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}
}
Expand Down
3 changes: 0 additions & 3 deletions GPU/GPUState.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8ad38df

Please sign in to comment.