From: Tobias Klausmann <tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: "nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH v2] nv50: enable texture compression
Date: Sat, 03 Jan 2015 00:50:53 +0100 [thread overview]
Message-ID: <54A72EDD.8020501@mni.thm.de> (raw)
In-Reply-To: <CAKb7UviGAYm-mfT7DyZ-5iFW1V=hyAR8GqfZ=rNFMV0pVJ0Ggw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 03.01.2015 00:20, Ilia Mirkin wrote:
> On Fri, Jan 2, 2015 at 6:09 PM, Tobias Klausmann
> <tobias.johannes.klausmann@mni.thm.de> wrote:
>> We enable compression only for some supported formats
>>
>> Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
>> Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
>> ---
>> src/gallium/drivers/nouveau/nv50/nv50_miptree.c | 23 +++++++++++++++++++++--
>> src/gallium/drivers/nouveau/nv50/nv50_screen.c | 7 +++++++
>> 2 files changed, 28 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
>> index 1aacaec..13ed8a3 100644
>> --- a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
>> +++ b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
>> @@ -65,8 +65,7 @@ nv50_tex_choose_tile_dims(unsigned nx, unsigned ny, unsigned nz)
>> static uint32_t
>> nv50_mt_choose_storage_type(struct nv50_miptree *mt, boolean compressed)
> The caller of this currently always says true. However it should
> probably be drm_version >= whatever.
Oh sure, i'll add it!
>
>> {
>> - const unsigned ms = mt->ms_x + mt->ms_y;
>> -
>> + const unsigned ms = util_logbase2(mt->base.base.nr_samples);
>> uint32_t tile_flags;
>>
>> if (unlikely(mt->base.base.flags & NOUVEAU_RESOURCE_FLAG_LINEAR))
>> @@ -96,6 +95,26 @@ nv50_mt_choose_storage_type(struct nv50_miptree *mt, boolean compressed)
>> tile_flags = 0x60 + ms;
>> break;
>> default:
>> + switch (mt->base.base.format) {
> You're already switching on the format. You could be all clever and do
>
> default:
> compressed = false;
> /* fallthrough */
> case PIPE_FORMAT_A:
> case PIPE_FORMAT_B:
> switch (blocksize) { ... }
>
> It's a bit unusual to have the default case in the middle, but I'm
> pretty sure it works.
We talked about broken compilers, hope we don't hit one here :D
>
> BTW, I assume that there was no dmesg spam or piglit regressions with
> this change?
Indeed!
>
> -ilia
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-01-02 23:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-02 2:56 [PATCH] nv50: enable texture compression Tobias Klausmann
[not found] ` <1420167363-3297-1-git-send-email-tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-01-02 3:26 ` Ilia Mirkin
[not found] ` <CAKb7UviwHNX-+bvzrafi13dnsJdm1fiA95miPTGdgTn7Oh_9kg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-02 23:09 ` [PATCH v2] " Tobias Klausmann
[not found] ` <1420240193-16070-1-git-send-email-tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-01-02 23:20 ` Ilia Mirkin
[not found] ` <CAKb7UviGAYm-mfT7DyZ-5iFW1V=hyAR8GqfZ=rNFMV0pVJ0Ggw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-02 23:50 ` Tobias Klausmann [this message]
[not found] ` <54A72EDD.8020501-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-01-03 0:00 ` [PATCH v3] " Tobias Klausmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54A72EDD.8020501@mni.thm.de \
--to=tobias.johannes.klausmann-aqjdnwhu20eelga04laivw@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.