diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llrender/llvertexbuffer.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/linden/indra/llrender/llvertexbuffer.cpp b/linden/indra/llrender/llvertexbuffer.cpp index 31c2d75..461edbe 100644 --- a/linden/indra/llrender/llvertexbuffer.cpp +++ b/linden/indra/llrender/llvertexbuffer.cpp | |||
@@ -96,7 +96,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) | |||
96 | { | 96 | { |
97 | /*if (LLGLImmediate::sStarted) | 97 | /*if (LLGLImmediate::sStarted) |
98 | { | 98 | { |
99 | llwarns << "Cannot use LLGLImmediate and LLVertexBuffer simultaneously!" << llendl; | 99 | llerrs << "Cannot use LLGLImmediate and LLVertexBuffer simultaneously!" << llendl; |
100 | }*/ | 100 | }*/ |
101 | 101 | ||
102 | if (sLastMask != data_mask) | 102 | if (sLastMask != data_mask) |
@@ -129,7 +129,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) | |||
129 | { //needs to be enabled, make sure it was (DEBUG TEMPORARY) | 129 | { //needs to be enabled, make sure it was (DEBUG TEMPORARY) |
130 | if (i > 0 && !glIsEnabled(array[i])) | 130 | if (i > 0 && !glIsEnabled(array[i])) |
131 | { | 131 | { |
132 | llwarns << "Bad client state! " << array[i] << " disabled." << llendl; | 132 | llerrs << "Bad client state! " << array[i] << " disabled." << llendl; |
133 | } | 133 | } |
134 | } | 134 | } |
135 | } | 135 | } |
@@ -141,7 +141,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) | |||
141 | } | 141 | } |
142 | else if (gDebugGL && glIsEnabled(array[i])) | 142 | else if (gDebugGL && glIsEnabled(array[i])) |
143 | { //needs to be disabled, make sure it was (DEBUG TEMPORARY) | 143 | { //needs to be disabled, make sure it was (DEBUG TEMPORARY) |
144 | llwarns << "Bad client state! " << array[i] << " enabled." << llendl; | 144 | llerrs << "Bad client state! " << array[i] << " enabled." << llendl; |
145 | } | 145 | } |
146 | } | 146 | } |
147 | } | 147 | } |
@@ -197,28 +197,28 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi | |||
197 | if (start >= (U32) mRequestedNumVerts || | 197 | if (start >= (U32) mRequestedNumVerts || |
198 | end >= (U32) mRequestedNumVerts) | 198 | end >= (U32) mRequestedNumVerts) |
199 | { | 199 | { |
200 | llwarns << "Bad vertex buffer draw range: [" << start << ", " << end << "]" << llendl; | 200 | llerrs << "Bad vertex buffer draw range: [" << start << ", " << end << "]" << llendl; |
201 | } | 201 | } |
202 | 202 | ||
203 | if (indices_offset >= (U32) mRequestedNumIndices || | 203 | if (indices_offset >= (U32) mRequestedNumIndices || |
204 | indices_offset + count > (U32) mRequestedNumIndices) | 204 | indices_offset + count > (U32) mRequestedNumIndices) |
205 | { | 205 | { |
206 | llwarns << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl; | 206 | llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl; |
207 | } | 207 | } |
208 | 208 | ||
209 | if (mGLIndices != sGLRenderIndices) | 209 | if (mGLIndices != sGLRenderIndices) |
210 | { | 210 | { |
211 | llwarns << "Wrong index buffer bound." << llendl; | 211 | llerrs << "Wrong index buffer bound." << llendl; |
212 | } | 212 | } |
213 | 213 | ||
214 | if (mGLBuffer != sGLRenderBuffer) | 214 | if (mGLBuffer != sGLRenderBuffer) |
215 | { | 215 | { |
216 | llwarns << "Wrong vertex buffer bound." << llendl; | 216 | llerrs << "Wrong vertex buffer bound." << llendl; |
217 | } | 217 | } |
218 | 218 | ||
219 | if (mode > LLRender::NUM_MODES) | 219 | if (mode > LLRender::NUM_MODES) |
220 | { | 220 | { |
221 | llwarns << "Invalid draw mode: " << mode << llendl; | 221 | llerrs << "Invalid draw mode: " << mode << llendl; |
222 | return; | 222 | return; |
223 | } | 223 | } |
224 | 224 | ||
@@ -233,22 +233,22 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const | |||
233 | if (indices_offset >= (U32) mRequestedNumIndices || | 233 | if (indices_offset >= (U32) mRequestedNumIndices || |
234 | indices_offset + count > (U32) mRequestedNumIndices) | 234 | indices_offset + count > (U32) mRequestedNumIndices) |
235 | { | 235 | { |
236 | llwarns << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl; | 236 | llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl; |
237 | } | 237 | } |
238 | 238 | ||
239 | if (mGLIndices != sGLRenderIndices) | 239 | if (mGLIndices != sGLRenderIndices) |
240 | { | 240 | { |
241 | llwarns << "Wrong index buffer bound." << llendl; | 241 | llerrs << "Wrong index buffer bound." << llendl; |
242 | } | 242 | } |
243 | 243 | ||
244 | if (mGLBuffer != sGLRenderBuffer) | 244 | if (mGLBuffer != sGLRenderBuffer) |
245 | { | 245 | { |
246 | llwarns << "Wrong vertex buffer bound." << llendl; | 246 | llerrs << "Wrong vertex buffer bound." << llendl; |
247 | } | 247 | } |
248 | 248 | ||
249 | if (mode > LLRender::NUM_MODES) | 249 | if (mode > LLRender::NUM_MODES) |
250 | { | 250 | { |
251 | llwarns << "Invalid draw mode: " << mode << llendl; | 251 | llerrs << "Invalid draw mode: " << mode << llendl; |
252 | return; | 252 | return; |
253 | } | 253 | } |
254 | 254 | ||
@@ -263,17 +263,17 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const | |||
263 | if (first >= (U32) mRequestedNumVerts || | 263 | if (first >= (U32) mRequestedNumVerts || |
264 | first + count > (U32) mRequestedNumVerts) | 264 | first + count > (U32) mRequestedNumVerts) |
265 | { | 265 | { |
266 | llwarns << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl; | 266 | llerrs << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl; |
267 | } | 267 | } |
268 | 268 | ||
269 | if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive) | 269 | if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive) |
270 | { | 270 | { |
271 | llwarns << "Wrong vertex buffer bound." << llendl; | 271 | llerrs << "Wrong vertex buffer bound." << llendl; |
272 | } | 272 | } |
273 | 273 | ||
274 | if (mode > LLRender::NUM_MODES) | 274 | if (mode > LLRender::NUM_MODES) |
275 | { | 275 | { |
276 | llwarns << "Invalid draw mode: " << mode << llendl; | 276 | llerrs << "Invalid draw mode: " << mode << llendl; |
277 | return; | 277 | return; |
278 | } | 278 | } |
279 | 279 | ||
@@ -530,7 +530,7 @@ void LLVertexBuffer::destroyGLBuffer() | |||
530 | { | 530 | { |
531 | if (mMappedData || mMappedIndexData) | 531 | if (mMappedData || mMappedIndexData) |
532 | { | 532 | { |
533 | llwarns << "Vertex buffer destroyed while mapped!" << llendl; | 533 | llerrs << "Vertex buffer destroyed while mapped!" << llendl; |
534 | } | 534 | } |
535 | releaseBuffer(); | 535 | releaseBuffer(); |
536 | } | 536 | } |
@@ -557,7 +557,7 @@ void LLVertexBuffer::destroyGLIndices() | |||
557 | { | 557 | { |
558 | if (mMappedData || mMappedIndexData) | 558 | if (mMappedData || mMappedIndexData) |
559 | { | 559 | { |
560 | llwarns << "Vertex buffer destroyed while mapped." << llendl; | 560 | llerrs << "Vertex buffer destroyed while mapped." << llendl; |
561 | } | 561 | } |
562 | releaseIndices(); | 562 | releaseIndices(); |
563 | } | 563 | } |
@@ -634,7 +634,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create) | |||
634 | 634 | ||
635 | if (mMappedData) | 635 | if (mMappedData) |
636 | { | 636 | { |
637 | llwarns << "LLVertexBuffer::allocateBuffer() called redundantly." << llendl; | 637 | llerrs << "LLVertexBuffer::allocateBuffer() called redundantly." << llendl; |
638 | } | 638 | } |
639 | if (create && (nverts || nindices)) | 639 | if (create && (nverts || nindices)) |
640 | { | 640 | { |
@@ -782,11 +782,11 @@ U8* LLVertexBuffer::mapBuffer(S32 access) | |||
782 | LLMemType mt(LLMemType::MTYPE_VERTEX_DATA); | 782 | LLMemType mt(LLMemType::MTYPE_VERTEX_DATA); |
783 | if (mFinal) | 783 | if (mFinal) |
784 | { | 784 | { |
785 | llwarns << "LLVertexBuffer::mapBuffer() called on a finalized buffer." << llendl; | 785 | llerrs << "LLVertexBuffer::mapBuffer() called on a finalized buffer." << llendl; |
786 | } | 786 | } |
787 | if (!useVBOs() && !mMappedData && !mMappedIndexData) | 787 | if (!useVBOs() && !mMappedData && !mMappedIndexData) |
788 | { | 788 | { |
789 | llwarns << "LLVertexBuffer::mapBuffer() called on unallocated buffer." << llendl; | 789 | llerrs << "LLVertexBuffer::mapBuffer() called on unallocated buffer." << llendl; |
790 | } | 790 | } |
791 | 791 | ||
792 | if (!mLocked && useVBOs()) | 792 | if (!mLocked && useVBOs()) |
@@ -813,11 +813,11 @@ U8* LLVertexBuffer::mapBuffer(S32 access) | |||
813 | glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); | 813 | glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); |
814 | if (buff != mGLBuffer) | 814 | if (buff != mGLBuffer) |
815 | { | 815 | { |
816 | llwarns << "Invalid GL vertex buffer bound: " << buff << llendl; | 816 | llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; |
817 | } | 817 | } |
818 | 818 | ||
819 | 819 | ||
820 | llwarns << "glMapBuffer returned NULL (no vertex data)" << llendl; | 820 | llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl; |
821 | } | 821 | } |
822 | 822 | ||
823 | if (!mMappedIndexData) | 823 | if (!mMappedIndexData) |
@@ -826,10 +826,10 @@ U8* LLVertexBuffer::mapBuffer(S32 access) | |||
826 | glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); | 826 | glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); |
827 | if (buff != mGLIndices) | 827 | if (buff != mGLIndices) |
828 | { | 828 | { |
829 | llwarns << "Invalid GL index buffer bound: " << buff << llendl; | 829 | llerrs << "Invalid GL index buffer bound: " << buff << llendl; |
830 | } | 830 | } |
831 | 831 | ||
832 | llwarns << "glMapBuffer returned NULL (no index data)" << llendl; | 832 | llerrs << "glMapBuffer returned NULL (no index data)" << llendl; |
833 | } | 833 | } |
834 | 834 | ||
835 | sMappedCount++; | 835 | sMappedCount++; |
@@ -908,7 +908,7 @@ template <class T,S32 type> struct VertexBufferStrider | |||
908 | } | 908 | } |
909 | else | 909 | else |
910 | { | 910 | { |
911 | llwarns << "VertexBufferStrider could not find valid vertex data." << llendl; | 911 | llerrs << "VertexBufferStrider could not find valid vertex data." << llendl; |
912 | } | 912 | } |
913 | return FALSE; | 913 | return FALSE; |
914 | } | 914 | } |
@@ -965,7 +965,7 @@ void LLVertexBuffer::setStride(S32 type, S32 new_stride) | |||
965 | LLMemType mt(LLMemType::MTYPE_VERTEX_DATA); | 965 | LLMemType mt(LLMemType::MTYPE_VERTEX_DATA); |
966 | if (mNumVerts) | 966 | if (mNumVerts) |
967 | { | 967 | { |
968 | llwarns << "LLVertexBuffer::setOffset called with mNumVerts = " << mNumVerts << llendl; | 968 | llerrs << "LLVertexBuffer::setOffset called with mNumVerts = " << mNumVerts << llendl; |
969 | } | 969 | } |
970 | // This code assumes that setStride() will only be called once per VBO per type. | 970 | // This code assumes that setStride() will only be called once per VBO per type. |
971 | S32 delta = new_stride - sTypeOffsets[type]; | 971 | S32 delta = new_stride - sTypeOffsets[type]; |
@@ -1020,15 +1020,15 @@ void LLVertexBuffer::setBuffer(U32 data_mask) | |||
1020 | { | 1020 | { |
1021 | GLint buff; | 1021 | GLint buff; |
1022 | glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); | 1022 | glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); |
1023 | if ((GLuint)buff != mGLBuffer) | 1023 | if (buff != mGLBuffer) |
1024 | { | 1024 | { |
1025 | llwarns << "Invalid GL vertex buffer bound: " << buff << llendl; | 1025 | llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; |
1026 | } | 1026 | } |
1027 | 1027 | ||
1028 | glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); | 1028 | glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); |
1029 | if ((GLuint)buff != mGLIndices) | 1029 | if (buff != mGLIndices) |
1030 | { | 1030 | { |
1031 | llwarns << "Invalid GL index buffer bound: " << buff << llendl; | 1031 | llerrs << "Invalid GL index buffer bound: " << buff << llendl; |
1032 | } | 1032 | } |
1033 | } | 1033 | } |
1034 | 1034 | ||
@@ -1038,15 +1038,15 @@ void LLVertexBuffer::setBuffer(U32 data_mask) | |||
1038 | { | 1038 | { |
1039 | GLint buff; | 1039 | GLint buff; |
1040 | glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); | 1040 | glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); |
1041 | if ((GLuint)buff != mGLBuffer) | 1041 | if (buff != mGLBuffer) |
1042 | { | 1042 | { |
1043 | llwarns << "Invalid GL vertex buffer bound: " << buff << llendl; | 1043 | llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; |
1044 | } | 1044 | } |
1045 | 1045 | ||
1046 | glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); | 1046 | glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); |
1047 | if ((GLuint)buff != mGLIndices) | 1047 | if (buff != mGLIndices) |
1048 | { | 1048 | { |
1049 | llwarns << "Invalid GL index buffer bound: " << buff << llendl; | 1049 | llerrs << "Invalid GL index buffer bound: " << buff << llendl; |
1050 | } | 1050 | } |
1051 | } | 1051 | } |
1052 | 1052 | ||
@@ -1068,7 +1068,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) | |||
1068 | 1068 | ||
1069 | if (data_mask != 0) | 1069 | if (data_mask != 0) |
1070 | { | 1070 | { |
1071 | llwarns << "Buffer set for rendering before being filled after resize." << llendl; | 1071 | llerrs << "Buffer set for rendering before being filled after resize." << llendl; |
1072 | } | 1072 | } |
1073 | } | 1073 | } |
1074 | 1074 | ||
@@ -1129,7 +1129,7 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask) const | |||
1129 | 1129 | ||
1130 | if ((data_mask & mTypeMask) != data_mask) | 1130 | if ((data_mask & mTypeMask) != data_mask) |
1131 | { | 1131 | { |
1132 | llwarns << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl; | 1132 | llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl; |
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | if (data_mask & MAP_NORMAL) | 1135 | if (data_mask & MAP_NORMAL) |