diff options
author | Topi Pohjolainen <[email protected]> | 2016-06-10 18:18:57 +0300 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2016-11-23 11:06:53 +0200 |
commit | a2d029dc5ffdaf249a7ebfe71b814e8c2495d5f1 (patch) | |
tree | 358c23e91e7b26acbd72ca9e1e6381b1606164cc /src/mesa/drivers/dri/i965/intel_resolve_map.c | |
parent | 7c75fd9a5971d59e215ab2f04b4c06c3399d0211 (diff) |
i965: Add multi-slice getter for resolve maps
This is useful when checking if any slice is in unresolved state.
Signed-off-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_resolve_map.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_resolve_map.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_resolve_map.c b/src/mesa/drivers/dri/i965/intel_resolve_map.c index 26eac8bc65e..56fd9547788 100644 --- a/src/mesa/drivers/dri/i965/intel_resolve_map.c +++ b/src/mesa/drivers/dri/i965/intel_resolve_map.c @@ -57,13 +57,16 @@ intel_resolve_map_set(struct exec_list *resolve_map, * \brief Get an element from the map. * \return null if element is not contained in map. */ -struct intel_resolve_map * -intel_resolve_map_get(struct exec_list *resolve_map, - uint32_t level, - uint32_t layer) +const struct intel_resolve_map * +intel_resolve_map_find_any(const struct exec_list *resolve_map, + uint32_t start_level, uint32_t num_levels, + uint32_t start_layer, uint32_t num_layers) { foreach_list_typed(struct intel_resolve_map, map, link, resolve_map) { - if (map->level == level && map->layer == layer) + if (map->level >= start_level && + map->level < (start_level + num_levels) && + map->layer >= start_layer && + map->layer < (start_layer + num_layers)) return map; } |