[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-12-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

Emil Velikov  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Emil Velikov  ---
Should be fixed with the following commit. Feel free to reopen otherwise.

commit bb17ae49ee2591a4a35479ed6e48cb3c18422e2a
Author: Dave Airlie 
Date:   Mon Aug 27 02:03:41 2018 +0100

gallivm: allow to pass two swizzles into fetches.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-27 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

--- Comment #8 from Matwey V. Kornilov  ---
(In reply to Dave Airlie from comment #6)
> Created attachment 141293 [details] [review]
> pass two swizzles into fetches.

I've checked that the patch fixes the issue for llvm at my side.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

--- Comment #6 from Dave Airlie  ---
Created attachment 141293
  --> https://bugs.freedesktop.org/attachment.cgi?id=141293=edit
pass two swizzles into fetches.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

--- Comment #7 from Dave Airlie  ---
The attached patch shoulw in theory fix it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

--- Comment #5 from Dave Airlie  ---
Looked at it a bit last week, but it's messier than I thought, need to dig a
bit more to find a proper answer.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

--- Comment #4 from Matwey V. Kornilov  ---
Any news?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

Konstantin Malanchev  changed:

   What|Removed |Added

 CC||hom...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

--- Comment #3 from Matwey V. Kornilov  ---
Created attachment 141033
  --> https://bugs.freedesktop.org/attachment.cgi?id=141033=edit
shader_run test

Attached is what are you looking for.

It passes at Intel and fails at llvmpipe.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

--- Comment #2 from Dave Airlie  ---
Having a piglit shader_runner example test for this would be nice, if you had
some time to make one.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

Roland Scheidegger  changed:

   What|Removed |Added

 CC||airl...@freedesktop.org

--- Comment #1 from Roland Scheidegger  ---
I think your analysis is correct, gallivm code cannot handle this (I believe it
should work with softpipe?).
I'm not too familiar with the double support, in particular I'm not entirely
sure if such swizzles are even supposed to be supported for double opcodes,
though I don't really see a compelling reason why not (otherwise could of
course always get rid of them with a mov).
But at a quick glance, lp_build_tgsi_inst_llvm() will ignore the second and
fourth channel when fetching the arguments, emit_fetch_temporary() and others
will instead for 64bit src do a second fetch themselves, however they will
always use swizzle + 1 for it. This probably means that when the swizzle is .yx
it will instead actually fetch .yz for the double src (if you'd try .wz I think
you'd get an assertion failure).
I don't quite know how to fix this in some elegant way (as those fetch args are
propagated through lots of function, so those emit_fetch_temporary() and
friends functions simply have no knowledge what the second channel actually
should be for 64bit opcodes). Maybe Dave has some idea? I think one way or
another (at least if such swizzles are considered valid), the swizzle for the
second source has to be propagated through explicitly.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

Matwey V. Kornilov  changed:

   What|Removed |Added

 CC||bri...@vmware.com

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 107524] Broken packDouble2x32 at llvmpipe

2018-08-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107524

Bug ID: 107524
   Summary: Broken packDouble2x32 at llvmpipe
   Product: Mesa
   Version: git
  Hardware: All
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Gallium/llvmpipe
  Assignee: mesa-dev@lists.freedesktop.org
  Reporter: matwey.korni...@gmail.com
QA Contact: mesa-dev@lists.freedesktop.org

I've tested Mesa llvmpipe from recent master (e02f061b690d) and found the
following behavior.

The following fragment shader works as expected on Intel GPU (Intel HD Graphics
620 (Kaby Lake GT2)) and shows black screen at llvmpipe.

#version 330
#extension GL_ARB_gpu_shader_fp64 : require
in vec2 UV;
out vec4 color;
uniform usampler2D image_texture;
uniform sampler1D colormap;
uniform float c;
uniform float z;

void main() {
double raw_value = packDouble2x32(texture(image_texture,
UV).gr);
double value = c * (raw_value - z);
color = texture(colormap, float(clamp(value, 0.0, 1.0)));
}

At the same time, the following tiny modification fixes the shader at llvmpipe:

#version 330
#extension GL_ARB_gpu_shader_fp64 : require
in vec2 UV;
out vec4 color;
uniform usampler2D image_texture;
uniform sampler1D colormap;
uniform float c;
uniform float z;

void main() {
double raw_value = packDouble2x32(uvec2(texture(image_texture,
UV).g, texture(image_texture, UV).r));
double value = c * (raw_value - z);
color = texture(colormap, float(clamp(value, 0.0, 1.0)));
}

I've compared TGSI output from both of them and found the following difference:
In broken case DADD tries to operate on .yxyx

  5: DADD TEMP[1].xy, TEMP[1].yxyx, TEMP[2].xyxy

I am not sure that DADD knows what to do with swapped yx.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev