7#ifndef PXR_IMAGING_HGI_TEXTURE_H
8#define PXR_IMAGING_HGI_TEXTURE_H
12#include "pxr/imaging/hgi/api.h"
13#include "pxr/imaging/hgi/enums.h"
14#include "pxr/imaging/hgi/handle.h"
15#include "pxr/imaging/hgi/types.h"
20PXR_NAMESPACE_OPEN_SCOPE
39 HgiComponentSwizzle r;
40 HgiComponentSwizzle g;
41 HgiComponentSwizzle b;
42 HgiComponentSwizzle a;
94 , format(HgiFormatInvalid)
100 , type(HgiTextureType2D)
104 , sampleCount(HgiSampleCount1)
106 , initialData(
nullptr)
109 std::string debugName;
110 HgiTextureUsage usage;
117 HgiSampleCount sampleCount;
118 size_t pixelsByteSize;
119 void const* initialData;
197using HgiTextureHandleVector = std::vector<HgiTextureHandle>;
231 : format(HgiFormatInvalid)
235 , sourceFirstLayer(0)
239 std::string debugName;
244 uint16_t sourceFirstLayer;
245 uint16_t sourceFirstMip;
303using HgiTextureViewHandleVector = std::vector<HgiTextureViewHandle>;
305PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 3 int components.
Represents a graphics platform independent GPU texture resource.
virtual HGI_API uint64_t GetRawResource() const =0
This function returns the handle to the Hgi backend's gpu resource, cast to a uint64_t.
HGI_API HgiTextureDesc const & GetDescriptor() const
The descriptor describes the object.
virtual HGI_API size_t GetByteSizeOfResource() const =0
Returns the byte size of the GPU texture.
virtual HGI_API HgiTextureUsage SubmitLayoutChange(HgiTextureUsage newLayout)=0
This function initiates a layout change process on this texture resource.
Represents a graphics platform independent GPU texture view resource.
HGI_API void SetViewTexture(HgiTextureHandle const &handle)
Set the handle to the texture that aliases another texture.
HGI_API HgiTextureHandle const & GetViewTexture() const
Returns the handle to the texture that aliases another texture.
Describes color component mapping.
Describes the properties needed to create a GPU texture.
Describes the properties needed to create a GPU texture view from an existing GPU texture object.