[Mesa-dev] [PATCH 4/4] radeonsi: force non-displayable tiling based on surface dimensions
Marek Olšák
maraeo at gmail.com
Fri Jun 3 17:21:41 UTC 2016
On Fri, Jun 3, 2016 at 5:18 PM, Gustaw Smolarczyk <wielkiegie at gmail.com> wrote:
> 2016-06-03 12:52 GMT+02:00 Marek Olšák <maraeo at gmail.com>:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> Simply ignore the "scanout" flag if the surface dimensions are unlikely
>> to be used by DCE.
>>
>> This enables DCC for all X pixmaps that are not on the list of displayable
>> dimensions.
>>
>> Also ignore the "scanout" flag for non-2D, non-color, and AA surfaces.
>>
>> Any suggestions how to reduce the size of the list?
>> ---
>> src/gallium/drivers/radeon/Makefile.sources | 1 +
>> src/gallium/drivers/radeon/display_resolutions.h | 239 +++++++++++++++++++++++
>> src/gallium/drivers/radeon/r600_texture.c | 33 +++-
>> 3 files changed, 270 insertions(+), 3 deletions(-)
>> create mode 100644 src/gallium/drivers/radeon/display_resolutions.h
>>
>> diff --git a/src/gallium/drivers/radeon/Makefile.sources b/src/gallium/drivers/radeon/Makefile.sources
>> index 6fbed81..01bf07d 100644
>> --- a/src/gallium/drivers/radeon/Makefile.sources
>> +++ b/src/gallium/drivers/radeon/Makefile.sources
>> @@ -1,5 +1,6 @@
>> C_SOURCES := \
>> cayman_msaa.c \
>> + display_resolutions.h \
>> r600_buffer_common.c \
>> r600_cs.h \
>> r600d_common.h \
>> diff --git a/src/gallium/drivers/radeon/display_resolutions.h b/src/gallium/drivers/radeon/display_resolutions.h
>> new file mode 100644
>> index 0000000..5f9bdce
>> --- /dev/null
>> +++ b/src/gallium/drivers/radeon/display_resolutions.h
>> @@ -0,0 +1,239 @@
>> +/*
>> + * Copyright 2016 Advanced Micro Devices, Inc.
>> + *
>> + * Permission is hereby granted, free of charge, to any person obtaining a
>> + * copy of this software and associated documentation files (the "Software"),
>> + * to deal in the Software without restriction, including without limitation
>> + * on the rights to use, copy, modify, merge, publish, distribute, sub
>> + * license, and/or sell copies of the Software, and to permit persons to whom
>> + * the Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice (including the next
>> + * paragraph) shall be included in all copies or substantial portions of the
>> + * Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
>> + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
>> + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
>> + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
>> + * USE OR OTHER DEALINGS IN THE SOFTWARE.
>> + */
>> +
>> +/* Surface dimensions not listed here will always use a NON-DISPLAYABLE layout
>> + * and possibly DCC.
>> + *
>> + * Add all possible display resolutions and cursor sizes here.
>> + */
>> +
>> +/* From Wikipedia mostly: */
>> +static unsigned resolutions[] = {
> How about adding const here?
Yeah I'll add that.
Marek
More information about the mesa-dev
mailing list