bugzilla-daemon at freedesktop.org
2014-Nov-23 11:17 UTC
[Nouveau] [Bug 86618] New: [NV96] neg modifiers not working in MIN and MAX operations
https://bugs.freedesktop.org/show_bug.cgi?id=86618 Bug ID: 86618 Summary: [NV96] neg modifiers not working in MIN and MAX operations Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/nouveau Assignee: nouveau at lists.freedesktop.org Reporter: gzregozrw at wp.pl Neg modifier for source in MIN and MAX ops is ignored. Tested on git 89b9ef9. I tested it only on NV96. shader with: float x = -sin(uv.x); float d = max(0.0, x); generates: EMIT: presin f32 $r0 $r0 (8) EMIT: sin f32 $r0 $r0 (8) EMIT: mov u32 $r1 0x00000000 (8) EMIT: max f32 $r2 neg $r0 $r1 (8) Shader output is identical to version without unary minus. Only difference is lack of neg modifier. After disabling modifiers shader works as expected: --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp @@ -85,8 +85,8 @@ static const struct opProperties _initProps[] { OP_ADD, 0x3, 0x0, 0x0, 0x8, 0x2, 0x1, 0x1, 0x2 }, { OP_SUB, 0x3, 0x0, 0x0, 0x0, 0x2, 0x1, 0x1, 0x2 }, { OP_MUL, 0x3, 0x0, 0x0, 0x0, 0x2, 0x1, 0x1, 0x2 }, - { OP_MAX, 0x3, 0x3, 0x0, 0x0, 0x2, 0x1, 0x1, 0x0 }, - { OP_MIN, 0x3, 0x3, 0x0, 0x0, 0x2, 0x1, 0x1, 0x0 }, + { OP_MAX, 0x0, 0x3, 0x0, 0x0, 0x2, 0x1, 0x1, 0x0 }, + { OP_MIN, 0x0, 0x3, 0x0, 0x0, 0x2, 0x1, 0x1, 0x0 }, { OP_MAD, 0x7, 0x0, 0x0, 0x0, 0x6, 0x1, 0x1, 0x0 }, // special constraint { OP_ABS, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0 }, { OP_NEG, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0 }, After this change: EMIT: presin f32 $r0 $r0 (8) EMIT: sin f32 $r0 $r0 (8) EMIT: mov u32 $r1 0x00000000 (8) EMIT: neg f32 $r0 $r0 (8) EMIT: max f32 $r2 $r0 $r1 (8) -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20141123/1d68f1ba/attachment.html>
bugzilla-daemon at freedesktop.org
2014-Nov-23 17:20 UTC
[Nouveau] [Bug 86618] [NV96] neg modifiers not working in MIN and MAX operations
https://bugs.freedesktop.org/show_bug.cgi?id=86618 --- Comment #1 from Ilia Mirkin <imirkin at alum.mit.edu> --- Great find! However the min/max ops can actually take the neg modifiers (on either arg), but the emit logic didn't have that hooked up somehow. Does http://patchwork.freedesktop.org/patch/37356/ resolve your issue? -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20141123/799e292b/attachment.html>
bugzilla-daemon at freedesktop.org
2014-Nov-23 18:23 UTC
[Nouveau] [Bug 86618] [NV96] neg modifiers not working in MIN and MAX operations
https://bugs.freedesktop.org/show_bug.cgi?id=86618 --- Comment #2 from Grzegorz Wójcik <gzregozrw at wp.pl> --- (In reply to Ilia Mirkin from comment #1) Yes, this patch solved my issue. -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20141123/23da11aa/attachment-0001.html>
bugzilla-daemon at freedesktop.org
2014-Nov-23 20:48 UTC
[Nouveau] [Bug 86618] [NV96] neg modifiers not working in MIN and MAX operations
https://bugs.freedesktop.org/show_bug.cgi?id=86618 Ilia Mirkin <imirkin at alum.mit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Ilia Mirkin <imirkin at alum.mit.edu> --- Pushed as 7d07083c upstream, should be backported to 10.3 and 10.4 releases. -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20141123/faab8853/attachment.html>
Maybe Matching Threads
- [Bug 78161] New: [NV96] Artifacts in output of fragment program containing not unrolled loops with conditional break
- [PATCH] nv50/ir: Fold sat into mad
- [PATCH] nv50/ir: Add sat modifier for mul
- [PATCH] nv50/ir: set neg modifiers on min/max args
- [PATCH] nv50: TXF already has integer arguments, don't try to convert from f32