summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_state.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-12-20 14:45:59 +0800
committerChia-I Wu <[email protected]>2014-01-08 18:11:34 +0800
commit011fde4bf2b4337cb07ddc1af8b4398fef9b3648 (patch)
treeea0a06252ab814934fb9bddd93d939f1b3165cdc /src/gallium/drivers/ilo/ilo_state.c
parent0a2a221d019651c98dabe6773e56118ae0009f8d (diff)
ilo: offset to layers only when necessary
GEN6 has several requirements regarding the LOD/Depth/Width/Height of the render targets and the depth buffer. We used to offset to the layers in question unconditionally to meet the requirements. With this commit, offseting is done only when the requirements are not met.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_state.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c
index 4953e52ec68..f9aa76d5382 100644
--- a/src/gallium/drivers/ilo/ilo_state.c
+++ b/src/gallium/drivers/ilo/ilo_state.c
@@ -25,7 +25,6 @@
* Chia-I Wu <[email protected]>
*/
-#include "util/u_framebuffer.h"
#include "util/u_helpers.h"
#include "util/u_upload_mgr.h"
@@ -645,17 +644,7 @@ ilo_set_framebuffer_state(struct pipe_context *pipe,
{
struct ilo_context *ilo = ilo_context(pipe);
- util_copy_framebuffer_state(&ilo->fb.state, state);
-
- if (state->nr_cbufs)
- ilo->fb.num_samples = state->cbufs[0]->texture->nr_samples;
- else if (state->zsbuf)
- ilo->fb.num_samples = state->zsbuf->texture->nr_samples;
- else
- ilo->fb.num_samples = 1;
-
- if (!ilo->fb.num_samples)
- ilo->fb.num_samples = 1;
+ ilo_gpe_init_fb(ilo->dev, state, &ilo->fb);
ilo->dirty |= ILO_DIRTY_FB;
}
@@ -943,7 +932,7 @@ ilo_create_sampler_view(struct pipe_context *pipe,
templ->u.tex.last_level - templ->u.tex.first_level + 1,
templ->u.tex.first_layer,
templ->u.tex.last_layer - templ->u.tex.first_layer + 1,
- false, true, &view->surface);
+ false, false, &view->surface);
}
return &view->base;
@@ -991,7 +980,7 @@ ilo_create_surface(struct pipe_context *pipe,
templ->format, templ->u.tex.level, 1,
templ->u.tex.first_layer,
templ->u.tex.last_layer - templ->u.tex.first_layer + 1,
- true, true, &surf->u.rt);
+ true, false, &surf->u.rt);
}
else {
assert(res->target != PIPE_BUFFER);
@@ -1000,7 +989,7 @@ ilo_create_surface(struct pipe_context *pipe,
templ->format, templ->u.tex.level,
templ->u.tex.first_layer,
templ->u.tex.last_layer - templ->u.tex.first_layer + 1,
- true, &surf->u.zs);
+ false, &surf->u.zs);
}
return &surf->base;