iris: consider framebuffer parameter for aux usages

This commit is contained in:
Kenneth Graunke
2018-12-09 19:07:13 -08:00
parent b77d2dc71b
commit ecc897b8ad
3 changed files with 13 additions and 9 deletions
+2 -1
View File
@@ -706,7 +706,8 @@ uint64_t iris_timebase_scale(const struct gen_device_info *devinfo,
void iris_predraw_resolve_inputs(struct iris_context *ice,
struct iris_batch *batch,
struct iris_shader_state *shs,
bool *draw_aux_buffer_disabled);
bool *draw_aux_buffer_disabled,
bool consider_framebuffer);
void iris_predraw_resolve_framebuffer(struct iris_context *ice,
struct iris_batch *batch,
bool *draw_aux_buffer_disabled);
+1 -1
View File
@@ -103,7 +103,7 @@ iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
for (gl_shader_stage stage = 0; stage < MESA_SHADER_COMPUTE; stage++) {
if (ice->shaders.prog[stage])
iris_predraw_resolve_inputs(ice,batch, &ice->state.shaders[stage],
draw_aux_buffer_disabled);
draw_aux_buffer_disabled, true);
}
iris_predraw_resolve_framebuffer(ice, batch, draw_aux_buffer_disabled);
+10 -7
View File
@@ -83,7 +83,8 @@ static void
resolve_sampler_views(struct iris_context *ice,
struct iris_batch *batch,
struct iris_shader_state *shs,
bool *draw_aux_buffer_disabled)
bool *draw_aux_buffer_disabled,
bool consider_framebuffer)
{
uint32_t views = shs->bound_sampler_views;
@@ -97,7 +98,7 @@ resolve_sampler_views(struct iris_context *ice,
if (res->base.target == PIPE_BUFFER)
continue;
if (batch->name != IRIS_BATCH_COMPUTE) {
if (consider_framebuffer) {
disable_rb_aux_buffer(ice, draw_aux_buffer_disabled,
res, isv->view.base_level, isv->view.levels,
"for sampling");
@@ -117,7 +118,8 @@ static void
resolve_image_views(struct iris_context *ice,
struct iris_batch *batch,
struct iris_shader_state *shs,
bool *draw_aux_buffer_disabled)
bool *draw_aux_buffer_disabled,
bool consider_framebuffer)
{
uint32_t views = shs->bound_image_views;
@@ -128,7 +130,7 @@ resolve_image_views(struct iris_context *ice,
if (res->base.target == PIPE_BUFFER)
continue;
if (batch->name != IRIS_BATCH_COMPUTE) {
if (consider_framebuffer) {
disable_rb_aux_buffer(ice, draw_aux_buffer_disabled,
res, 0, ~0, "as a shader image");
}
@@ -150,10 +152,11 @@ void
iris_predraw_resolve_inputs(struct iris_context *ice,
struct iris_batch *batch,
struct iris_shader_state *shs,
bool *draw_aux_buffer_disabled)
bool *draw_aux_buffer_disabled,
bool consider_framebuffer)
{
resolve_sampler_views(ice, batch, shs, draw_aux_buffer_disabled);
resolve_image_views(ice, batch, shs, draw_aux_buffer_disabled);
resolve_sampler_views(ice, batch, shs, draw_aux_buffer_disabled, consider_framebuffer);
resolve_image_views(ice, batch, shs, draw_aux_buffer_disabled, consider_framebuffer);
// XXX: ASTC hacks
}