[Mesa-dev] [PATCH 3/3] i965: Bump MaxTexMbytes from 1GB to 1.5GB.
Kenneth Graunke
kenneth at whitecape.org
Wed Feb 5 02:27:13 CET 2014
On 02/04/2014 10:37 AM, Daniel Vetter wrote:
> On Sun, Feb 02, 2014 at 03:16:45AM -0800, Kenneth Graunke wrote:
>> Even with the other limits raised, TestProxyTexImage would still reject
>> textures > 1GB in size. This is an artificial limit; nothing prevents
>> us from having a larger texture. I stayed shy of 2GB to avoid the
>> larger-than-aperture situation.
>>
>> For 3D textures, this raises the effective limit:
>> - RGBA8: 645 -> 738
>> - RGBA16: 512 -> 586
>> - RGBA32F: 406 -> 465
>>
>> Cc: idr at freedesktop.org
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74130
>> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
>> ---
>> src/mesa/drivers/dri/i965/brw_context.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
>> index 17b75e1..66d6ccb 100644
>> --- a/src/mesa/drivers/dri/i965/brw_context.c
>> +++ b/src/mesa/drivers/dri/i965/brw_context.c
>> @@ -306,6 +306,7 @@ brw_initialize_context_constants(struct brw_context *brw)
>> ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS;
>> ctx->Const.Max3DTextureLevels = 12; /* 2048 */
>> ctx->Const.MaxCubeTextureLevels = 14; /* 8192 */
>> + ctx->Const.MaxTextureMbytes = 1536;
>
> Original gen4 (i.e. i965g) only has 512 MB of aperture ... Also going this
> high runs the risk that you fool up with fragmentation, but meh.
>
> You'd need to get at bufmgr_gem->gtt_size somehow. At least the current
> code is safe for address spaces > 4G.
> -Daniel
This whole check is fairly stupid. It denies things that could work (as
evidenced by this patch), and doesn't prevent things that won't work
(you can always create 2 or 3 large textures, each of which pass this
check, but exceed the aperture when used together.)
So, I don't think that making the formula more precise by getting at
bufmgr_gem->gtt_size is really useful...I think we should just stop
using this code altogether.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140204/88b3d314/attachment-0001.pgp>
More information about the mesa-dev
mailing list