I'm going to want to go looking at it for an integer texture fix.
NOTE: This is a candidate for the 8.0 branch.
};
static bool
-i830_render_target_supported(struct intel_context *intel, gl_format format)
+i830_render_target_supported(struct intel_context *intel,
+ struct gl_renderbuffer *rb)
{
+ gl_format format = rb->Format;
+
if (format == MESA_FORMAT_S8_Z24 ||
format == MESA_FORMAT_X8_Z24 ||
format == MESA_FORMAT_Z16) {
};
static bool
-i915_render_target_supported(struct intel_context *intel, gl_format format)
+i915_render_target_supported(struct intel_context *intel,
+ struct gl_renderbuffer *rb)
{
+ gl_format format = rb->Format;
+
if (format == MESA_FORMAT_S8_Z24 ||
format == MESA_FORMAT_X8_Z24 ||
format == MESA_FORMAT_Z16) {
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, gl_format format);
+bool brw_render_target_supported(struct intel_context *intel,
+ struct gl_renderbuffer *rb);
void brw_wm_payload_setup(struct brw_context *brw,
struct brw_wm_compile *c);
bool do_wm_prog(struct brw_context *brw,
}
bool
-brw_render_target_supported(struct intel_context *intel, gl_format format)
+brw_render_target_supported(struct intel_context *intel,
+ struct gl_renderbuffer *rb)
{
struct brw_context *brw = brw_context(&intel->ctx);
- /* Not exactly true, as some of those formats are not renderable.
- * But at least we know how to translate them.
- */
+ gl_format format = rb->Format;
+
return brw->format_supported_as_render_target[format];
}
surf->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
break;
default:
- assert(brw_render_target_supported(intel, rb_format));
+ assert(brw_render_target_supported(intel, rb));
surf->ss0.surface_format = brw->render_target_format[rb_format];
if (unlikely(!brw->format_supported_as_render_target[rb_format])) {
_mesa_problem(ctx, "%s: renderbuffer format %s unsupported\n",
void (*debug_batch)(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,
continue;
}
- if (!intel->vtbl.render_target_supported(intel, intel_rb_format(irb))) {
+ if (!intel->vtbl.render_target_supported(intel, rb)) {
DBG("Unsupported HW texture/renderbuffer format attached: %s\n",
_mesa_get_format_name(intel_rb_format(irb)));
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;