Summary: | [glsl]Fail to compile one advanced build-in-fuction: MIX | ||
---|---|---|---|
Product: | Mesa | Reporter: | Guang Yang <guang.a.yang> |
Component: | glsl-compiler | Assignee: | Kenneth Graunke <kenneth> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | idr, yi.sun |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | a glslparsertest case |
Patch on mailing list: [PATCH] glsl/builtins: Add missing mix(genType, genType, bvec) built-ins. I'll commit it tomorrow if there are no objections. Thanks for the report! commit 7ccf04ebcf6284a68ab6c571dabc5f3e0c6b740b Author: Kenneth Graunke <kenneth@whitecape.org> Date: Thu Jan 5 13:54:41 2012 -0800 i965/vs: Fix invalid array access in copy propagation. Accessing virtual_grf_reg_map[inst->dst.reg] is invalid if inst->dst.file != GRF. Since is_direct_copy already implies a GRF destination, we can just move the check earlier. Fixes a regression in commit 07ee9f374f2946f852896e9264c7fa83eafc3f16. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44302 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> |
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.
Created attachment 55146 [details] a glslparsertest case System Environment: -------------------------- Arch: x86_64 Platform: SandyBridge Libdrm: (master)2.4.29-17-ga9dd34a7ee9d03d357e15f045ab85a12f6f6e4b8 Mesa: (master)4535874c1a6da74d9130e494d514284302e4d08e Xserver: (master)xorg-server-1.11.99.901 Xf86_video_intel: (master)2.17.0-286-g04a6260016fb5ebefc1056ed6acf5001ec535d5c Cairo: (master)6816f70da54e730e88b98c8592aa6fc84e082928 Kernel: (drm-intel-next)097354eb14fa94d31a09c64d640643f58e4a5a9a Bug detailed description: ------------------------- when we use the build-in-function mix(float, float, bool),it failes to compile a vertex shader,and the error is : error: no matching function for call to `mix(float, float, bool)' error: candidates are: float mix(float, float, float) This issue occurs in version 1.3,but in the GLSLangSpec.1.30 ,we find a new Syntax as: genType mix (genType x,genType y,bvec a), and the Description is: Selects which vector each returned component comes from. For a component of a that is false, the corresponding component of x is returned. For a component of a that is true, the corresponding component of y is returned. Components of x and y that are not selected are allowed to be invalid floating point values and will have no effect on the results. Thus, this provides different functionality than genType mix(genType x, genType y, genType(a)) where a is a Boolean vector. Below cases are failed cases with MIX: glsl-bif-com(advanced.mix.float) glsl-bif-com(advanced.mix.vec2) glsl-bif-com(advanced.mix.vec3) glsl-bif-com(advanced.mix.vec4)