summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-06-30 22:52:23 -0400
committerRob Clark <[email protected]>2016-07-02 08:58:50 -0400
commit1759eb1d197e9794cd43ef86261372da719f4f2b (patch)
tree866e37f8c225fb7623927ae685477b9ce7410c94 /src/gallium/drivers
parentda39ac9c5126825418c979989ea7e017554a0aaa (diff)
freedreno: update valid_buffer_range for SO buffers
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_state.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c
index 53ea39b3d29..252d153e341 100644
--- a/src/gallium/drivers/freedreno/freedreno_state.c
+++ b/src/gallium/drivers/freedreno/freedreno_state.c
@@ -316,6 +316,7 @@ fd_create_stream_output_target(struct pipe_context *pctx,
unsigned buffer_size)
{
struct pipe_stream_output_target *target;
+ struct fd_resource *rsc = fd_resource(prsc);
target = CALLOC_STRUCT(pipe_stream_output_target);
if (!target)
@@ -328,6 +329,10 @@ fd_create_stream_output_target(struct pipe_context *pctx,
target->buffer_offset = buffer_offset;
target->buffer_size = buffer_size;
+ assert(rsc->base.b.target == PIPE_BUFFER);
+ util_range_add(&rsc->valid_buffer_range,
+ buffer_offset, buffer_offset + buffer_size);
+
return target;
}