mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
i965/state: Use ISL for emitting image surfaces
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
parent
7a21d1bfc3
commit
5a8c89038a
1 changed files with 22 additions and 11 deletions
|
|
@ -1402,22 +1402,33 @@ update_image_surface(struct brw_context *brw,
|
||||||
access != GL_READ_ONLY);
|
access != GL_READ_ONLY);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const unsigned min_layer = obj->MinLayer + u->_Layer;
|
|
||||||
const unsigned min_level = obj->MinLevel + u->Level;
|
|
||||||
const unsigned num_layers = (!u->Layered ? 1 :
|
const unsigned num_layers = (!u->Layered ? 1 :
|
||||||
obj->Target == GL_TEXTURE_CUBE_MAP ? 6 :
|
obj->Target == GL_TEXTURE_CUBE_MAP ? 6 :
|
||||||
mt->logical_depth0);
|
mt->logical_depth0);
|
||||||
const GLenum target = (obj->Target == GL_TEXTURE_CUBE_MAP ||
|
|
||||||
obj->Target == GL_TEXTURE_CUBE_MAP_ARRAY ?
|
struct isl_view view = {
|
||||||
GL_TEXTURE_2D_ARRAY : obj->Target);
|
.format = format,
|
||||||
|
.base_level = obj->MinLevel + u->Level,
|
||||||
|
.levels = 1,
|
||||||
|
.base_array_layer = obj->MinLayer + u->_Layer,
|
||||||
|
.array_len = num_layers,
|
||||||
|
.channel_select = {
|
||||||
|
ISL_CHANNEL_SELECT_RED,
|
||||||
|
ISL_CHANNEL_SELECT_GREEN,
|
||||||
|
ISL_CHANNEL_SELECT_BLUE,
|
||||||
|
ISL_CHANNEL_SELECT_ALPHA,
|
||||||
|
},
|
||||||
|
.usage = ISL_SURF_USAGE_STORAGE_BIT,
|
||||||
|
};
|
||||||
|
|
||||||
const int surf_index = surf_offset - &brw->wm.base.surf_offset[0];
|
const int surf_index = surf_offset - &brw->wm.base.surf_offset[0];
|
||||||
|
|
||||||
brw->vtbl.emit_texture_surface_state(
|
brw_emit_surface_state(brw, mt, &view,
|
||||||
brw, mt, target,
|
surface_state_infos[brw->gen].rb_mocs, false,
|
||||||
min_layer, min_layer + num_layers,
|
surf_offset, surf_index,
|
||||||
min_level, min_level + 1,
|
I915_GEM_DOMAIN_SAMPLER,
|
||||||
format, SWIZZLE_XYZW,
|
access == GL_READ_ONLY ? 0 :
|
||||||
surf_offset, surf_index, access != GL_READ_ONLY, false);
|
I915_GEM_DOMAIN_SAMPLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
update_texture_image_param(brw, u, surface_idx, param);
|
update_texture_image_param(brw, u, surface_idx, param);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue