[Bug 89597] Implement SSBOs in GLSL front-end and i965

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 23 00:03:59 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=89597

--- Comment #30 from Samuel Iglesias <siglesias at igalia.com> ---
I have been working on the .length() calculation of unsized arrays in SSBOs. As
it was said in comment 2, the size of the allocated buffer by the GPU can be
queried by resinfo message. I have that code working fine with that approach
but recently I discovered an inconsistency:

Intel driver is allocating internally buffers of multiples of 4k (see buffer
object returned by intel_bufferobj_buffer() in brw_upload_ubo_surfaces()), so
if the user wants a buffer of size 32 bytes, it would allocate a buffer of 4096
bytes. Then, the emitted resinfo message returns 4096.

However if the application executes glGetBufferParameteriv(GL_BUFFER_SIZE) it
will return 32 bytes and I suppose this is the buffer size value that should be
used for unsized array's length calculations.

How can I fix this inconsistency?

Should I modify intel_bufferobj_buffer() to return a buffer object of the same
size it was asked for and not round it up to multiples of 4k? Is there a good
reason for that behavior?

What do you think?

-- 
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/20150423/45f64042/attachment.html>


More information about the intel-3d-bugs mailing list