[Mesa-dev] [PATCH 00/21] Gallium: making user vertex buffers optional and other goodness

Marek Olšák maraeo at gmail.com
Sat Apr 14 04:45:55 PDT 2012


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
>> is_format_supported(PIPE_BIND_VERTEX_BUFFER):
>> - 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.

Marek


More information about the mesa-dev mailing list