Vulkan: Use one triangle for full-screen utils

In tiling GPUs, using two triangles means the tiles intersecting the
seam would be processed twice.

Bug: angleproject:4936
Change-Id: Ib10b77e6ab15bba932f0e4e970e10ed5a8399cdd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372623
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Shahbaz Youssefi 2020-08-24 11:29:33 -04:00 коммит произвёл Commit Bot
Родитель 88dd1a5995
Коммит 6f52192135
4 изменённых файлов: 34 добавлений и 40 удалений

Просмотреть файл

@ -92,7 +92,7 @@
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000008.inc":
"680d2865d4350c8f36fbbdaec1b43682",
"src/libANGLE/renderer/vulkan/shaders/gen/FullScreenQuad.vert.00000000.inc":
"3a4ab796f02d3f1c306c92f7da2c68ee",
"a6f06ce133d1342fafed89305dd99bdd",
"src/libANGLE/renderer/vulkan/shaders/gen/GenerateMipmap.comp.00000000.inc":
"4e2e1e59d32aed39be0f0ae9d6c71353",
"src/libANGLE/renderer/vulkan/shaders/gen/GenerateMipmap.comp.00000001.inc":
@ -256,7 +256,7 @@
"src/libANGLE/renderer/vulkan/shaders/src/ConvertVertex.comp.json":
"f2abd98463e46c0af45e8a1a5e5af88f",
"src/libANGLE/renderer/vulkan/shaders/src/FullScreenQuad.vert":
"805ec8b2f87d4bd4242dc5b1c58ba3b4",
"fd6d015b20709364c90ff41fb687ed0f",
"src/libANGLE/renderer/vulkan/shaders/src/GenerateMipmap.comp":
"ec72e3ce787ca499c684eaa7c96bcc74",
"src/libANGLE/renderer/vulkan/shaders/src/GenerateMipmap.comp.json":

Просмотреть файл

