{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS/issues/48","repository_url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS","labels_url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS/issues/48/comments","events_url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS/issues/48/events","html_url":"https://github.com/KhronosGroup/VK-GL-CTS/issues/48","id":238390392,"number":48,"title":"Tessellation Control Shaders access out-of-bounds input patch vertices","user":{"login":"imirkin","id":817874,"avatar_url":"https://avatars1.githubusercontent.com/u/817874?v=3","gravatar_id":"","url":"https://api.github.com/users/imirkin","html_url":"https://github.com/imirkin","followers_url":"https://api.github.com/users/imirkin/followers","following_url":"https://api.github.com/users/imirkin/following{/other_user}","gists_url":"https://api.github.com/users/imirkin/gists{/gist_id}","starred_url":"https://api.github.com/users/imirkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imirkin/subscriptions","organizations_url":"https://api.github.com/users/imirkin/orgs","repos_url":"https://api.github.com/users/imirkin/repos","events_url":"https://api.github.com/users/imirkin/events{/privacy}","received_events_url":"https://api.github.com/users/imirkin/received_events","type":"User","site_admin":false},"labels":[{"id":317136212,"url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS/labels/bug","name":"bug","color":"fc2929","default":true},{"id":525313707,"url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS/labels/OpenGL","name":"OpenGL","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":{"login":"alegal-arm","id":25096944,"avatar_url":"https://avatars3.githubusercontent.com/u/25096944?v=3","gravatar_id":"","url":"https://api.github.com/users/alegal-arm","html_url":"https://github.com/alegal-arm","followers_url":"https://api.github.com/users/alegal-arm/followers","following_url":"https://api.github.com/users/alegal-arm/following{/other_user}","gists_url":"https://api.github.com/users/alegal-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/alegal-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alegal-arm/subscriptions","organizations_url":"https://api.github.com/users/alegal-arm/orgs","repos_url":"https://api.github.com/users/alegal-arm/repos","events_url":"https://api.github.com/users/alegal-arm/events{/privacy}","received_events_url":"https://api.github.com/users/alegal-arm/received_events","type":"User","site_admin":false},"assignees":[{"login":"alegal-arm","id":25096944,"avatar_url":"https://avatars3.githubusercontent.com/u/25096944?v=3","gravatar_id":"","url":"https://api.github.com/users/alegal-arm","html_url":"https://github.com/alegal-arm","followers_url":"https://api.github.com/users/alegal-arm/followers","following_url":"https://api.github.com/users/alegal-arm/following{/other_user}","gists_url":"https://api.github.com/users/alegal-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/alegal-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alegal-arm/subscriptions","organizations_url":"https://api.github.com/users/alegal-arm/orgs","repos_url":"https://api.github.com/users/alegal-arm/repos","events_url":"https://api.github.com/users/alegal-arm/events{/privacy}","received_events_url":"https://api.github.com/users/alegal-arm/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-06-25T16:22:04Z","updated_at":"2017-07-11T08:00:30Z","closed_at":"2017-07-11T08:00:30Z","body":"I'm seeing an issue with the following test, although it's possible others are also affected:\r\n\r\n`KHR-GL45.shader_subroutine.subroutines_with_separate_shader_objects`\r\n\r\ngenerates a TCS that looks like\r\n```\r\n#version 400\r\n\r\n#extension GL_ARB_shader_subroutine : require\r\n\r\nlayout(vertices = 4) out;\r\nsubroutine void SubroutineTCType(inout vec4 result);\r\n\r\nsubroutine(SubroutineTCType) void SubroutineTC1(inout vec4 result)\r\n{\r\n    result += vec4(0, 0.25, 0, 0);\r\n}\r\nsubroutine(SubroutineTCType) void SubroutineTC2(inout vec4 result)\r\n{\r\n    result += vec4(0, 0.025, 0, 0);\r\n}\r\n\r\nsubroutine uniform SubroutineTCType function;\r\n\r\nin VS_DATA\r\n{\r\n    vec4 data;\r\n} in_vs[];\r\n\r\nout TC_DATA\r\n{\r\n    vec4 data;\r\n} out_tc[];\r\n\r\nin gl_PerVertex { vec4 gl_Position; } gl_in[];\r\nout gl_PerVertex { vec4 gl_Position; } gl_out[];\r\nvoid main()\r\n{\r\n    gl_TessLevelOuter[0]                = 1.0;\r\n    gl_TessLevelOuter[1]                = 1.0;\r\n    gl_TessLevelOuter[2]                = 1.0;\r\n    gl_TessLevelOuter[3]                = 1.0;\r\n    gl_TessLevelInner[0]                = 1.0;\r\n    gl_TessLevelInner[1]                = 1.0;\r\n    gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\r\n    out_tc[gl_InvocationID].data        = in_vs[0].data;\r\n\r\n    function(out_tc[gl_InvocationID].data);\r\n}\r\n```\r\n\r\nHowever the `GL_PATCH_VERTICES` parameter is set to 1. Since invocations are done based on the TCS <-> TES patch size (4 in this case), gl_in[gl_InvocationID] will refer to an out-of-bounds vertex. I believe that this behavior is illegal with GL_ARB_tessellation_shader. In OpenGL 4.5 Core Specification, section 11.2.1.2.2, it says\r\n\r\n> Behavior is undefined if gl_in[] is indexed with a vertex index greater than or equal to the current patch size.\r\n\r\nThis causes NVIDIA hardware to generate a `OOR_ADDR` (Out Of Range Address) error condition."},"comment":{"url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS/issues/comments/314365831","html_url":"https://github.com/KhronosGroup/VK-GL-CTS/issues/48#issuecomment-314365831","issue_url":"https://api.github.com/repos/KhronosGroup/VK-GL-CTS/issues/48","id":314365831,"user":{"login":"alegal-arm","id":25096944,"avatar_url":"https://avatars3.githubusercontent.com/u/25096944?v=3","gravatar_id":"","url":"https://api.github.com/users/alegal-arm","html_url":"https://github.com/alegal-arm","followers_url":"https://api.github.com/users/alegal-arm/followers","following_url":"https://api.github.com/users/alegal-arm/following{/other_user}","gists_url":"https://api.github.com/users/alegal-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/alegal-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alegal-arm/subscriptions","organizations_url":"https://api.github.com/users/alegal-arm/orgs","repos_url":"https://api.github.com/users/alegal-arm/repos","events_url":"https://api.github.com/users/alegal-arm/events{/privacy}","received_events_url":"https://api.github.com/users/alegal-arm/received_events","type":"User","site_admin":false},"created_at":"2017-07-11T08:00:30Z","updated_at":"2017-07-11T08:00:30Z","body":"Pull request https://github.com/KhronosGroup/VK-GL-CTS/pull/49 has been merged."}}
{"actor":{"display_login":"alegal-arm"}}