{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1870","repository_url":"https://api.github.com/repos/KhronosGroup/WebGL","labels_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1870/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1870/comments","events_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1870/events","html_url":"https://github.com/KhronosGroup/WebGL/issues/1870","id":165146092,"number":1870,"title":"D3D11 missing shadow sampler functions","user":{"login":"vonture","id":3650582,"avatar_url":"https://avatars.githubusercontent.com/u/3650582?v=3","gravatar_id":"","url":"https://api.github.com/users/vonture","html_url":"https://github.com/vonture","followers_url":"https://api.github.com/users/vonture/followers","following_url":"https://api.github.com/users/vonture/following{/other_user}","gists_url":"https://api.github.com/users/vonture/gists{/gist_id}","starred_url":"https://api.github.com/users/vonture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vonture/subscriptions","organizations_url":"https://api.github.com/users/vonture/orgs","repos_url":"https://api.github.com/users/vonture/repos","events_url":"https://api.github.com/users/vonture/events{/privacy}","received_events_url":"https://api.github.com/users/vonture/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-12T18:22:22Z","updated_at":"2016-07-12T20:26:33Z","closed_at":null,"body":"After investigation failing WebGL2 tests in ANGLE, I determined that a few sampler functions related to shadow samplers are missing from HLSL.  The missing functions are:\r\n\r\nVertex Shader: Any sampling from sampler2DShadow and samplerCubeShadow sampler. The corresponding HLSL function, [SampleCmp](https://msdn.microsoft.com/en-us/library/windows/desktop/bb509696.aspx), is not available in the vertex shader.  ANGLE currently fails shader compilation if these functions are used.\r\n\r\nFragment Shader: Sampling from a sampler2DShadow or samplerCubeShadow sampler using the textureLod, textureLodOffset, textureProjLod, textureGrad, textureProjGrad, textureProjGradOffset functions (pretty much any sampling function that uses Lod or Grad).  The HLSL SampleCmp function is not overloaded as much as the other HLSL sampling functions and does not include these parameters.  ANGLE currently ignores these parameters and does the equivalent of the regular texture function.\r\n\r\nAs far as I can tell, the only solution is to emulate this missing functionality by passing parameters of the sampler (compare mode and compare func) into the shader as uniforms and using a switch statement to perform the operations.  This work will be done but for the sake of pushing WebGL2 out faster, I propose that these tests are moved to the 2.0.1 suite.\r\n\r\nIn the mean-time, is there a preference for making the behaviour when using these functions consistent? Should ANGLE fail shader compilation in all of these cases or should the vertex shader case be updated to return some dummy value?\r\n\r\nFor reference, the failing webgl tests are:\r\ndeqp/functional/gles3/shadertexturefunction/texturelod.html\r\ndeqp/functional/gles3/shadertexturefunction/texturelodoffset.html\r\ndeqp/functional/gles3/shadertexturefunction/textureprojlod.html\r\ndeqp/functional/gles3/shadertexturefunction/textureprojlodoffset.html\r\ndeqp/functional/gles3/shadertexturefunction/texturegrad.html\r\ndeqp/functional/gles3/shadertexturefunction/texturegradoffset.html\r\ndeqp/functional/gles3/shadertexturefunction/textureprojgrad.html\r\ndeqp/functional/gles3/shadertexturefunction/textureprojgradoffset.html\r\n\r\nAnd the specific failing deqp tests are:\r\ndEQP-GLES3.functional.shaders.texture_functions.texturelod.sampler2dshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.texturelod.sampler2dshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.texturelodoffset.sampler2dshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.texturelodoffset.sampler2dshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.textureprojlod.sampler2dshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.textureprojlod.sampler2dshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2dshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2dshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2darrayshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2darrayshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.texturegradoffset.sampler2dshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.texturegradoffset.sampler2dshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.texturegradoffset.sampler2darrayshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.texturegradoffset.sampler2darrayshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.textureprojgrad.sampler2dshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.textureprojgrad.sampler2dshadow_fragment\r\ndEQP-GLES3.functional.shaders.texture_functions.textureprojgradoffset.sampler2dshadow_vertex\r\ndEQP-GLES3.functional.shaders.texture_functions.textureprojgradoffset.sampler2dshadow_fragment"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/comments/232169454","html_url":"https://github.com/KhronosGroup/WebGL/issues/1870#issuecomment-232169454","issue_url":"https://api.github.com/repos/KhronosGroup/WebGL/issues/1870","id":232169454,"user":{"login":"vonture","id":3650582,"avatar_url":"https://avatars.githubusercontent.com/u/3650582?v=3","gravatar_id":"","url":"https://api.github.com/users/vonture","html_url":"https://github.com/vonture","followers_url":"https://api.github.com/users/vonture/followers","following_url":"https://api.github.com/users/vonture/following{/other_user}","gists_url":"https://api.github.com/users/vonture/gists{/gist_id}","starred_url":"https://api.github.com/users/vonture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vonture/subscriptions","organizations_url":"https://api.github.com/users/vonture/orgs","repos_url":"https://api.github.com/users/vonture/repos","events_url":"https://api.github.com/users/vonture/events{/privacy}","received_events_url":"https://api.github.com/users/vonture/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T20:26:33Z","updated_at":"2016-07-12T20:26:33Z","body":"I'd agree that it's probably best to just fail compilation for these functions."}}
{"actor":{"display_login":"vonture"}}