On 05/04/17 16:41, gregory hainaut wrote:
On Wed, 5 Apr 2017 09:09:45 +1000
Timothy Arceri <tarc...@itsqueeze.com> wrote:
On 05/04/17 02:29, Gregory Hainaut wrote:
Context:
Nouveau uses NULL strings for unnamed parameter of texture gather
offsets opcode.
Fix piglit crashes of the 'texturegatheroffsets' tests on Nouveau
v2: based on Nicolai feedback
Hi Gregory,
Nicolai suggested you change the caller of create a new helper function
for the case where string can be NULL. e.g blob_write_optional_string()
The change below causes an extra read/write which is not required for
ever other use of this function. Please create the additional function
as a wrapper around blob_write_string()
Thanks,
Tim
Hello Timothy,
I will change it.
However what do you want to do if blob_write_string is called
with a null pointer ? Do you prefer
* Crash
* Assert
* Report an internal error message
I'm leading toward the latter but I'm afraid it might either corrupt
the cache (if we skip the string write or use an empty string). Well we
could just report an error before the crash too.
Feel free to add an assert. It shouldn't happen unless we have a bug.
If we do have a bug the corrupt cache item will be ignored after any
newer builds of Mesa that include a fix.
Best regards,
Gregory
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev