Re: [Mesa-dev] [PATCH] st/mesa: set result writemask based on ir type

2017-03-08 Thread Ilia Mirkin
Could I get a review for this? I'll do some testing on it, hopefully
tonight, but I don't really anticipate issues. Seems like it should be
obviously correct - we do the same thing in visit(ir_operation *).

On Sat, Mar 4, 2017 at 2:05 PM, Ilia Mirkin  wrote:
> On Sat, Mar 4, 2017 at 1:52 PM, Ilia Mirkin  wrote:
>> This prevents textureQueryLevels, which maps as LODQ, from ending up
>
> Erm, that should of course be textureQueryLod which maps to LODQ.
>
>> with a xyzw writemask, which is illegal.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100061
>> Signed-off-by: Ilia Mirkin 
>> Cc: mesa-sta...@lists.freedesktop.org
>> ---
>>
>> Untested beyond making sure that the shader in the above bug ends up with
>> a .xy writemask. I don't have access to a reasonable testing rig right now,
>> would be ideal if someone could give it a run through theirs...
>>
>>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp 
>> b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
>> index af41bdb..63b681f 100644
>> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
>> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
>> @@ -4165,6 +4165,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>>  */
>> result_src = get_temp(ir->type);
>> result_dst = st_dst_reg(result_src);
>> +   result_dst.writemask = (1 << ir->type->vector_elements) - 1;
>>
>> switch (ir->op) {
>> case ir_tex:
>> --
>> 2.10.2
>>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] st/mesa: set result writemask based on ir type

2017-03-04 Thread Karol Herbst
thanks for the patch, works for me on that one trace as well

2017-03-04 20:05 GMT+01:00 Ilia Mirkin :
> On Sat, Mar 4, 2017 at 1:52 PM, Ilia Mirkin  wrote:
>> This prevents textureQueryLevels, which maps as LODQ, from ending up
>
> Erm, that should of course be textureQueryLod which maps to LODQ.
>
>> with a xyzw writemask, which is illegal.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100061
>> Signed-off-by: Ilia Mirkin 
>> Cc: mesa-sta...@lists.freedesktop.org
>> ---
>>
>> Untested beyond making sure that the shader in the above bug ends up with
>> a .xy writemask. I don't have access to a reasonable testing rig right now,
>> would be ideal if someone could give it a run through theirs...
>>
>>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp 
>> b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
>> index af41bdb..63b681f 100644
>> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
>> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
>> @@ -4165,6 +4165,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>>  */
>> result_src = get_temp(ir->type);
>> result_dst = st_dst_reg(result_src);
>> +   result_dst.writemask = (1 << ir->type->vector_elements) - 1;
>>
>> switch (ir->op) {
>> case ir_tex:
>> --
>> 2.10.2
>>
> ___
> 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] st/mesa: set result writemask based on ir type

2017-03-04 Thread Ilia Mirkin
On Sat, Mar 4, 2017 at 1:52 PM, Ilia Mirkin  wrote:
> This prevents textureQueryLevels, which maps as LODQ, from ending up

Erm, that should of course be textureQueryLod which maps to LODQ.

> with a xyzw writemask, which is illegal.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100061
> Signed-off-by: Ilia Mirkin 
> Cc: mesa-sta...@lists.freedesktop.org
> ---
>
> Untested beyond making sure that the shader in the above bug ends up with
> a .xy writemask. I don't have access to a reasonable testing rig right now,
> would be ideal if someone could give it a run through theirs...
>
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp 
> b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index af41bdb..63b681f 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -4165,6 +4165,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>  */
> result_src = get_temp(ir->type);
> result_dst = st_dst_reg(result_src);
> +   result_dst.writemask = (1 << ir->type->vector_elements) - 1;
>
> switch (ir->op) {
> case ir_tex:
> --
> 2.10.2
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/mesa: set result writemask based on ir type

2017-03-04 Thread Ilia Mirkin
This prevents textureQueryLevels, which maps as LODQ, from ending up
with a xyzw writemask, which is illegal.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100061
Signed-off-by: Ilia Mirkin 
Cc: mesa-sta...@lists.freedesktop.org
---

Untested beyond making sure that the shader in the above bug ends up with
a .xy writemask. I don't have access to a reasonable testing rig right now,
would be ideal if someone could give it a run through theirs...

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp 
b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index af41bdb..63b681f 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4165,6 +4165,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
 */
result_src = get_temp(ir->type);
result_dst = st_dst_reg(result_src);
+   result_dst.writemask = (1 << ir->type->vector_elements) - 1;
 
switch (ir->op) {
case ir_tex:
-- 
2.10.2

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