From 56f80ace907ca64a0144c21836c0f8c6aa10219d Mon Sep 17 00:00:00 2001 From: xebra Date: Thu, 9 Mar 2017 18:04:16 +0900 Subject: [PATCH] [spline/bezier]Unify the word "tesselate" to "tessellate". --- GPU/Common/DrawEngineCommon.cpp | 6 +++--- GPU/Common/SplineCommon.cpp | 20 ++++++++++---------- GPU/Common/SplineCommon.h | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/GPU/Common/DrawEngineCommon.cpp b/GPU/Common/DrawEngineCommon.cpp index 370662b931..745f772259 100644 --- a/GPU/Common/DrawEngineCommon.cpp +++ b/GPU/Common/DrawEngineCommon.cpp @@ -407,7 +407,7 @@ u32 DrawEngineCommon::NormalizeVertices(u8 *outPtr, u8 *bufPtr, const u8 *inPtr, float bnrm[3], bpos[3]; if (vertType & GE_VTYPE_NRM_MASK) { - // Normals are generated during tesselation anyway, not sure if any need to supply + // Normals are generated during tessellation anyway, not sure if any need to supply reader.ReadNrm(nrm); } else { nrm[0] = 0; @@ -443,7 +443,7 @@ u32 DrawEngineCommon::NormalizeVertices(u8 *outPtr, u8 *bufPtr, const u8 *inPtr, if (vertType & GE_VTYPE_TC_MASK) { reader.ReadUV(sv.uv); } else { - sv.uv[0] = 0.0f; // This will get filled in during tesselation + sv.uv[0] = 0.0f; // This will get filled in during tessellation sv.uv[1] = 0.0f; } if (vertType & GE_VTYPE_COL_MASK) { @@ -452,7 +452,7 @@ u32 DrawEngineCommon::NormalizeVertices(u8 *outPtr, u8 *bufPtr, const u8 *inPtr, memcpy(sv.color, defaultColor, 4); } if (vertType & GE_VTYPE_NRM_MASK) { - // Normals are generated during tesselation anyway, not sure if any need to supply + // Normals are generated during tessellation anyway, not sure if any need to supply reader.ReadNrm((float *)&sv.nrm); } else { sv.nrm.x = 0.0f; diff --git a/GPU/Common/SplineCommon.cpp b/GPU/Common/SplineCommon.cpp index 9708746edb..ed4ecc5cc3 100644 --- a/GPU/Common/SplineCommon.cpp +++ b/GPU/Common/SplineCommon.cpp @@ -354,7 +354,7 @@ static void SplinePatchFullQuality(u8 *&dest, u16 *indices, int &count, const Sp spline_knot(spatch.count_u - 1, spatch.type_u, knot_u); spline_knot(spatch.count_v - 1, spatch.type_v, knot_v); - // Increase tesselation based on the size. Should be approximately right? + // Increase tessellation based on the size. Should be approximately right? int patch_div_s = (spatch.count_u - 3) * spatch.tess_u; int patch_div_t = (spatch.count_v - 3) * spatch.tess_v; if (quality > 1) { @@ -367,7 +367,7 @@ static void SplinePatchFullQuality(u8 *&dest, u16 *indices, int &count, const Sp } } - // Downsample until it fits, in case crazy tesselation factors are sent. + // Downsample until it fits, in case crazy tessellation factors are sent. while ((patch_div_s + 1) * (patch_div_t + 1) > maxVertices) { patch_div_s /= 2; patch_div_t /= 2; @@ -543,7 +543,7 @@ static void SplinePatchFullQuality(u8 *&dest, u16 *indices, int &count, const Sp } GEPatchPrimType prim_type = spatch.primType; - // Tesselate. + // Tessellate. for (int tile_v = 0; tile_v < patch_div_t; ++tile_v) { for (int tile_u = 0; tile_u < patch_div_s; ++tile_u) { int idx0 = tile_v * (patch_div_s + 1) + tile_u; @@ -594,7 +594,7 @@ static void SplinePatchFullQualityDispatch(u8 *&dest, u16 *indices, int &count, SplinePatchFullQualityDispatch2(dest, indices, count, spatch, origVertType, quality, maxVertices); } -void TesselateSplinePatch(u8 *&dest, u16 *indices, int &count, const SplinePatchLocal &spatch, u32 origVertType, int maxVertexCount) { +void TessellateSplinePatch(u8 *&dest, u16 *indices, int &count, const SplinePatchLocal &spatch, u32 origVertType, int maxVertexCount) { switch (g_Config.iSplineBezierQuality) { case LOW_QUALITY: _SplinePatchLowQuality(dest, indices, count, spatch, origVertType); @@ -797,7 +797,7 @@ static void _BezierPatchHighQuality(u8 *&dest, u16 *&indices, int &count, int te } // Prepare mesh of one patch for "Instanced Tessellation". -static void TesselateBezierPatchHardware(u8 *&dest, u16 *indices, int &count, int tess_u, int tess_v, GEPatchPrimType primType) { +static void TessellateBezierPatchHardware(u8 *&dest, u16 *indices, int &count, int tess_u, int tess_v, GEPatchPrimType primType) { SimpleVertex *&vertices = (SimpleVertex*&)dest; float inv_u = 1.0f / (float)tess_u; @@ -827,7 +827,7 @@ static void TesselateBezierPatchHardware(u8 *&dest, u16 *indices, int &count, in } } -void TesselateBezierPatch(u8 *&dest, u16 *&indices, int &count, int tess_u, int tess_v, const BezierPatch &patch, u32 origVertType) { +void TessellateBezierPatch(u8 *&dest, u16 *&indices, int &count, int tess_u, int tess_v, const BezierPatch &patch, u32 origVertType) { switch (g_Config.iSplineBezierQuality) { case LOW_QUALITY: _BezierPatchLowQuality(dest, indices, count, tess_u, tess_v, patch, origVertType); @@ -947,7 +947,7 @@ void DrawEngineCommon::SubmitSpline(const void *control_points, const void *indi numPatches = (count_u - 3) * (count_v - 3); } else { int maxVertexCount = SPLINE_BUFFER_SIZE / vertexSize; - TesselateSplinePatch(dest, quadIndices_, count, patch, origVertType, maxVertexCount); + TessellateSplinePatch(dest, quadIndices_, count, patch, origVertType, maxVertexCount); } delete[] points; @@ -1067,18 +1067,18 @@ void DrawEngineCommon::SubmitBezier(const void *control_points, const void *indi u16 *inds = quadIndices_; if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) { tessDataTransfer->SendDataToShader(pos, tex, col, count_u * count_v, hasColor, hasTexCoords); - TesselateBezierPatchHardware(dest, inds, count, tess_u, tess_v, prim_type); + TessellateBezierPatchHardware(dest, inds, count, tess_u, tess_v, prim_type); numPatches = num_patches_u * num_patches_v; } else { int maxVertices = SPLINE_BUFFER_SIZE / vertexSize; - // Downsample until it fits, in case crazy tesselation factors are sent. + // Downsample until it fits, in case crazy tessellation factors are sent. while ((tess_u + 1) * (tess_v + 1) * num_patches_u * num_patches_v > maxVertices) { tess_u /= 2; tess_v /= 2; } for (int patch_idx = 0; patch_idx < num_patches_u*num_patches_v; ++patch_idx) { const BezierPatch &patch = patches[patch_idx]; - TesselateBezierPatch(dest, inds, count, tess_u, tess_v, patch, origVertType); + TessellateBezierPatch(dest, inds, count, tess_u, tess_v, patch, origVertType); } delete[] patches; } diff --git a/GPU/Common/SplineCommon.h b/GPU/Common/SplineCommon.h index b1f8dd95f4..5eecfb602b 100644 --- a/GPU/Common/SplineCommon.h +++ b/GPU/Common/SplineCommon.h @@ -65,5 +65,5 @@ enum SplineQuality { HIGH_QUALITY = 2, }; -void TesselateSplinePatch(u8 *&dest, u16 *indices, int &count, const SplinePatchLocal &spatch, u32 origVertType, int maxVertices); -void TesselateBezierPatch(u8 *&dest, u16 *&indices, int &count, int tess_u, int tess_v, const BezierPatch &patch, u32 origVertType, int maxVertices); +void TessellateSplinePatch(u8 *&dest, u16 *indices, int &count, const SplinePatchLocal &spatch, u32 origVertType, int maxVertices); +void TessellateBezierPatch(u8 *&dest, u16 *&indices, int &count, int tess_u, int tess_v, const BezierPatch &patch, u32 origVertType, int maxVertices);