mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 23:20:23 +01:00
glsl/lower_precision: Add a unit test that I thought we might fail at.
If you lowered precision too late, it would be easy to break this. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21666>
This commit is contained in:
parent
9a2d66f5a5
commit
41be2caa6d
1 changed files with 12 additions and 0 deletions
|
|
@ -2287,6 +2287,18 @@ TESTS = [
|
|||
""",
|
||||
r'\(expression vec4 \* \(swiz xxxx \(var_ref a\) \)\(expression float f162f \(var_ref b\) \) \)'),
|
||||
|
||||
Test("respect copies",
|
||||
"""
|
||||
uniform mediump float a, b;
|
||||
|
||||
void main()
|
||||
{
|
||||
highp float x = a;
|
||||
gl_FragColor.x = x * b;
|
||||
}
|
||||
""",
|
||||
r'expression float \* \(expression float f162f \(var_ref a\) \) \(expression float f162f \(var_ref b\) \) '), # should be uint16_t
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue