uint32_t *out_offset);
/* brw_wm_surface_state.c */
+void gen4_init_vtable_surface_functions(struct brw_context *brw);
void brw_create_constant_surface(struct brw_context *brw,
drm_intel_bo *bo,
int width,
GLenum srgb_decode);
/* gen7_wm_surface_state.c */
+void gen7_init_vtable_surface_functions(struct brw_context *brw);
void gen7_create_constant_surface(struct brw_context *brw,
drm_intel_bo *bo,
int width,
brw->intel.vtbl.hiz_resolve_hizbuffer = brw_hiz_resolve_noop;
brw->intel.vtbl.hiz_resolve_depthbuffer = brw_hiz_resolve_noop;
}
+
+ if (brw->intel.gen >= 7) {
+ gen7_init_vtable_surface_functions(brw);
+ } else if (brw->intel.gen >= 4) {
+ gen4_init_vtable_surface_functions(brw);
+ }
}
},
.emit = brw_wm_upload_binding_table,
};
+
+void
+gen4_init_vtable_surface_functions(struct brw_context *brw)
+{
+ struct intel_context *intel = &brw->intel;
+
+ intel->vtbl.update_texture_surface = brw_update_texture_surface;
+ intel->vtbl.update_renderbuffer_surface = brw_update_renderbuffer_surface;
+ intel->vtbl.update_null_renderbuffer_surface =
+ brw_update_null_renderbuffer_surface;
+ intel->vtbl.create_constant_surface = brw_create_constant_surface;
+}
},
.emit = gen7_upload_wm_surfaces,
};
+
+void
+gen7_init_vtable_surface_functions(struct brw_context *brw)
+{
+ struct intel_context *intel = &brw->intel;
+
+ intel->vtbl.update_texture_surface = gen7_update_texture_surface;
+ intel->vtbl.update_renderbuffer_surface = gen7_update_renderbuffer_surface;
+ intel->vtbl.update_null_renderbuffer_surface =
+ gen7_update_null_renderbuffer_surface;
+ intel->vtbl.create_constant_surface = gen7_create_constant_surface;
+}
drm_intel_bo *bo;
};
+struct brw_context;
+
/**
* intel_context is derived from Mesa's context class: struct gl_context.
*/
struct intel_region *depth_region);
/** \} */
+ /**
+ * Surface state operations (i965+ only)
+ * \{
+ */
+ void (*update_texture_surface)(struct gl_context *ctx, unsigned unit);
+ void (*update_renderbuffer_surface)(struct brw_context *brw,
+ struct gl_renderbuffer *rb,
+ unsigned unit);
+ void (*update_null_renderbuffer_surface)(struct brw_context *brw,
+ unsigned unit);
+ void (*create_constant_surface)(struct brw_context *brw,
+ drm_intel_bo *bo,
+ int width,
+ uint32_t *out_offset);
+ /** \} */
} vtbl;
GLbitfield Fallback; /**< mask of INTEL_FALLBACK_x bits */