Hash :
bd6ae4aa
        
        Author :
  
        
        Date :
2018-01-29T15:51:18
        
      
Vulkan: Don't create zero-sized textures. Make sure the old resources are deleted but do not create new resources. BUG=angleproject:2161 Change-Id: Ia6685e5c67b160d9bcd503983aee9607b2bd402c Reviewed-on: https://chromium-review.googlesource.com/891644 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@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
//
// Copyright 2016 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.
//
// RenderTargetVk:
//   Wrapper around a Vulkan renderable resource, using an ImageView.
//
#ifndef LIBANGLE_RENDERER_VULKAN_RENDERTARGETVK_H_
#define LIBANGLE_RENDERER_VULKAN_RENDERTARGETVK_H_
#include <vulkan/vulkan.h>
#include "libANGLE/FramebufferAttachment.h"
namespace rx
{
class ResourceVk;
namespace vk
{
struct Format;
class Image;
class ImageView;
}
// This is a very light-weight class that does not own to the resources it points to.
// It's meant only to copy across some information from a FramebufferAttachment to the
// business rendering logic.
class RenderTargetVk final : public FramebufferAttachmentRenderTarget
{
  public:
    RenderTargetVk();
    void reset();
    const vk::Format *format;
    vk::Image *image;
    vk::ImageView *imageView;
    gl::Extents extents;
    VkSampleCountFlagBits samples;
    ResourceVk *resource;
};
}  // namespace rx
#endif  // LIBANGLE_RENDERER_VULKAN_RENDERTARGETVK_H_