diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-04-20 10:11:47 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-04-20 10:12:02 +0300 |
commit | f5191b87608f6607aa1dbd4b9409174db351984b (patch) | |
tree | c22803f0ced38729c6e73af21e99f3401bdc77e3 /source/blender | |
parent | 65a1fcdaf76f47bc51b4d2143470bbbec03b7f12 (diff) |
Fix GPU subdivision: Crash on adding subdivision surface modifier
This was caused by the use of a reserved keyword macro that is not
directly used but causes an error on some compiler.
Change the occurences to not match the macros.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl b/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl index 65cf4ebb90f..c48735a55f9 100644 --- a/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl +++ b/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl @@ -248,16 +248,16 @@ OsdPatchCoord GetPatchCoord(int face_index, float u, float v) void evaluate_patches_limits(int patch_index, float u, float v, inout vec2 dst) { OsdPatchCoord coord = GetPatchCoord(patch_index, u, v); - OsdPatchArray array = GetPatchArray(coord.arrayIndex); + OsdPatchArray arr = GetPatchArray(coord.arrayIndex); OsdPatchParam param = GetPatchParam(coord.patchIndex); - int patchType = OsdPatchParamIsRegular(param) ? array.regDesc : array.desc; + int patchType = OsdPatchParamIsRegular(param) ? arr.regDesc : arr.desc; float wP[20], wDu[20], wDv[20], wDuu[20], wDuv[20], wDvv[20]; int nPoints = OsdEvaluatePatchBasis( patchType, param, coord.s, coord.t, wP, wDu, wDv, wDuu, wDuv, wDvv); - int indexBase = array.indexBase + array.stride * (coord.patchIndex - array.primitiveIdBase); + int indexBase = arr.indexBase + arr.stride * (coord.patchIndex - arr.primitiveIdBase); for (int cv = 0; cv < nPoints; ++cv) { int index = patchIndexBuffer[indexBase + cv]; @@ -270,16 +270,16 @@ void evaluate_patches_limits( int patch_index, float u, float v, inout vec3 dst, inout vec3 du, inout vec3 dv) { OsdPatchCoord coord = GetPatchCoord(patch_index, u, v); - OsdPatchArray array = GetPatchArray(coord.arrayIndex); + OsdPatchArray arr = GetPatchArray(coord.arrayIndex); OsdPatchParam param = GetPatchParam(coord.patchIndex); - int patchType = OsdPatchParamIsRegular(param) ? array.regDesc : array.desc; + int patchType = OsdPatchParamIsRegular(param) ? arr.regDesc : arr.desc; float wP[20], wDu[20], wDv[20], wDuu[20], wDuv[20], wDvv[20]; int nPoints = OsdEvaluatePatchBasis( patchType, param, coord.s, coord.t, wP, wDu, wDv, wDuu, wDuv, wDvv); - int indexBase = array.indexBase + array.stride * (coord.patchIndex - array.primitiveIdBase); + int indexBase = arr.indexBase + arr.stride * (coord.patchIndex - arr.primitiveIdBase); for (int cv = 0; cv < nPoints; ++cv) { int index = patchIndexBuffer[indexBase + cv]; |