Permalink
Browse files

Dirty vertexshader state on hw bezier/spline.

  • Loading branch information...
unknownbrackets authored and hrydgard committed Mar 19, 2017
1 parent 56cd991 commit c84efcfc977f732038cfc5fbf40e8d68dbcfdf86
Showing with 20 additions and 2 deletions.
  1. +6 −0 GPU/D3D11/GPU_D3D11.cpp
  2. +8 −2 GPU/GLES/GPU_GLES.cpp
  3. +6 −0 GPU/Vulkan/GPU_Vulkan.cpp
View
@@ -588,6 +588,7 @@ void GPU_D3D11::Execute_Bezier(u32 op, u32 diff) {
bool patchFacing = gstate.patchfacing & 1;
if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) {
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.bezier = true;
if (gstate_c.spline_count_u != bz_ucount) {
gstate_c.Dirty(DIRTY_BEZIERSPLINE);
@@ -598,6 +599,8 @@ void GPU_D3D11::Execute_Bezier(u32 op, u32 diff) {
int bytesRead = 0;
drawEngine_.SubmitBezier(control_points, indices, gstate.getPatchDivisionU(), gstate.getPatchDivisionV(), bz_ucount, bz_vcount, patchPrim, computeNormals, patchFacing, gstate.vertType, &bytesRead);
if (gstate_c.bezier)
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.bezier = false;
// After drawing, we advance pointers - see SubmitPrim which does the same.
@@ -649,6 +652,7 @@ void GPU_D3D11::Execute_Spline(u32 op, u32 diff) {
u32 vertType = gstate.vertType;
if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) {
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.spline = true;
bool countsChanged = gstate_c.spline_count_u != sp_ucount || gstate_c.spline_count_v != sp_vcount;
bool typesChanged = gstate_c.spline_type_u != sp_utype || gstate_c.spline_type_v != sp_vtype;
@@ -663,6 +667,8 @@ void GPU_D3D11::Execute_Spline(u32 op, u32 diff) {
int bytesRead = 0;
drawEngine_.SubmitSpline(control_points, indices, gstate.getPatchDivisionU(), gstate.getPatchDivisionV(), sp_ucount, sp_vcount, sp_utype, sp_vtype, patchPrim, computeNormals, patchFacing, vertType, &bytesRead);
if (gstate_c.spline)
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.spline = false;
// After drawing, we advance pointers - see SubmitPrim which does the same.
View
@@ -762,6 +762,7 @@ void GPU_GLES::Execute_Bezier(u32 op, u32 diff) {
bool patchFacing = gstate.patchfacing & 1;
if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) {
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.bezier = true;
if (gstate_c.spline_count_u != bz_ucount) {
gstate_c.Dirty(DIRTY_BEZIERSPLINE);
@@ -771,7 +772,9 @@ void GPU_GLES::Execute_Bezier(u32 op, u32 diff) {
int bytesRead = 0;
drawEngine_.SubmitBezier(control_points, indices, gstate.getPatchDivisionU(), gstate.getPatchDivisionV(), bz_ucount, bz_vcount, patchPrim, computeNormals, patchFacing, gstate.vertType, &bytesRead);
if (gstate_c.bezier)
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.bezier = false;
// After drawing, we advance pointers - see SubmitPrim which does the same.
@@ -823,6 +826,7 @@ void GPU_GLES::Execute_Spline(u32 op, u32 diff) {
u32 vertType = gstate.vertType;
if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) {
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.spline = true;
bool countsChanged = gstate_c.spline_count_u != sp_ucount || gstate_c.spline_count_v != sp_vcount;
bool typesChanged = gstate_c.spline_type_u != sp_utype || gstate_c.spline_type_v != sp_vtype;
@@ -837,7 +841,9 @@ void GPU_GLES::Execute_Spline(u32 op, u32 diff) {
int bytesRead = 0;
drawEngine_.SubmitSpline(control_points, indices, gstate.getPatchDivisionU(), gstate.getPatchDivisionV(), sp_ucount, sp_vcount, sp_utype, sp_vtype, patchPrim, computeNormals, patchFacing, vertType, &bytesRead);
if (gstate_c.spline)
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.spline = false;
// After drawing, we advance pointers - see SubmitPrim which does the same.
@@ -591,6 +591,7 @@ void GPU_Vulkan::Execute_Bezier(u32 op, u32 diff) {
int bytesRead = 0;
if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) {
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.bezier = true;
if (gstate_c.spline_count_u != bz_ucount) {
gstate_c.Dirty(DIRTY_BEZIERSPLINE);
@@ -600,6 +601,8 @@ void GPU_Vulkan::Execute_Bezier(u32 op, u32 diff) {
drawEngine_.SubmitBezier(control_points, indices, gstate.getPatchDivisionU(), gstate.getPatchDivisionV(), bz_ucount, bz_vcount, patchPrim, computeNormals, patchFacing, gstate.vertType, &bytesRead);
if (gstate_c.bezier)
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.bezier = false;
// After drawing, we advance pointers - see SubmitPrim which does the same.
@@ -651,6 +654,7 @@ void GPU_Vulkan::Execute_Spline(u32 op, u32 diff) {
u32 vertType = gstate.vertType;
if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) {
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.spline = true;
bool countsChanged = gstate_c.spline_count_u != sp_ucount || gstate_c.spline_count_v != sp_vcount;
bool typesChanged = gstate_c.spline_type_u != sp_utype || gstate_c.spline_type_v != sp_vtype;
@@ -666,6 +670,8 @@ void GPU_Vulkan::Execute_Spline(u32 op, u32 diff) {
int bytesRead = 0;
drawEngine_.SubmitSpline(control_points, indices, gstate.getPatchDivisionU(), gstate.getPatchDivisionV(), sp_ucount, sp_vcount, sp_utype, sp_vtype, patchPrim, computeNormals, patchFacing, vertType, &bytesRead);
if (gstate_c.spline)
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE);
gstate_c.spline = false;
// After drawing, we advance pointers - see SubmitPrim which does the same.

0 comments on commit c84efcf

Please sign in to comment.