[Mesa-dev] [v2, 1/2] i965: Handle texture view min level in brw_generate_mipmap()

2019-11-04 Thread Paul Gofman
Currently minlevel set with glTextureView() is ignored for
mipmap generation and original texture's first layer is used as
the source layer in glGenerateMipmap().

Signed-off-by: Paul Gofman 
---
Corresponding piglit test patch: 
https://patchwork.freedesktop.org/patch/338798/

 src/mesa/drivers/dri/i965/brw_generate_mipmap.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_generate_mipmap.c 
b/src/mesa/drivers/dri/i965/brw_generate_mipmap.c
index 4125ae6e11c..6999e751b9d 100644
--- a/src/mesa/drivers/dri/i965/brw_generate_mipmap.c
+++ b/src/mesa/drivers/dri/i965/brw_generate_mipmap.c
@@ -41,9 +41,12 @@ brw_generate_mipmap(struct gl_context *ctx, GLenum target,
struct brw_context *brw = brw_context(ctx);
struct gen_device_info *devinfo = &brw->screen->devinfo;
struct intel_texture_object *intel_obj = intel_texture_object(tex_obj);
-   const unsigned base_level = tex_obj->BaseLevel;
+   unsigned base_level = tex_obj->BaseLevel;
unsigned last_level, first_layer, last_layer;
 
+   if (tex_obj->Immutable)
+  base_level += tex_obj->MinLevel;
+
/* Blorp doesn't handle combined depth/stencil surfaces on Gen4-5 yet. */
if (devinfo->gen <= 5 &&
(tex_obj->Image[0][base_level]->_BaseFormat == GL_DEPTH_COMPONENT ||
@@ -55,6 +58,9 @@ brw_generate_mipmap(struct gl_context *ctx, GLenum target,
/* find expected last mipmap level to generate */
last_level = _mesa_compute_num_levels(ctx, tex_obj, target) - 1;
 
+   if (tex_obj->Immutable)
+  last_level += tex_obj->MinLevel;
+
if (last_level == 0)
   return;
 
-- 
2.23.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [v2, 2/2] state_tracker: Handle texture view min level in st_generate_mipmap()

2019-11-04 Thread Paul Gofman
Signed-off-by: Paul Gofman 
---
Corresponding piglit test patch: 
https://patchwork.freedesktop.org/patch/338798/

 src/mesa/state_tracker/st_gen_mipmap.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_gen_mipmap.c 
b/src/mesa/state_tracker/st_gen_mipmap.c
index b71a8ee57bb..9c7d955a45b 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -56,13 +56,16 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
struct st_context *st = st_context(ctx);
struct st_texture_object *stObj = st_texture_object(texObj);
struct pipe_resource *pt = st_get_texobj_resource(texObj);
-   const uint baseLevel = texObj->BaseLevel;
+   uint baseLevel = texObj->BaseLevel;
enum pipe_format format;
uint lastLevel, first_layer, last_layer;
 
if (!pt)
   return;
 
+   if (texObj->Immutable)
+  baseLevel += texObj->MinLevel;
+
/* not sure if this ultimately actually should work,
   but we're not supporting multisampled textures yet. */
assert(pt->nr_samples < 2);
@@ -70,6 +73,9 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
/* find expected last mipmap level to generate*/
lastLevel = _mesa_compute_num_levels(ctx, texObj, target) - 1;
 
+   if (texObj->Immutable)
+  lastLevel += texObj->MinLevel;
+
if (lastLevel == 0)
   return;
 
-- 
2.23.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] ac: add missing Arcturus to the info of pc lines

2019-11-04 Thread Liu, Leo
Signed-off-by: Leo Liu 
Cc: Marek Olšák 
---
 src/amd/common/ac_gpu_info.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index 9caa51cb8b9..0061d2deb01 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -616,6 +616,7 @@ bool ac_query_gpu_info(int fd, void *dev_p,
case CHIP_RAVEN:
case CHIP_RAVEN2:
case CHIP_RENOIR:
+   case CHIP_ARCTURUS:
case CHIP_NAVI10:
case CHIP_NAVI12:
pc_lines = 1024;
-- 
2.17.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] FOSDEM Graphics Devroom: call for speakers.

2019-11-04 Thread Luc Verhaegen
Hi,

At FOSDEM on saturday the 1st of february 2020, there will be another 
graphics DevRoom. URL: https://fosdem.org/2020/

The focus of this DevRoom is:
* Graphics drivers: from display to media to 3d drivers, both in 
bootloaders, kernel or userspace. Be it part of DRM, KMS, V4L, 
(direct)FB, Xorg, Mesa...
* Input drivers: kernel and userspace.
* Windowing systems: X, Wayland, Mir, directFB, ...
* Even colour management, low level toolkit stuff, and other areas which 
i might have overlooked above are accepted.

Slots will be handed out on a first come, first serve basis. The best 
slots will go to those who apply the earliest. We have the devroom from 
10:30 til 19:00, giving us 8h30, so eight 50 minute talks and one 20 
minute talk are available.

Talk Submission:


The venerable pentabarf system will once again be used for talk 
submission.

https://penta.fosdem.org/submission/FOSDEM20

Remember that FOSDEM is a huge, and tightly organized event with 10+k 
visitors, full livestreaming, and a booklet which holds the schedule. So 
put some effort in your talk submission and details, especially since 
the schedule gets locked down well before the event starts.

Since this an open source community event, please refrain from turning 
in a talk that is purely corporate or a product commercial. Also, this 
is a highly technical devroom on a conference aimed at developers and 
advanced users, so only submit a talk on a subject you actually are 
involved with. Finally, if you are unsure whether you can come or not 
(this is FOSDEM, why are you not there anyway?), wait with submitting 
your talk until you know for sure.

When in pentabarf, spend some time on the abstract and description, for 
both the event and the speaker. The abstract should be a shortened 
description, and the event abstract will sometimes even be printed 
directly in the booklet. BUT, on the website the abstract is  
immediately followed by the full description. If your abstract is fully 
descriptive, while terse, you might get away with just the abstract.

Talks are either 50 minutes or 20 minutes long, plus 5 minutes for 
questions.

All talks will be recorded, and will be streamed out live, and will 
later be made available as CC-BY, sometimes minutes after your talk has 
finished.

As for deadlines, the fosdem organizers want to have a finished schedule 
by the 15th of december. Don't count on this deadline: first come first 
serve! The worst slots will be assigned to those who come last, which 
could be pretty dire given that there is the traditional FOSDEM beer 
event the night before ;)

Please try to re-use your accounts from the previous years. If you have 
forgotten your password, then you can reset it here: 
https://penta.fosdem.org/user/forgot_password

If there are any questions or issues, just poke me by email or on IRC.

Necessary information:
--

Below is a list of what i need to see filled in in pentabarf when you 
apply for a devroom before i consider it a valid submission. Remember: 
first come, first serve. The best slots (which are on saturday 
afternoon) are for the earliest submissions.

On your personal page:
* General:
  * First and last name
  * Nickname
  * Image
* Contact:
  * email address
  * mobile number (this is a very hard requirement as there will be no 
other reliable form of emergency communication on the day)
* Description:
  * Abstract
  * Description

Create an event:
* On the General page:
  * Event title
  * Event subtitle.
  * Track: Graphics Devroom
  * Event type: Lecture (talk) or Meeting (BoF)
* Persons:
  * Add yourself as speaker.
* Description:
  * Abstract:
  * Full Description
* Schedule:
  * select your preferred talk length, either 55 or 25 minutes.
* Links:
  * Add relevant links.

The mobile phone number is the hardest requirement, so you can be 
contacted on-the-day when something comes up. Speakers will all receive 
my mobile number in return.

Everything else can be ignored or will be filled in by me or the FOSDEM 
organizers. Remember, i will only schedule your talk after the basics 
are somewhat filled in (you still can change them until december 14th).

I will be keeping a keen eye on your submissions and will come back with 
further questions or make small fixes as needed. Feel free to poke me 
with any questions or anything, both on irc (libv@freenode) and on 
email.

That's about it. Hope to see you all at FOSDEM :)

Luc Verhaegen.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] ac: add missing Arcturus to the info of pc lines

2019-11-04 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Mon, Nov 4, 2019 at 11:30 AM Liu, Leo  wrote:

> Signed-off-by: Leo Liu 
> Cc: Marek Olšák 
> ---
>  src/amd/common/ac_gpu_info.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
> index 9caa51cb8b9..0061d2deb01 100644
> --- a/src/amd/common/ac_gpu_info.c
> +++ b/src/amd/common/ac_gpu_info.c
> @@ -616,6 +616,7 @@ bool ac_query_gpu_info(int fd, void *dev_p,
> case CHIP_RAVEN:
> case CHIP_RAVEN2:
> case CHIP_RENOIR:
> +   case CHIP_ARCTURUS:
> case CHIP_NAVI10:
> case CHIP_NAVI12:
> pc_lines = 1024;
> --
> 2.17.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] ac: add missing Arcturus to the info of pc lines

2019-11-04 Thread Marek Olšák
Actually, pc_lines should be 0, so a case with only a break statement
should be used.

Marek

On Mon, Nov 4, 2019 at 1:00 PM Marek Olšák  wrote:

> Reviewed-by: Marek Olšák 
>
> Marek
>
> On Mon, Nov 4, 2019 at 11:30 AM Liu, Leo  wrote:
>
>> Signed-off-by: Leo Liu 
>> Cc: Marek Olšák 
>> ---
>>  src/amd/common/ac_gpu_info.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
>> index 9caa51cb8b9..0061d2deb01 100644
>> --- a/src/amd/common/ac_gpu_info.c
>> +++ b/src/amd/common/ac_gpu_info.c
>> @@ -616,6 +616,7 @@ bool ac_query_gpu_info(int fd, void *dev_p,
>> case CHIP_RAVEN:
>> case CHIP_RAVEN2:
>> case CHIP_RENOIR:
>> +   case CHIP_ARCTURUS:
>> case CHIP_NAVI10:
>> case CHIP_NAVI12:
>> pc_lines = 1024;
>> --
>> 2.17.1
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [v2, 2/2] state_tracker: Handle texture view min level in st_generate_mipmap()

2019-11-04 Thread Marek Olšák
I've pushed this patch. Thanks!

Marek

On Mon, Nov 4, 2019 at 7:31 AM Paul Gofman  wrote:

> Signed-off-by: Paul Gofman 
> ---
> Corresponding piglit test patch:
> https://patchwork.freedesktop.org/patch/338798/
>
>  src/mesa/state_tracker/st_gen_mipmap.c | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_gen_mipmap.c
> b/src/mesa/state_tracker/st_gen_mipmap.c
> index b71a8ee57bb..9c7d955a45b 100644
> --- a/src/mesa/state_tracker/st_gen_mipmap.c
> +++ b/src/mesa/state_tracker/st_gen_mipmap.c
> @@ -56,13 +56,16 @@ st_generate_mipmap(struct gl_context *ctx, GLenum
> target,
> struct st_context *st = st_context(ctx);
> struct st_texture_object *stObj = st_texture_object(texObj);
> struct pipe_resource *pt = st_get_texobj_resource(texObj);
> -   const uint baseLevel = texObj->BaseLevel;
> +   uint baseLevel = texObj->BaseLevel;
> enum pipe_format format;
> uint lastLevel, first_layer, last_layer;
>
> if (!pt)
>return;
>
> +   if (texObj->Immutable)
> +  baseLevel += texObj->MinLevel;
> +
> /* not sure if this ultimately actually should work,
>but we're not supporting multisampled textures yet. */
> assert(pt->nr_samples < 2);
> @@ -70,6 +73,9 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
> /* find expected last mipmap level to generate*/
> lastLevel = _mesa_compute_num_levels(ctx, texObj, target) - 1;
>
> +   if (texObj->Immutable)
> +  lastLevel += texObj->MinLevel;
> +
> if (lastLevel == 0)
>return;
>
> --
> 2.23.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev