[Mesa-dev] [PATCH V3 06/30] i965: Pretend we don't support BRW_SURFACEFORMAT_R16G16B16_FLOAT for textures.

Chris Forbes chrisf at ijw.co.nz
Sun Apr 6 22:30:13 PDT 2014


Yes, that will work -- will do.

On Mon, Apr 7, 2014 at 5:29 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 04/02/2014 01:05 AM, Chris Forbes wrote:
>> None of the other 3-component 16bpc formats are directly supported, so
>> they get promoted to XRGB equivalents. *Not* promoting RGB16F the same
>> way makes texture views much more fiddly -- we don't want to have to do
>> crazy copying behind the scenes.
>>
>> (with my other master + my experimental ARB_texture_view support) fixes
>> the piglit test: `spec/ARB_texture_view/view compare 48bit formats`
>>
>> No regressions in gpu.tests on Haswell.
>>
>> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>> ---
>>  src/mesa/drivers/dri/i965/brw_surface_formats.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
>> index c029d81..f203f52 100644
>> --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
>> +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
>> @@ -267,7 +267,7 @@ const struct surface_format_info surface_formats[] = {
>>     SF( x,  x,  x,  x,  x,  x,  Y,  x,  x, BRW_SURFACEFORMAT_R64G64B64_FLOAT)
>>     SF( Y,  Y,  x,  x,  x,  x,  x,  x,  x, BRW_SURFACEFORMAT_BC4_SNORM)
>>     SF( Y,  Y,  x,  x,  x,  x,  x,  x,  x, BRW_SURFACEFORMAT_BC5_SNORM)
>> -   SF(50, 50,  x,  x,  x,  x, 60,  x,  x, BRW_SURFACEFORMAT_R16G16B16_FLOAT)
>> +   SF( x,  x,  x,  x,  x,  x, 60,  x,  x, BRW_SURFACEFORMAT_R16G16B16_FLOAT)
>>     SF( x,  x,  x,  x,  x,  x,  Y,  x,  x, BRW_SURFACEFORMAT_R16G16B16_UNORM)
>>     SF( x,  x,  x,  x,  x,  x,  Y,  x,  x, BRW_SURFACEFORMAT_R16G16B16_SNORM)
>>     SF( x,  x,  x,  x,  x,  x,  Y,  x,  x, BRW_SURFACEFORMAT_R16G16B16_SSCALED)
>>
>
> Dropping support for this seems fine - Mesa will instead pick R16G16B16X16.
>
> I don't like making the table not reflect the docs though.  I think you
> can achieve the same effect by changing:
>
>    [MESA_FORMAT_RGB_FLOAT16] = BRW_SURFACEFORMAT_R16G16B16_FLOAT,
>
> to
>
>    [MESA_FORMAT_RGB_FLOAT16] = 0,
>
> Would that work?
>
> --Ken
>


More information about the mesa-dev mailing list