iris: consider framebuffer parameter for aux usages
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user