[Mesa-dev] [PATCH 5/5] i965/gen9: Don't allow the RGBX formats for texturing/rendering

Neil Roberts neil at linux.intel.com
Mon Nov 23 03:00:17 PST 2015


Ben Widawsky <ben at bwidawsk.net> writes:

>> +   /* The RGBX formats are not renderable. Normally these get mapped
>> +    * internally to RGBA formats when rendering. However on Gen9+ when this
>> +    * internal override is used fast clears don't work so they are disabled in
>> +    * brw_meta_fast_clear. To avoid this problem we can just pretend not to
>> +    * support RGBX formats at all. This will cause the upper layers of Mesa to
>> +    * pick the RGBA formats instead. This works fine because when it is used
>
> A lot of these formats are already unsupported for fast clears. In fact, I
> believe only MESA_FORMAT_R8G8B8X8_UNORM is a problem. Are you trying to
> accomplish something else here as well?

I tested all of the formats with the fast-clear Piglit test and I think
all of them are supported for fast clears on MSRTs. Don't forget that
the ccs_e field in the surface_format_info isn't used for MSRTs. The
first three do actually cause failures but for some reason
MESA_FORMAT_RGBX_FLOAT16 does actually work. MESA_FORMAT_RGBX_FLOAT32
isn't used because there is no override to make it use
MESA_FORMAT_RGBA_FLOAT32 as a render target anyway. Presumably that
means it will end up using RGBA for sampling as well and there are
probably going to be some bugs with this format on platforms without
texture swizzle or that the use the blorp so it probably should have
this override. However I think that is a separate patch. If we did fix
that then it would make sense to leave this format in this patch.

Regards,
- Neil


More information about the mesa-dev mailing list