Bug 102382 - nv50ir: isImmediate doesn't properly work for integers if Value is typed as float
Summary: nv50ir: isImmediate doesn't properly work for integers if Value is typed as f...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-23 21:18 UTC by Karol Herbst
Modified: 2017-08-24 22:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
TGSI (437 bytes, text/plain)
2017-08-23 21:18 UTC, Karol Herbst
no flags Details

Description Karol Herbst 2017-08-23 21:18:46 UTC
Created attachment 133728 [details]
TGSI

codegen should generate a texfetch instruction with a lod according to IMM[1].xxxx, which is of value 2, but in https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp#n140 the isInteger(0) call assumes the Value being a F32, which leads to a is 2.8E-45 == 0 check returning true resulting into the lod argument being removed from texfetch.

This causes a fail in the KHR-GL44.robust_buffer_access_behavior.texel_fetch CTS test.

Other isInteger calls might be broken as well where an immediate of type float is interpreted as int by the instruction.
Comment 1 Karol Herbst 2017-08-24 22:14:11 UTC
nothing was wrong with isImmediate, but the tetexfetch was fixed in 96be442b7795a6eb3d50f4061f2b98dddc39aa4d


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.