summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/blob.c
Commit message (Collapse)AuthorAgeFilesLines
* glsl: fix bounds check in blob_overwrite_bytesRob Herring2017-06-071-1/+1
| | | | | | | | | | | | | | | | | clang gives a warning in blob_overwrite_bytes because offset type is size_t which is unsigned: src/compiler/glsl/blob.c:110:15: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (offset < 0 || blob->size - offset < to_write) ~~~~~~ ^ ~ Remove the less than 0 check to fix this. Additionally, if offset is greater than blob->size, the 2nd check would be false due to unsigned math. Rewrite the check to avoid subtraction. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* glsl: don't use ralloc for blob creationTimothy Arceri2017-03-131-6/+3
| | | | | | There is no need to use ralloc here. Reviewed-by: Marek Olšák <[email protected]>
* glsl/blob: clear padding bytesGrazvydas Ignotas2017-03-091-3/+6
| | | | | | | | | | Since blob is intended for serializing data, it's not a good idea to leave padding holes with uninitialized data, which may leak heap contents and hurt compression if the blob is later compressed, like done by shader cache. Clear it. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: move to compiler/Emil Velikov2016-01-261-0/+323
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>