Hash :
4f3b207d
Author :
Date :
2019-01-01T14:48:25
Vulkan: Shader path for texture-to-texture copy This change implements glCopy[Sub]TextureCHROMIUM in GPU. As with the previous change implementing glCopyTex[Sub]Image2D, it currently only selects the shader path if the texture is already defined. Bug: angleproject:2958 Change-Id: Ia1b5625f92e6c9f91807c9b601e5c34d2d5e5c30 Reviewed-on: https://chromium-review.googlesource.com/c/1392394 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// FeaturesVk.h: Optional features for the Vulkan renderer.
//
#ifndef ANGLE_PLATFORM_FEATURESVK_H_
#define ANGLE_PLATFORM_FEATURESVK_H_
namespace angle
{
struct FeaturesVk
{
// Line segment rasterization must follow OpenGL rules. This means using an algorithm similar
// to Bresenham's. Vulkan uses a different algorithm. This feature enables the use of pixel
// shader patching to implement OpenGL basic line rasterization rules. This feature will
// normally always be enabled. Exposing it as an option enables performance testing.
bool basicGLLineRasterization = false;
// Flips the viewport to render upside-down. This has the effect to render the same way as
// OpenGL. If this feature gets enabled, we enable the KHR_MAINTENANCE_1 extension to allow
// negative viewports. We inverse rendering to the backbuffer by reversing the height of the
// viewport and increasing Y by the height. So if the viewport was (0,0,width,height), it
// becomes (0, height, width, -height). Unfortunately, when we start doing this, we also need
// to adjust a lot of places since the rendering now happens upside-down. Affected places so
// far:
// -readPixels
// -copyTexImage
// -framebuffer blit
// -generating mipmaps
// -Point sprites tests
// -texStorage
bool flipViewportY = false;
// Add an extra copy region when using vkCmdCopyBuffer as the Windows Intel driver seems
// to have a bug where the last region is ignored.
bool extraCopyBufferRegion = false;
// This flag is added for the sole purpose of end2end tests, to test the correctness
// of various algorithms when a fallback format is used, such as using a packed format to
// emulate a depth- or stencil-only format.
bool forceFallbackFormat = false;
// On some NVIDIA drivers the point size range reported from the API is inconsistent with the
// actual behavior. Clamp the point size to the value from the API to fix this.
// Tracked in http://anglebug.com/2970.
bool clampPointSize = false;
// On some android devices, the memory barrier between the compute shader that converts vertex
// attributes and the vertex shader that reads from it is ineffective. Only known workaround is
// to perform a flush after the conversion. http://anglebug.com/3016
bool flushAfterVertexConversion = false;
// Whether the VkDevice supports the VK_KHR_incremental_present extension, on which the
// EGL_KHR_swap_buffers_with_damage extension can be layered.
bool supportsIncrementalPresent = false;
// Whether texture copies on cube map targets should be done on GPU. This is a workaround for
// Intel drivers on windows that have an issue with creating single-layer views on cube map
// textures.
bool forceCpuPathForCubeMapCopy = false;
};
} // namespace angle
#endif // ANGLE_PLATFORM_FEATURESVK_H_