[Bug 90734] glBufferSubData doesn't update the buffer
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu May 28 20:42:17 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=90734
Bug ID: 90734
Summary: glBufferSubData doesn't update the buffer
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/i965
Assignee: idr at freedesktop.org
Reporter: kaillasse91 at hotmail.fr
QA Contact: intel-3d-bugs at lists.freedesktop.org
The behaviour of my application is very different with mesa and a Sandy bridge
HD2000 gpu.
Using INTEL_DEBUG=perf I see a lot of
'Using a blit copy to avoid stalling on glBufferSubData(6336, 6408) (0kb) to a
busy (0-72000) buffer object.'
with whatever the range I was updating is.
Getting the buffer back with glGetBufferSubData shows that the buffer is
sometimes not/impartially (?) updated.
Updating the whole buffer or forcing a sync with glFinish corrects the errors.
For info. :
void ShapeCollectionGl::updateBufferRange(int startIdx, int endIdx)
{
glBindVertexArray(vao_);
glBindBuffer(GL_ARRAY_BUFFER, vbo_);
int offPos = shapesGl_[startIdx].offPos;
int sizeData = shapesGl_[endIdx].offPos + shapesGl_[endIdx].pos.size() -
offPos;
// glFinish() here solves the problem
glBufferSubData(GL_ARRAY_BUFFER,
offPos * sizeof(VertexData),
sizeData * sizeof(VertexData),
&bufData_[offPos]);
// reading the buffer back here with glGetBufferSubData shows the
difference
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo_);
int offIdx = shapesGl_[startIdx].offIdx;
int sizeIdx = shapesGl_[endIdx].offIdx + shapesGl_[endIdx].idx.size() -
offIdx;
glBufferSubData(GL_ELEMENT_ARRAY_BUFFER,
offIdx * sizeof(GLuint),
sizeIdx * sizeof(GLuint),
&bufIdx_[offIdx]);
glBindVertexArray(0);
}
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core
Processor Family Integrated Graphics Controller [8086:0102] (rev 09) (prog-if
00 [VGA controller])
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.7.0-devel
(git-10aacf5 2015-05-28 trusty-oibaf-ppa)
Linux 4.0.4-040004-generic #201505171336 SMP Sun May 17 17:37:22 UTC 2015
x86_64 x86_64 x86_64 GNU/Linux
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150529/ca351318/attachment.html>
More information about the intel-3d-bugs
mailing list