@ -1400,7 +1400,7 @@ angle::Result UtilsVk::clearFramebuffer(ContextVk *contextVk,
// Make sure this draw call doesn't count towards occlusion query results.
ANGLE_TRY(contextVk->pauseOcclusionQueryIfActive());
commandBuffer->draw(6, 0);
commandBuffer->draw(3, 0);
return contextVk->resumeOcclusionQueryIfActive();
}
@ -1669,7 +1669,7 @@ angle::Result UtilsVk::blitResolveImpl(ContextVk *contextVk,
// Note: this utility starts the render pass directly, thus bypassing
// ContextVk::startRenderPass. As such, occlusion queries are not enabled.
commandBuffer->draw(6, 0);
commandBuffer->draw(3, 0);
descriptorPoolBinding.reset();
@ -2053,7 +2053,7 @@ angle::Result UtilsVk::copyImage(ContextVk *contextVk,
// Note: this utility creates its own framebuffer, thus bypassing ContextVk::startRenderPass.
// As such, occlusion queries are not enabled.
commandBuffer->draw(6, 0);
commandBuffer->draw(3, 0);
descriptorPoolBinding.reset();
@ -2228,7 +2228,7 @@ angle::Result UtilsVk::unresolve(ContextVk *contextVk,
// This draw call is made before ContextVk gets a chance to start the occlusion query. As such,
// occlusion queries are not enabled.
commandBuffer->draw(6, 0);
commandBuffer->draw(3, 0);
return angle::Result::Continue;
}

Просмотреть файл

@ -10,30 +10,30 @@
#pragma once
constexpr uint8_t kFullScreenQuad_vert_00000000[] = {
0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0x4d,0x92,0x4d,0x4e,0xc3,0x40,
0x0c,0x85,0x9d,0x84,0xa6,0x6d,0xa0,0x69,0xfa,0x97,0x96,0xfe,0xa4,0x2d,0x2d,0x14,
0x01,0xaa,0x58,0x00,0x42,0x42,0x05,0xb1,0x0a,0x8b,0x2e,0x40,0x9c,0x00,0x89,0x0d,
0x0b,0xd8,0xc0,0x01,0xb8,0x19,0xd7,0x62,0x83,0xc4,0xf3,0xcc,0x1b,0x69,0x46,0x72,
0x66,0xfc,0xf9,0xc5,0xf6,0x38,0x89,0xc2,0x45,0x55,0x24,0x90,0x44,0x6a,0x72,0x2c,
0x76,0xb5,0x24,0x04,0x11,0xd9,0x95,0xd8,0xec,0xe5,0xf6,0x79,0xbb,0xfe,0xfc,0x7a,
0x5d,0x5f,0x5c,0x9e,0x6b,0x3c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9,0x9a,0xf8,0x96,0x14,0xe3,0x3a,0x95,0xbf,0x2d,
0x4d,0x7d,0xf8,0x65,0xf1,0x89,0x0d,0x71,0x62,0xad,0x3c,0x47,0x59,0x36,0x02,0x6f,
0xd7,0xd3,0x79,0x23,0xbf,0x22,0x8c,0x75,0x12,0xd5,0x09,0x54,0x27,0x71,0xef,0x96,
0x2d,0xea,0x4a,0x95,0x33,0xf4,0x74,0xd4,0x74,0x9f,0x3a,0xea,0xd8,0x53,0x61,0x8c,
0xc7,0xae,0x5f,0xae,0xef,0x9f,0x33,0xbc,0x13,0x63,0x7b,0xc2,0x1a,0x1e,0xa7,0xe9,
0x38,0xcb,0x65,0xce,0x69,0x09,0x23,0x27,0xc7,0xda,0xf2,0x9b,0x0e,0x8b,0x5d,0xad,
0x7d,0xe5,0x6b,0x29,0xce,0x1e,0x3b,0xd2,0x9f,0xa8,0xc7,0x8e,0x66,0x1c,0x28,0xde,
0xd7,0xdb,0xd4,0xe5,0x0f,0xe5,0xa7,0x9e,0x9e,0xb1,0xf7,0xd6,0xf4,0x27,0x59,0x0f,
0xf7,0xe4,0x1f,0xa9,0x5f,0xde,0xb9,0x82,0xb6,0x50,0x73,0x32,0xe1,0xbf,0x40,0x0a,
0xaa,0xcd,0x5a,0x03,0x71,0x6f,0xf5,0x9e,0x3d,0xe9,0xb9,0x03,0x7b,0xa0,0x1e,0x1e,
0x70,0x83,0x3a,0x0e,0xc4,0xef,0x89,0x9f,0x6a,0x1e,0xc4,0x9f,0xc1,0xa1,0x96,0xa9,
0xf7,0x2f,0xe4,0xd8,0xcc,0x9b,0xdb,0x13,0xaa,0xb1,0xde,0xa1,0xb8,0x33,0xf5,0x33,
0x51,0x1d,0xea,0x9f,0x6b,0xee,0x55,0xe9,0x98,0x8b,0xff,0x87,0x0c,0xd7,0xb0,0x7f,
0x5f,0x76,0x90,0xde,0x6c,0x03,0x00,0x00
};
// Generated from:
@ -41,12 +41,9 @@ constexpr uint8_t kFullScreenQuad_vert_00000000[] = {
// #version 450 core
//
// const vec2 kQuadVertices[]= {
// vec2(- 1, 1),
// vec2(- 1, - 1),
// vec2(1, - 1),
// vec2(- 1, 1),
// vec2(1, - 1),
// vec2(1, 1),
// vec2(3, - 1),
// vec2(- 1, 3),
// };
//
// void main()

Просмотреть файл

@ -8,12 +8,9 @@
#version 450 core
const vec2 kQuadVertices[] = {
vec2(-1, 1),
vec2(-1, -1),
vec2(1, -1),
vec2(-1, 1),
vec2(1, -1),
vec2(1, 1),
vec2(3, -1),
vec2(-1, 3),
};
void main()