summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_uvd.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-08-09 13:32:40 -0700
committerIan Romanick <[email protected]>2013-08-13 20:47:20 -0700
commit830f4df993b41fc90c776b19f77f77a29ce0e7f4 (patch)
tree2aac8e1a5e9624f609d24dd6012313ecab193b1a /src/gallium/drivers/radeon/radeon_uvd.c
parent825f9ff5d3a0c4d6da20e14c34e3220be624ef8e (diff)
glsl: Emit better warnings for things that look like default precision statements
Previously we would emit a warning for empty declarations like float; We would also emit the same warning for things like highp float; However, this second case is most likely the application trying to set the default precision. This makes the compiler generate a stronger warning with some suggestion of a fix. It really seems like this should be an error. I'll bet that 100% of the time someone writes 'highp float;' the actually meant 'precision highp float;'. Alas, both AMD and NVIDIA accept this syntax, and the spec doesn't explicitly forbid it. This makes piglit's precision-05.vert generate the following warnings: 0:12(11): warning: empty declaration with precision qualifier, to set the default precision, use `precision lowp float;' 0:13(12): warning: empty declaration with precision qualifier, to set the default precision, use `precision mediump int;' v2: Add { } around a one-line if body and fix a comment. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_uvd.c')
0 files changed, 0 insertions, 0 deletions