Front-end: Warn for likely missed change in default precisions.
This is part of the change to have desktop shaders respect precision qualifiers on Vulkan, but since the defaults are all highp, and that's different from ES fragment shaders, detect likely cases and warn about them (but being careful to not be too noisy if it's unlikely to be a problem).
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
spv.aggOps.frag
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
WARNING: 0:4: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
|
||||
"precision mediump int; precision highp float;"
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
spv.structAssignment.frag
|
||||
WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
|
||||
"precision mediump int; precision highp float;"
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
@@ -33,6 +36,10 @@ Linked fragment stage:
|
||||
Name 40 "samp2D"
|
||||
Name 44 "coord"
|
||||
Name 49 "foo"
|
||||
MemberDecorate 8(lunarStruct1) 0 RelaxedPrecision
|
||||
MemberDecorate 9(lunarStruct2) 0 RelaxedPrecision
|
||||
MemberDecorate 10(lunarStruct3) 1 RelaxedPrecision
|
||||
Decorate 16 RelaxedPrecision
|
||||
Decorate 40(samp2D) DescriptorSet 0
|
||||
Decorate 44(coord) RelaxedPrecision
|
||||
Decorate 45 RelaxedPrecision
|
||||
|
||||
@@ -33,6 +33,8 @@ ERROR: 0:67: 'uniform' : no qualifiers allowed for function return
|
||||
ERROR: 0:69: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
|
||||
ERROR: 0:73: 'texture' : no matching overloaded function found
|
||||
ERROR: 0:74: 'imageStore' : no matching overloaded function found
|
||||
WARNING: 0:82: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
|
||||
"precision mediump int; precision highp float;"
|
||||
ERROR: 0:91: 'call argument' : sampler constructor must appear at point of use
|
||||
ERROR: 0:92: 'call argument' : sampler constructor must appear at point of use
|
||||
ERROR: 0:93: ',' : sampler constructor must appear at point of use
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#version 450
|
||||
precision mediump int; precision highp float;
|
||||
layout(location=1) in highp vec4 v;
|
||||
void main (void)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#version 140
|
||||
|
||||
precision mediump int;
|
||||
|
||||
uniform sampler2D samp2D;
|
||||
in mediump vec2 coord;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user