diff options
author | Mathias Fröhlich <[email protected]> | 2019-04-20 07:39:56 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-10 14:28:37 +0000 |
commit | de579ffba2e4968cf9aca046369c3cbb6684a1e2 (patch) | |
tree | 693bd69343dbc823b5df29d6e3720001d364ba69 | |
parent | b684030c3a656ffdbc93581856034e0982db46fd (diff) |
i965: Test original vertex array pointer to skip array upload.
Rather than do a NULL pointer check on a pointer that may be offset by the
min-max index range of an GL draw operation, execute the NULL test on the
original vertex array pointer.
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Mathias Fröhlich <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw_upload.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 221713ebd73..ee581fc9696 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -418,7 +418,7 @@ copy_array_to_vbo_array(struct brw_context *brw, * * In this case, let's the dst with undefined values */ - if (src != NULL) { + if (ptr != NULL) { if (dst_stride == src_stride) { memcpy(dst, src, size); } else { |