aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-02-28 01:13:33 -0800
committerKenneth Graunke <[email protected]>2019-03-07 11:39:27 -0800
commit4787bc944a2d219dd04201eef699d9f999b479b8 (patch)
tree082f124a94a40b269150e8b2e5c42ef91f393d41 /src/gallium
parent575f8e8b60ab06e559a62ffe90913453352f32b4 (diff)
isl: Add a swizzle parameter to isl_buffer_fill_state()
This is necessary for legacy texture buffer object formats, where we'll need to use a swizzle to fake e.g. luminance. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index ec39225716c..592b2c48ade 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -1560,6 +1560,7 @@ fill_buffer_surface_state(struct isl_device *isl_dev,
.address = bo->gtt_offset + offset,
.size_B = final_size,
.format = format,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = cpp,
.mocs = mocs(bo));
}
@@ -2352,6 +2353,7 @@ upload_ubo_surf_state(struct iris_context *ice,
.size_B = MIN2(buffer_size,
res->bo->size - cbuf->data.offset),
.format = ISL_FORMAT_R32G32B32A32_FLOAT,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = 1,
.mocs = mocs(res->bo))
}
@@ -2509,6 +2511,7 @@ iris_set_shader_buffers(struct pipe_context *ctx,
MIN2(buffer->buffer_size,
res->bo->size - buffer->buffer_offset),
.format = ISL_FORMAT_RAW,
+ .swizzle = ISL_SWIZZLE_IDENTITY,
.stride_B = 1,
.mocs = mocs(res->bo));
} else {