Bug 90580 - [HSW bisected] integer multiplication bug
Summary: [HSW bisected] integer multiplication bug
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Matt Turner
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-22 07:35 UTC by Tapani Pälli
Modified: 2015-05-28 21:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test (288 bytes, text/plain)
2015-05-22 07:36 UTC, Tapani Pälli
Details

Description Tapani Pälli 2015-05-22 07:35:43 UTC
Shader doing integer multiplication fails like this:

--- 8< ---
shader_runner: brw_ir_fs.h:195: fs_reg half(fs_reg, unsigned int): Assertion `!"Cannot take half of this register type"' failed.
Aborted (core dumped)


Bisected to:

commit 4ec09c77471e39e6ff81c99f1edde2e1713a7f24
Author: Matt Turner <mattst88@gmail.com>
Date:   Tue May 12 15:51:44 2015 -0700

    i965/fs: Support integer multiplication in SIMD16 on Haswell.
    
    Ivybridge (and presumably Baytrail) have a bug that prevents this from
    working.
    
    Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Comment 1 Tapani Pälli 2015-05-22 07:36:32 UTC
Created attachment 115967 [details]
test

piglit shader_test case to hit the bug
Comment 2 Tapani Pälli 2015-05-22 07:38:42 UTC
Following conformance test hits this issue:

ES3-CTS.shaders.loops.for_constant_iterations.unconditional_break_fragment
Comment 3 Tapani Pälli 2015-05-22 07:47:23 UTC
Oops, the test I posted actually fails like this:

---8< ---
shader_runner: brw_fs_generator.cpp:106: brw_reg brw_reg_from_fs_reg(fs_reg*): Assertion `reg->type == reg->fixed_hw_reg.type' failed.
Aborted (core dumped)
---8< ---

with some changes it failed like in comment #1, I can try to get them back.
Comment 4 Tapani Pälli 2015-05-22 07:58:23 UTC
(In reply to Tapani Pälli from comment #3)
> with some changes it failed like in comment #1, I can try to get them back.

nope, that only happens when bisecting between commits which I believe fix this thing, so the relevant error is what comes with the current master:

shader_runner: brw_fs_generator.cpp:106: brw_reg brw_reg_from_fs_reg(fs_reg*): Assertion `reg->type == reg->fixed_hw_reg.type' failed.
Aborted (core dumped)
Comment 5 Matt Turner 2015-05-22 17:35:29 UTC
Oh wow, we end up propagating the conditional_mod to an integer multiply that we'll have to lower:

> {  1}    2: mul.le.f0.0(8) null:D, vgrf0:D, vgrf0:D 

which then doesn't work. Thanks for the report. I'll see what I can do.
Comment 6 Matt Turner 2015-05-27 18:20:11 UTC
Patch on the list:

> i965/fs: Fix lowering of integer multiplication with cmod.
Comment 7 Matt Turner 2015-05-28 21:37:03 UTC
Fixed with

commit 0596134410a0decc2f6bba77bfedb82d308aabbe
Author: Matt Turner <mattst88@gmail.com>
Date:   Wed May 27 10:44:45 2015 -0700

    i965/fs: Fix lowering of integer multiplication with cmod.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.