diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 9 |
2 files changed, 5 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index be4f0011e97..b925094d392 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -665,7 +665,7 @@ static void cdDM_drawMappedFaces( else me = userData; - findex_buffer = GPU_buffer_alloc(dm->drawObject->tot_loop_verts * sizeof(int), false); + findex_buffer = GPU_buffer_alloc(dm->drawObject->tot_loop_verts * sizeof(int)); fi_map = GPU_buffer_lock(findex_buffer, GPU_BINDING_ARRAY); if (fi_map) { @@ -898,9 +898,7 @@ static void cdDM_drawMappedFacesGLSL( glShadeModel(GL_SMOOTH); - /* workaround for NVIDIA GPUs on Mac not supporting vertex arrays + interleaved formats, see T43342 */ - if ((GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_ANY) && (U.gameflags & USER_DISABLE_VBO)) || - setDrawOptions != NULL) + if (setDrawOptions != NULL) { DMVertexAttribs attribs; DEBUG_VBO("Using legacy code. cdDM_drawMappedFacesGLSL\n"); @@ -1037,11 +1035,8 @@ static void cdDM_drawMappedFacesGLSL( /* part two, generate and fill the arrays with the data */ if (max_element_size > 0) { - buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts, false); + buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts); - if (buffer == NULL) { - buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts, true); - } varray = GPU_buffer_lock_stream(buffer, GPU_BINDING_ARRAY); if (varray == NULL) { GPU_buffers_unbind(); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 5814a06bb9f..b7742d82991 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2808,9 +2808,7 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, CCG_key_top_level(&key, ss); ccgdm_pbvh_update(ccgdm); - /* workaround for NVIDIA GPUs on Mac not supporting vertex arrays + interleaved formats, see T43342 */ - if ((GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_ANY) && (U.gameflags & USER_DISABLE_VBO)) || - setDrawOptions != NULL) + if (setDrawOptions != NULL) { const float (*lnors)[3] = dm->getLoopDataArray(dm, CD_NORMAL); DMVertexAttribs attribs = {{{NULL}}}; @@ -3029,11 +3027,8 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, /* part two, generate and fill the arrays with the data */ if (max_element_size > 0) { - buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts, false); + buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts); - if (buffer == NULL) { - buffer = GPU_buffer_alloc(max_element_size * dm->drawObject->tot_loop_verts, true); - } varray = GPU_buffer_lock_stream(buffer, GPU_BINDING_ARRAY); if (varray == NULL) { GPU_buffers_unbind(); |