<div dir="ltr"><div>Thanks, Neil.<br><br>Yeah, I had the same thoughts regarding whether it is a valid offset.  The trace does render correctly on Nvidia proprietary driver, but renders even worse on Intel Windows driver (blank white screen after the bubbles pass).  I believe it used to render correctly on Windows, but maybe the driver has marched on.<br><br>Since the i965 driver is capable of handling the offset with software fallbacks (which it used to before the internal format change), seems reasonable to continue supporting it.<br><br></div>-C<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 23, 2014 at 6:54 AM, Neil Roberts <span dir="ltr"><<a href="mailto:neil@linux.intel.com" target="_blank">neil@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just noticed this wording in the GL spec regarding buffer objects:<br>
<br>
“Clients must align data elements consistent with the requirements of<br>
the client platform, with an additional base-level requirement that an<br>
offset within a buffer to a datum comprising N basic machine units be a<br>
multiple of N.”<br>
<br>
I wonder if that means putting pixels in a buffer that are not naturally<br>
aligned to the bpp is not valid. It's not really clear though because<br>
potentially you could say that the size of the datum of the pixel data<br>
is 1 because the type parameter in glTexImage2D is GL_UNSIGNED_BYTE.<br>
However if you were to upload the data as GL_UNSIGNED_INT_8_8_8_8_REV<br>
then it would be a different story.<br>
<br>
I guess either way though the patch doesn't do any harm though and it's<br>
good if it fixes a real-world use case.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Neil<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
Neil Roberts <<a href="mailto:neil@linux.intel.com">neil@linux.intel.com</a>> writes:<br>
<br>
> This patch looks good to me.<br>
><br>
> The wording in the bspec seems a little vague so I was wondering if<br>
> maybe the real restriction is that the offset must be 4-byte aligned<br>
> rather than being aligned to the bpp. However I tried it with a 16-bit<br>
> type and sure enough it works to have an offset aligned to two bytes.<br>
><br>
> Reviewed-by: Neil Roberts <<a href="mailto:neil@linux.intel.com">neil@linux.intel.com</a>><br>
><br>
> - Neil<br>
><br>
> Cody Northrop <<a href="mailto:cody@lunarg.com">cody@lunarg.com</a>> writes:<br>
><br>
>> The blitter will start at a pixel's natural alignment. For PBOs, if the<br>
>> provided offset if not aligned, bits will get dropped.<br>
>><br>
>> This change adds offset alignment check for src and dst, kicking back if<br>
>> the requirements are not met.<br>
>><br>
>> The change is based on following verbiage from BSPEC:<br>
>>  Color pixel sizes supported are 8, 16, and 32 bits per pixel (bpp).<br>
>>  All pixels are naturally aligned.<br>
>><br>
>> Found in the following locations:<br>
>> page 35 of intel-gfx-prm-osrc-hsw-blitter.pdf<br>
>> page 29 of ivb_ihd_os_vol1_part4.pdf<br>
>> page 29 of snb_ihd_os_vol1_part5.pdf<br>
>><br>
>> This behavior was observed with Steam Big Picture rendering incorrect<br>
>> icon colors.  The fix has been tested on Ubuntu and SteamOS on Haswell.<br>
>><br>
>> Signed-off-by: Cody Northrop <<a href="mailto:cody@lunarg.com">cody@lunarg.com</a>><br>
>> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=83908" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=83908</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div><font color="#999999"><font face="trebuchet ms, sans-serif"> Cody Northrop<br> Graphics Software Engineer<br> LunarG, Inc.- 3D Driver Innovations</font><font face="trebuchet ms, sans-serif" style="font-size:small"><br> Email: <a href="mailto:cody@lunarg.com" target="_blank">cody@lunarg.com</a><br> Website: <a href="http://www.lunarg.com/" target="_blank">http://www.lunarg.com</a></font></font></div></div>
</div>