summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-05-21 09:52:46 -0700
committerEric Anholt <[email protected]>2012-05-23 10:18:27 -0700
commit072634da4a6ee5eafb5f5df26ca5f988209e6d40 (patch)
tree4d401a0cb662cbb685b3d96b778078fa647927e4 /src
parent5b226ad603302554f38e6b12a93bd2cf443d4b56 (diff)
i965: Replace intel_need_resolve with the hiz ops it maps to.
Having this enum separate caused us to need a bunch of helper functions to translate to the op to be executed. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c18
-rw-r--r--src/mesa/drivers/dri/intel/intel_resolve_map.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_resolve_map.h18
3 files changed, 21 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 99f42303006..2042afd76ec 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -572,7 +572,7 @@ intel_miptree_alloc_hiz(struct intel_context *intel,
head->level = level;
head->layer = layer;
- head->need = INTEL_NEED_HIZ_RESOLVE;
+ head->need = GEN6_HIZ_OP_HIZ_RESOLVE;
}
}
@@ -590,7 +590,7 @@ intel_miptree_slice_set_needs_hiz_resolve(struct intel_mipmap_tree *mt,
return;
intel_resolve_map_set(&mt->hiz_map,
- level, layer, INTEL_NEED_HIZ_RESOLVE);
+ level, layer, GEN6_HIZ_OP_HIZ_RESOLVE);
}
@@ -605,7 +605,7 @@ intel_miptree_slice_set_needs_depth_resolve(struct intel_mipmap_tree *mt,
return;
intel_resolve_map_set(&mt->hiz_map,
- level, layer, INTEL_NEED_DEPTH_RESOLVE);
+ level, layer, GEN6_HIZ_OP_DEPTH_RESOLVE);
}
typedef void (*resolve_func_t)(struct intel_context *intel,
@@ -618,7 +618,7 @@ intel_miptree_slice_resolve(struct intel_context *intel,
struct intel_mipmap_tree *mt,
uint32_t level,
uint32_t layer,
- enum intel_need_resolve need,
+ enum gen6_hiz_op need,
resolve_func_t func)
{
intel_miptree_check_level_layer(mt, level, layer);
@@ -641,7 +641,7 @@ intel_miptree_slice_resolve_hiz(struct intel_context *intel,
uint32_t layer)
{
return intel_miptree_slice_resolve(intel, mt, level, layer,
- INTEL_NEED_HIZ_RESOLVE,
+ GEN6_HIZ_OP_HIZ_RESOLVE,
intel->vtbl.resolve_hiz_slice);
}
@@ -652,14 +652,14 @@ intel_miptree_slice_resolve_depth(struct intel_context *intel,
uint32_t layer)
{
return intel_miptree_slice_resolve(intel, mt, level, layer,
- INTEL_NEED_DEPTH_RESOLVE,
+ GEN6_HIZ_OP_DEPTH_RESOLVE,
intel->vtbl.resolve_depth_slice);
}
static bool
intel_miptree_all_slices_resolve(struct intel_context *intel,
struct intel_mipmap_tree *mt,
- enum intel_need_resolve need,
+ enum gen6_hiz_op need,
resolve_func_t func)
{
bool did_resolve = false;
@@ -682,7 +682,7 @@ intel_miptree_all_slices_resolve_hiz(struct intel_context *intel,
struct intel_mipmap_tree *mt)
{
return intel_miptree_all_slices_resolve(intel, mt,
- INTEL_NEED_HIZ_RESOLVE,
+ GEN6_HIZ_OP_HIZ_RESOLVE,
intel->vtbl.resolve_hiz_slice);
}
@@ -691,7 +691,7 @@ intel_miptree_all_slices_resolve_depth(struct intel_context *intel,
struct intel_mipmap_tree *mt)
{
return intel_miptree_all_slices_resolve(intel, mt,
- INTEL_NEED_DEPTH_RESOLVE,
+ GEN6_HIZ_OP_DEPTH_RESOLVE,
intel->vtbl.resolve_depth_slice);
}
diff --git a/src/mesa/drivers/dri/intel/intel_resolve_map.c b/src/mesa/drivers/dri/intel/intel_resolve_map.c
index e7d82faee11..471988d3fc2 100644
--- a/src/mesa/drivers/dri/intel/intel_resolve_map.c
+++ b/src/mesa/drivers/dri/intel/intel_resolve_map.c
@@ -36,7 +36,7 @@ void
intel_resolve_map_set(struct intel_resolve_map *head,
uint32_t level,
uint32_t layer,
- enum intel_need_resolve need)
+ enum gen6_hiz_op need)
{
struct intel_resolve_map **tail = &head->next;
struct intel_resolve_map *prev = head;
diff --git a/src/mesa/drivers/dri/intel/intel_resolve_map.h b/src/mesa/drivers/dri/intel/intel_resolve_map.h
index 0f31ca80117..8504271f5cb 100644
--- a/src/mesa/drivers/dri/intel/intel_resolve_map.h
+++ b/src/mesa/drivers/dri/intel/intel_resolve_map.h
@@ -25,6 +25,10 @@
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* For an overview of the HiZ operations, see the following sections of the
* Sandy Bridge PRM, Volume 1, Part2:
@@ -42,11 +46,6 @@ enum gen6_hiz_op {
GEN6_HIZ_OP_NONE,
};
-enum intel_need_resolve {
- INTEL_NEED_HIZ_RESOLVE,
- INTEL_NEED_DEPTH_RESOLVE,
-};
-
/**
* \brief Map of miptree slices to needed resolves.
*
@@ -76,7 +75,7 @@ enum intel_need_resolve {
struct intel_resolve_map {
uint32_t level;
uint32_t layer;
- enum intel_need_resolve need;
+ enum gen6_hiz_op need;
struct intel_resolve_map *next;
struct intel_resolve_map *prev;
@@ -86,7 +85,7 @@ void
intel_resolve_map_set(struct intel_resolve_map *head,
uint32_t level,
uint32_t layer,
- enum intel_need_resolve need);
+ enum gen6_hiz_op need);
struct intel_resolve_map*
intel_resolve_map_get(struct intel_resolve_map *head,
@@ -98,3 +97,8 @@ intel_resolve_map_remove(struct intel_resolve_map *elem);
void
intel_resolve_map_clear(struct intel_resolve_map *head);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+