diff --git a/.pick_status.json b/.pick_status.json index ad623607105..ce141f67ecf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -202,7 +202,7 @@ "description": "st/mesa: Fix signed integer overflow when using util_throttle_memory_usage", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "21ca322e637291b89a445159fc45b8dbf638e6c9" }, diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index ff0f1a2efa6..7d8f0c54bbf 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1511,7 +1511,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims, } util_throttle_memory_usage(pipe, &st->throttle, - width * height * depth * + (uint64_t) width * height * depth * util_format_get_blocksize(dst->format)); u_box_3d(xoffset, yoffset, zoffset + dstz, width, height, depth, &box); @@ -1620,7 +1620,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims, } util_throttle_memory_usage(pipe, &st->throttle, - width * height * depth * + (uint64_t) width * height * depth * util_format_get_blocksize(src_templ.format)); throttled = true; @@ -1716,7 +1716,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims, fallback: if (!throttled) { util_throttle_memory_usage(pipe, &st->throttle, - width * height * depth * + (uint64_t) width * height * depth * _mesa_get_format_bytes(texImage->TexFormat)); } _mesa_store_texsubimage(ctx, dims, texImage, xoffset, yoffset, zoffset,