#ifdef __cplusplus
#undef virtual
-}
#endif
#include "tnl/t_vertex.h"
struct brw_context;
+struct intel_batchbuffer {
+ /** Current batchbuffer being queued up. */
+ drm_intel_bo *bo;
+ /** Last BO submitted to the hardware. Used for glFinish(). */
+ drm_intel_bo *last_bo;
+ /** BO for post-sync nonzero writes for gen6 workaround. */
+ drm_intel_bo *workaround_bo;
+ bool need_workaround_flush;
+
+ struct cached_batch_item *cached_items;
+
+ uint16_t emit, total;
+ uint16_t used, reserved_space;
+ uint32_t map[8192];
+#define BATCH_SZ (8192*sizeof(uint32_t))
+
+ uint32_t state_batch_offset;
+ bool is_blit;
+ bool needs_sol_reset;
+
+ struct {
+ uint16_t used;
+ int reloc_count;
+ } saved;
+};
+
/**
* intel_context is derived from Mesa's context class: struct gl_context.
*/
void (*assert_not_dirty) (struct intel_context *intel);
void (*debug_batch)(struct intel_context *intel);
+ void (*annotate_aub)(struct intel_context *intel);
bool (*render_target_supported)(struct intel_context *intel,
- gl_format format);
+ struct gl_renderbuffer *rb);
/** Can HiZ be enabled on a depthbuffer of the given format? */
bool (*is_hiz_depth_format)(struct intel_context *intel,
gl_format format);
- /**
- * \name HiZ operations
- *
- * See the following sections of the Sandy Bridge PRM, Volume 1, Part2:
- * - 7.5.3.1 Depth Buffer Clear
- * - 7.5.3.2 Depth Buffer Resolve
- * - 7.5.3.3 Hierarchical Depth Buffer Resolve
- * \{
- */
- void (*resolve_hiz_slice)(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t level,
- uint32_t layer);
-
- void (*resolve_depth_slice)(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- uint32_t level,
- uint32_t layer);
- /** \} */
-
/**
* Surface state operations (i965+ only)
* \{
int gen;
int gt;
bool needs_ff_sync;
+ bool is_haswell;
bool is_g4x;
bool is_945;
bool has_separate_stencil;
bool must_use_separate_stencil;
bool has_hiz;
+ bool has_llc;
+ bool has_swizzling;
int urb_size;
- struct intel_batchbuffer {
- /** Current batchbuffer being queued up. */
- drm_intel_bo *bo;
- /** Last BO submitted to the hardware. Used for glFinish(). */
- drm_intel_bo *last_bo;
- /** BO for post-sync nonzero writes for gen6 workaround. */
- drm_intel_bo *workaround_bo;
- bool need_workaround_flush;
-
- struct cached_batch_item *cached_items;
-
- uint16_t emit, total;
- uint16_t used, reserved_space;
- uint32_t map[8192];
-#define BATCH_SZ (8192*sizeof(uint32_t))
-
- uint32_t state_batch_offset;
- bool is_blit;
- bool needs_sol_reset;
+ drm_intel_context *hw_ctx;
- struct {
- uint16_t used;
- int reloc_count;
- } saved;
- } batch;
+ struct intel_batchbuffer batch;
drm_intel_bo *first_post_swapbuffers_batch;
bool need_throttle;
bool always_flush_batch;
bool always_flush_cache;
- /* 0 - nonconformant, best performance;
- * 1 - fallback to sw for known conformance bugs
- * 2 - always fallback to sw
- */
- GLuint conformance_mode;
-
/* State for intelvb.c and inteltris.c.
*/
GLuint RenderIndex;
#define DEBUG_URB 0x800000
#define DEBUG_VS 0x1000000
#define DEBUG_CLIP 0x2000000
+#define DEBUG_AUB 0x4000000
#define DBG(...) do { \
if (unlikely(INTEL_DEBUG & FILE_DEBUG_FLAG)) \
return (value & (value - 1)) == 0;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif