diff options
Diffstat (limited to 'gfx/angle/src/libANGLE/angletypes.h')
-rwxr-xr-x | gfx/angle/src/libANGLE/angletypes.h | 91 |
1 files changed, 63 insertions, 28 deletions
diff --git a/gfx/angle/src/libANGLE/angletypes.h b/gfx/angle/src/libANGLE/angletypes.h index 4c345c3d0..e6923c8ad 100755 --- a/gfx/angle/src/libANGLE/angletypes.h +++ b/gfx/angle/src/libANGLE/angletypes.h @@ -192,46 +192,64 @@ struct SamplerState GLenum compareMode; GLenum compareFunc; - - GLenum sRGBDecode; }; bool operator==(const SamplerState &a, const SamplerState &b); bool operator!=(const SamplerState &a, const SamplerState &b); -struct PixelStoreStateBase +struct PixelUnpackState { BindingPointer<Buffer> pixelBuffer; - GLint alignment = 4; - GLint rowLength = 0; - GLint skipRows = 0; - GLint skipPixels = 0; - GLint imageHeight = 0; - GLint skipImages = 0; -}; - -struct PixelUnpackState : PixelStoreStateBase -{ - PixelUnpackState() {} + GLint alignment; + GLint rowLength; + GLint skipRows; + GLint skipPixels; + GLint imageHeight; + GLint skipImages; + + PixelUnpackState() + : alignment(4), + rowLength(0), + skipRows(0), + skipPixels(0), + imageHeight(0), + skipImages(0) + {} PixelUnpackState(GLint alignmentIn, GLint rowLengthIn) - { - alignment = alignmentIn; - rowLength = rowLengthIn; - } + : alignment(alignmentIn), + rowLength(rowLengthIn), + skipRows(0), + skipPixels(0), + imageHeight(0), + skipImages(0) + {} }; -struct PixelPackState : PixelStoreStateBase +struct PixelPackState { - PixelPackState() {} - - PixelPackState(GLint alignmentIn, bool reverseRowOrderIn) - : reverseRowOrder(reverseRowOrderIn) - { - alignment = alignmentIn; - } - - bool reverseRowOrder = false; + BindingPointer<Buffer> pixelBuffer; + GLint alignment; + bool reverseRowOrder; + GLint rowLength; + GLint skipRows; + GLint skipPixels; + + PixelPackState() + : alignment(4), + reverseRowOrder(false), + rowLength(0), + skipRows(0), + skipPixels(0) + {} + + explicit PixelPackState(GLint alignmentIn, bool reverseRowOrderIn) + : alignment(alignmentIn), + reverseRowOrder(reverseRowOrderIn), + rowLength(0), + skipRows(0), + skipPixels(0) + {} }; // Used in Program and VertexArray. @@ -248,6 +266,17 @@ using ResourceMap = std::unordered_map<GLuint, ResourceT *>; namespace rx { +enum VendorID : uint32_t +{ + VENDOR_ID_UNKNOWN = 0x0, + VENDOR_ID_AMD = 0x1002, + VENDOR_ID_INTEL = 0x8086, + VENDOR_ID_NVIDIA = 0x10DE, + // This is Qualcomm PCI Vendor ID. + // Android doesn't have a PCI bus, but all we need is a unique id. + VENDOR_ID_QUALCOMM = 0x5143, +}; + // A macro that determines whether an object has a given runtime type. #if defined(__clang__) #if __has_feature(cxx_rtti) @@ -288,6 +317,12 @@ inline DestT *GetImplAs(SrcT *src) return GetAs<DestT>(src->getImplementation()); } +template <typename DestT, typename SrcT> +inline const DestT *GetImplAs(const SrcT *src) +{ + return GetAs<const DestT>(src->getImplementation()); +} + } #include "angletypes.inl" |