summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-02-02 15:17:57 +1000
committerDave Airlie <[email protected]>2018-02-07 06:08:11 +1000
commit012100b80936325945f24a580f643e535028fe19 (patch)
treeda8156ce303a4f6346a628344d6b5b93c4e09db8 /src/gallium/drivers/r600
parente7e81f362d6dc4fe3a272cdd07724a26391e8f5e (diff)
r600/eg: use texture target to pick array size not view target (v2)
This fixes a few CTS cases in : KHR-GL45.texture_view.view_sampling some multisample cases are still broken, but not sure this is the same problem. v2: fix more cases Cc: <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 63a39a23f8f..90f05c06d3f 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -811,18 +811,21 @@ static int evergreen_fill_tex_resource_words(struct r600_context *rctx,
}
nbanks = eg_num_banks(rscreen->b.info.r600_num_banks);
- if (params->target == PIPE_TEXTURE_1D_ARRAY) {
- height = 1;
- depth = texture->array_size;
- } else if (params->target == PIPE_TEXTURE_2D_ARRAY) {
- depth = texture->array_size;
- } else if (params->target == PIPE_TEXTURE_CUBE_ARRAY)
- depth = texture->array_size / 6;
va = tmp->resource.gpu_address;
/* array type views and views into array types need to use layer offset */
dim = r600_tex_dim(tmp, params->target, texture->nr_samples);
+
+ if (dim == V_030000_SQ_TEX_DIM_1D_ARRAY) {
+ height = 1;
+ depth = texture->array_size;
+ } else if (dim == V_030000_SQ_TEX_DIM_2D_ARRAY ||
+ dim == V_030000_SQ_TEX_DIM_2D_ARRAY_MSAA) {
+ depth = texture->array_size;
+ } else if (dim == V_030000_SQ_TEX_DIM_CUBEMAP)
+ depth = texture->array_size / 6;
+
tex_resource_words[0] = (S_030000_DIM(dim) |
S_030000_PITCH((pitch / 8) - 1) |
S_030000_TEX_WIDTH(width - 1));