struct gl_shader *shader,
uint32_t *surf_offsets);
+/* brw_surface_formats.c */
+bool brw_is_hiz_depth_format(struct intel_context *ctx, gl_format format);
+
/* gen6_sol.c */
void
brw_begin_transform_feedback(struct gl_context *ctx, GLenum mode,
return brw_format_for_mesa_format(mesa_format);
}
}
+
+/** Can HiZ be enabled on a depthbuffer of the given format? */
+bool
+brw_is_hiz_depth_format(struct intel_context *intel, gl_format format)
+{
+ if (!intel->has_hiz)
+ return false;
+
+ switch (format) {
+ case MESA_FORMAT_Z32_FLOAT:
+ case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z16:
+ return true;
+ default:
+ return false;
+ }
+}
brw_collect_and_report_shader_time(brw);
}
-/**
- * \see intel_context.vtbl.is_hiz_depth_format
- */
-static bool brw_is_hiz_depth_format(struct intel_context *intel,
- gl_format format)
-{
- if (!intel->has_hiz)
- return false;
-
- switch (format) {
- case MESA_FORMAT_Z32_FLOAT:
- case MESA_FORMAT_Z32_FLOAT_X24S8:
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_S8_Z24:
- case MESA_FORMAT_Z16:
- return true;
- default:
- return false;
- }
-}
-
void brwInitVtbl( struct brw_context *brw )
{
brw->intel.vtbl.new_batch = brw_new_batch;
brw->intel.vtbl.debug_batch = brw_debug_batch;
brw->intel.vtbl.annotate_aub = brw_annotate_aub;
brw->intel.vtbl.render_target_supported = brw_render_target_supported;
- brw->intel.vtbl.is_hiz_depth_format = brw_is_hiz_depth_format;
assert(brw->intel.gen >= 4);
if (brw->intel.gen >= 7) {
bool (*render_target_supported)(struct intel_context *intel,
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);
-
void (*update_texture_surface)(struct gl_context *ctx,
unsigned unit,
uint32_t *binding_table,
intel_renderbuffer_set_draw_offset(irb);
- if (mt->hiz_mt == NULL &&
- intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
+ if (mt->hiz_mt == NULL && brw_is_hiz_depth_format(intel, rb->Format)) {
intel_miptree_alloc_hiz(intel, mt);
if (!mt->hiz_mt)
return false;
irb->mt->num_samples,
INTEL_MIPTREE_TILING_ANY);
- if (intel->vtbl.is_hiz_depth_format(intel, new_mt->format)) {
+ if (brw_is_hiz_depth_format(intel, new_mt->format)) {
intel_miptree_alloc_hiz(intel, new_mt);
}
_mesa_get_format_base_format(format) == GL_DEPTH_STENCIL &&
(intel->must_use_separate_stencil ||
(intel->has_separate_stencil &&
- intel->vtbl.is_hiz_depth_format(intel, format)))) {
+ brw_is_hiz_depth_format(intel, format)))) {
mt->stencil_mt = intel_miptree_create(intel,
mt->target,
MESA_FORMAT_S8,
if (!mt)
goto fail;
- if (intel->vtbl.is_hiz_depth_format(intel, format)) {
+ if (brw_is_hiz_depth_format(intel, format)) {
ok = intel_miptree_alloc_hiz(intel, mt);
if (!ok)
goto fail;