[Mesa-dev] [PATCH 00/21] Gallium: making user vertex buffers optional and other goodness
e0425955 at student.tuwien.ac.at
Sat Apr 14 07:47:37 PDT 2012
On 04/14/2012 01:45 PM, Marek Olšák wrote:
> On Sat, Apr 14, 2012 at 10:03 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
>> Hi Marek,
>> ----- Original Message -----
>>> Hi everyone,
>>> This series adds these optional features to st/mesa:
>>> - uploading user vertex buffers
>>> - translating unsupported vertex formats into floats
>>> - vertex data with unaligned buffer_offset, src_offset, or stride is
>>> transformed such that it's aligned
>>> These vertex formats are automatically translated into float if the
>>> driver doesn't expose them through
>>> - PIPE_FORMAT_*16_FLOAT
>>> - PIPE_FORMAT_*64_FLOAT
>>> - PIPE_FORMAT_*32_FIXED
>>> - PIPE_FORMAT_*32_UNORM
>>> - PIPE_FORMAT_*32_SNORM
>>> - PIPE_FORMAT_*32_USCALED
>>> - PIPE_FORMAT_*32_SSCALED
>>> This series doesn't deal with uploads of:
>>> - user index buffers
>>> - user constant buffers
>>> It's all done by moving the u_vbuf module out of the radeon drivers
>>> and into the Mesa state tracker. u_vbuf is installed into
>>> cso_context, where it overrides a few functions. The installation is
>>> done only when the driver doesn't support a certain feature (a
>>> vertex format or user buffers or has buffer alignment restrictions).
>>> That's pretty much it.
>> I've looked at the series a bit more closely, and it looks great to me.
>>> There are new CAPs for vertex buffer alignment and, of course, user
>>> vertex buffers. I had to add "uint8_t *user_ptr" into pipe_resource,
>>> so that I could access the user buffer pointer in the state tracker.
>> The new CAPS talk about DWORD alignment only. What about the alignment of doubles? Does GL or any hardware allow non-aligned doubles?
> To my knowledge, no hardware driver implements doubles yet. This may
> be revisited in the future. As far as GL is concerned, my recollection
> is that it allows pretty much anything.
All current hardware (that I know of) fetches doubles as "raw" data
using 2 attribute slots for vec3, vec4.
Btw. I find "DWORD" too imprecise as well.
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
More information about the mesa-dev