Mesa (master): i965: Test original vertex array pointer to skip array upload.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Mar 10 14:45:23 UTC 2020
Module: Mesa
Branch: master
Commit: de579ffba2e4968cf9aca046369c3cbb6684a1e2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=de579ffba2e4968cf9aca046369c3cbb6684a1e2
Author: Mathias Fröhlich <mathias.froehlich at web.de>
Date: Sat Apr 20 07:39:56 2019 +0200
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 <mattst88 at gmail.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>
---
src/mesa/drivers/dri/i965/brw_draw_upload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 {
More information about the mesa-commit
mailing list