summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/rbug
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:49:53 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:49:53 +0000
commitd264279e28002d81821c883795911844a4c01a2c (patch)
treeb0481616eda55b543a0dc1487d096c3239885c41 /lib/mesa/src/gallium/auxiliary/rbug
parentfdcc03929065b5bf5dd93553db219ea3e05c8c34 (diff)
Merge Mesa 19.2.8
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/rbug')
-rw-r--r--lib/mesa/src/gallium/auxiliary/rbug/rbug_texture.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/rbug/rbug_texture.c b/lib/mesa/src/gallium/auxiliary/rbug/rbug_texture.c
index 3ee5e142b..b0d8c60d4 100644
--- a/lib/mesa/src/gallium/auxiliary/rbug/rbug_texture.c
+++ b/lib/mesa/src/gallium/auxiliary/rbug/rbug_texture.c
@@ -34,6 +34,8 @@
* Functions ending with _reply are replies to requests.
*/
+#include "c99_alloca.h"
+
#include "rbug_internal.h"
#include "rbug_texture.h"
@@ -283,9 +285,9 @@ int rbug_send_texture_info_reply(struct rbug_connection *__con,
uint32_t format,
uint32_t *width,
uint32_t width_len,
- uint16_t *height,
+ uint16_t *h16,
uint32_t height_len,
- uint16_t *depth,
+ uint16_t *d16,
uint32_t depth_len,
uint32_t blockw,
uint32_t blockh,
@@ -299,6 +301,8 @@ int rbug_send_texture_info_reply(struct rbug_connection *__con,
uint32_t __pos = 0;
uint8_t *__data = NULL;
int __ret = 0;
+ uint32_t *height = alloca(sizeof(uint32_t) * height_len);
+ uint32_t *depth = alloca(sizeof(uint32_t) * height_len);
LEN(8); /* header */
LEN(4); /* serial */
@@ -321,6 +325,11 @@ int rbug_send_texture_info_reply(struct rbug_connection *__con,
if (!__data)
return -ENOMEM;
+ for (int i = 0; i < height_len; i++)
+ height[i] = h16[i];
+ for (int i = 0; i < depth_len; i++)
+ depth[i] = d16[i];
+
WRITE(4, int32_t, ((int32_t)RBUG_OP_TEXTURE_INFO_REPLY));
WRITE(4, uint32_t, ((uint32_t)(__len / 4)));
WRITE(4, uint32_t, serial); /* serial */