}
static bool
-color_formats_match(gl_format src_format, gl_format dst_format)
+color_formats_match(mesa_format src_format, mesa_format dst_format)
{
- gl_format linear_src_format = _mesa_get_srgb_format_linear(src_format);
- gl_format linear_dst_format = _mesa_get_srgb_format_linear(dst_format);
+ mesa_format linear_src_format = _mesa_get_srgb_format_linear(src_format);
+ mesa_format linear_dst_format = _mesa_get_srgb_format_linear(dst_format);
/* Normally, we require the formats to be equal. However, we also support
* blitting from ARGB to XRGB (discarding alpha), and from XRGB to ARGB
* (overriding alpha to 1.0 via blending).
*/
return linear_src_format == linear_dst_format ||
- (linear_src_format == MESA_FORMAT_XRGB8888 &&
- linear_dst_format == MESA_FORMAT_ARGB8888) ||
- (linear_src_format == MESA_FORMAT_ARGB8888 &&
- linear_dst_format == MESA_FORMAT_XRGB8888);
+ (linear_src_format == MESA_FORMAT_B8G8R8X8_UNORM &&
+ linear_dst_format == MESA_FORMAT_B8G8R8A8_UNORM) ||
+ (linear_src_format == MESA_FORMAT_B8G8R8A8_UNORM &&
+ linear_dst_format == MESA_FORMAT_B8G8R8X8_UNORM);
}
static bool
* example MESA_FORMAT_X8_Z24 and MESA_FORMAT_S8_Z24), and we can blit
* between those formats.
*/
- gl_format src_format = find_miptree(buffer_bit, src_irb)->format;
- gl_format dst_format = find_miptree(buffer_bit, dst_irb)->format;
+ mesa_format src_format = find_miptree(buffer_bit, src_irb)->format;
+ mesa_format dst_format = find_miptree(buffer_bit, dst_irb)->format;
return color_formats_match(src_format, dst_format);
}
const sampler_message_arg *args, int num_args);
void render_target_write();
- void emit_lrp(const struct brw_reg &dst,
- const struct brw_reg &src1,
- const struct brw_reg &src2,
- const struct brw_reg &src3);
-
/**
* Base-2 logarithm of the maximum number of samples that can be blended.
*/
emit_endif();
}
-void
-brw_blorp_blit_program::emit_lrp(const struct brw_reg &dst,
- const struct brw_reg &src1,
- const struct brw_reg &src2,
- const struct brw_reg &src3)
-{
- brw_set_access_mode(&func, BRW_ALIGN_16);
- brw_set_compression_control(&func, BRW_COMPRESSION_NONE);
- brw_LRP(&func, dst, src1, src2, src3);
- brw_set_compression_control(&func, BRW_COMPRESSION_2NDHALF);
- brw_LRP(&func, sechalf(dst), sechalf(src1), sechalf(src2), sechalf(src3));
- brw_set_compression_control(&func, BRW_COMPRESSION_COMPRESSED);
- brw_set_access_mode(&func, BRW_ALIGN_1);
-}
-
void
brw_blorp_blit_program::manual_blend_bilinear(unsigned num_samples)
{
wm_prog_key.texture_data_type = BRW_REGISTER_TYPE_F;
break;
case GL_UNSIGNED_INT:
- if (src_mt->format == MESA_FORMAT_S8) {
+ if (src_mt->format == MESA_FORMAT_S_UINT8) {
/* We process stencil as though it's an unsigned normalized color */
wm_prog_key.texture_data_type = BRW_REGISTER_TYPE_F;
} else {