i965: Remove render_target_supported from the vtable.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 29 Jun 2013 02:30:19 +0000 (19:30 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 3 Jul 2013 17:48:14 +0000 (10:48 -0700)
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@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_vtbl.c
src/mesa/drivers/dri/i965/brw_wm.h
src/mesa/drivers/dri/i965/intel_context.h
src/mesa/drivers/dri/i965/intel_fbo.c

index a1901149200ad12cdbde80952d274e4850e641ee..e250f5137ade66d9ea81a7208f581ee69b6b621d 100644 (file)
@@ -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
index 0288322e652292034933e7557b525f9f8c0a2877..e6f8456ba7fafc7400e16a4f52e51e3edd2670cb 100644 (file)
@@ -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) {
index 28e87344364f9c6570dfef83a1270bd8b580a13f..2908b937d380a3d748e8a6941a65c77d86d30921 100644 (file)
@@ -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,
index 19b2f9f0cb386d5ffcdf704f1650fa59e2ca0bcf..97fdc9776ef68fc732717b576e4cd53458efee84 100644 (file)
@@ -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,
index a82fb41f59838b038fdd46200e6fd24bf50e06ba..14d94e0dc95e8cd8a86870f95eae5a4d07b22ecd 100644 (file)
@@ -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)));