summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/rbug/rbug_texture.c4
-rw-r--r--src/gallium/auxiliary/rbug/rbug_texture.h4
-rw-r--r--src/gallium/auxiliary/vl/vl_video_buffer.c6
-rw-r--r--src/gallium/drivers/rbug/rbug_core.c2
-rw-r--r--src/gallium/include/pipe/p_state.h12
5 files changed, 15 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/rbug/rbug_texture.c b/src/gallium/auxiliary/rbug/rbug_texture.c
index ca051473504..3ee5e142b76 100644
--- a/src/gallium/auxiliary/rbug/rbug_texture.c
+++ b/src/gallium/auxiliary/rbug/rbug_texture.c
@@ -283,9 +283,9 @@ int rbug_send_texture_info_reply(struct rbug_connection *__con,
uint32_t format,
uint32_t *width,
uint32_t width_len,
- uint32_t *height,
+ uint16_t *height,
uint32_t height_len,
- uint32_t *depth,
+ uint16_t *depth,
uint32_t depth_len,
uint32_t blockw,
uint32_t blockh,
diff --git a/src/gallium/auxiliary/rbug/rbug_texture.h b/src/gallium/auxiliary/rbug/rbug_texture.h
index 59c914053ad..269e5961148 100644
--- a/src/gallium/auxiliary/rbug/rbug_texture.h
+++ b/src/gallium/auxiliary/rbug/rbug_texture.h
@@ -166,9 +166,9 @@ int rbug_send_texture_info_reply(struct rbug_connection *__con,
uint32_t format,
uint32_t *width,
uint32_t width_len,
- uint32_t *height,
+ uint16_t *height,
uint32_t height_len,
- uint32_t *depth,
+ uint16_t *depth,
uint32_t depth_len,
uint32_t blockw,
uint32_t blockh,
diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c
index f6b3cb5e9f9..3b97ac81af9 100644
--- a/src/gallium/auxiliary/vl/vl_video_buffer.c
+++ b/src/gallium/auxiliary/vl/vl_video_buffer.c
@@ -248,6 +248,8 @@ vl_video_buffer_template(struct pipe_resource *templ,
unsigned depth, unsigned array_size,
unsigned usage, unsigned plane)
{
+ unsigned height = tmpl->height;
+
memset(templ, 0, sizeof(*templ));
if (depth > 1)
templ->target = PIPE_TEXTURE_3D;
@@ -257,14 +259,14 @@ vl_video_buffer_template(struct pipe_resource *templ,
templ->target = PIPE_TEXTURE_2D;
templ->format = resource_format;
templ->width0 = tmpl->width;
- templ->height0 = tmpl->height;
templ->depth0 = depth;
templ->array_size = array_size;
templ->bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET | tmpl->bind;
templ->usage = usage;
- vl_video_buffer_adjust_size(&templ->width0, &templ->height0, plane,
+ vl_video_buffer_adjust_size(&templ->width0, &height, plane,
tmpl->chroma_format, false);
+ templ->height0 = height;
}
static void
diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c
index 64c2d63a789..82bcef8d03b 100644
--- a/src/gallium/drivers/rbug/rbug_core.c
+++ b/src/gallium/drivers/rbug/rbug_core.c
@@ -205,7 +205,7 @@ rbug_texture_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
struct rbug_proto_texture_info *gpti = (struct rbug_proto_texture_info *)header;
struct rbug_list *ptr;
struct pipe_resource *t;
- unsigned num_layers;
+ uint16_t num_layers;
mtx_lock(&rb_screen->list_mutex);
foreach(ptr, &rb_screen->resources) {
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index dc2b329f7a2..79c76484513 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -497,14 +497,14 @@ struct pipe_resource
{
struct pipe_reference reference;
struct pipe_screen *screen; /**< screen that this texture belongs to */
- enum pipe_texture_target target; /**< PIPE_TEXTURE_x */
- enum pipe_format format; /**< PIPE_FORMAT_x */
- unsigned width0;
- unsigned height0;
- unsigned depth0;
- unsigned array_size;
+ unsigned width0; /**< Used by both buffers and textures. */
+ uint16_t height0; /* Textures: The maximum height/depth/array_size is 16k. */
+ uint16_t depth0;
+ uint16_t array_size;
+ enum pipe_format format:16; /**< PIPE_FORMAT_x */
+ enum pipe_texture_target target:8; /**< PIPE_TEXTURE_x */
unsigned last_level:8; /**< Index of last mipmap level present/defined */
unsigned nr_samples:8; /**< for multisampled surfaces, nr of samples */
unsigned usage:8; /**< PIPE_USAGE_x (not a bitmask) */