[Mesa-dev] [PATCH 11/14] i965: Remove render_target_supported from the vtable.
Kenneth Graunke
kenneth at whitecape.org
Tue Jul 2 01:54:53 PDT 2013
brw_render_target_supported() is the only implementation of this
function, so it makes sense to just call it directly.
Rather than adding an #include of brw_wm.h, this patch moves the
prototype to brw_context.h. Prototypes seem to be in rather arbitrary
places at the moment, and either place seems as good as the other.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_context.h | 2 ++
src/mesa/drivers/dri/i965/brw_vtbl.c | 1 -
src/mesa/drivers/dri/i965/brw_wm.h | 2 --
src/mesa/drivers/dri/i965/intel_context.h | 2 --
src/mesa/drivers/dri/i965/intel_fbo.c | 2 +-
5 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index a190114..e250f51 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1213,6 +1213,8 @@ void brw_upload_ubo_surfaces(struct brw_context *brw,
/* brw_surface_formats.c */
bool brw_is_hiz_depth_format(struct intel_context *ctx, gl_format format);
+bool brw_render_target_supported(struct intel_context *intel,
+ struct gl_renderbuffer *rb);
/* gen6_sol.c */
void
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index 0288322..e6f8456 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -161,7 +161,6 @@ void brwInitVtbl( struct brw_context *brw )
brw->intel.vtbl.destroy = brw_destroy_context;
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;
assert(brw->intel.gen >= 4);
if (brw->intel.gen >= 7) {
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 28e8734..2908b93 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -106,8 +106,6 @@ struct gl_shader *brw_new_shader(struct gl_context *ctx, GLuint name, GLuint typ
struct gl_shader_program *brw_new_shader_program(struct gl_context *ctx, GLuint name);
bool brw_color_buffer_write_enabled(struct brw_context *brw);
-bool brw_render_target_supported(struct intel_context *intel,
- struct gl_renderbuffer *rb);
bool do_wm_prog(struct brw_context *brw,
struct gl_shader_program *prog,
struct brw_fragment_program *fp,
diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h
index 19b2f9f..97fdc97 100644
--- a/src/mesa/drivers/dri/i965/intel_context.h
+++ b/src/mesa/drivers/dri/i965/intel_context.h
@@ -121,8 +121,6 @@ struct intel_context
void (*debug_batch)(struct intel_context *intel);
void (*annotate_aub)(struct intel_context *intel);
- bool (*render_target_supported)(struct intel_context *intel,
- struct gl_renderbuffer *rb);
void (*update_texture_surface)(struct gl_context *ctx,
unsigned unit,
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index a82fb41..14d94e0 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -642,7 +642,7 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
continue;
}
- if (!intel->vtbl.render_target_supported(intel, rb)) {
+ if (!brw_render_target_supported(intel, rb)) {
fbo_incomplete(fb, "FBO incomplete: Unsupported HW "
"texture/renderbuffer format attached: %s\n",
_mesa_get_format_name(intel_rb_format(irb)));
--
1.8.3.1
More information about the mesa-dev
mailing list