José Fonseca | c8695f7 | 2013-03-06 12:12:04 +0000 | [diff] [blame] | 1 | /************************************************************************** |
| 2 | * |
| 3 | * Copyright 2013 VMware, Inc. |
| 4 | * All Rights Reserved. |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to deal |
| 8 | * in the Software without restriction, including without limitation the rights |
| 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | * copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in |
| 14 | * all copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | * THE SOFTWARE. |
| 23 | * |
| 24 | **************************************************************************/ |
| 25 | |
Jose Fonseca | 9653f95 | 2015-05-19 16:32:43 +0100 | [diff] [blame] | 26 | #pragma once |
José Fonseca | c8695f7 | 2013-03-06 12:12:04 +0000 | [diff] [blame] | 27 | |
| 28 | |
| 29 | #include <windows.h> |
| 30 | |
Jose Fonseca | 71a85c9 | 2016-02-25 21:37:42 +0000 | [diff] [blame] | 31 | #include "winsdk_compat.h" |
José Fonseca | c8695f7 | 2013-03-06 12:12:04 +0000 | [diff] [blame] | 32 | |
| 33 | #include <dxgi.h> |
| 34 | |
| 35 | |
José Fonseca | 283551a | 2013-07-03 15:48:30 +0100 | [diff] [blame] | 36 | #ifndef ARRAYSIZE |
| 37 | #define ARRAYSIZE(_x) (sizeof(_x)/sizeof((_x)[0])) |
| 38 | #endif |
| 39 | |
| 40 | |
José Fonseca | bbb9eb3 | 2013-04-16 19:38:00 +0100 | [diff] [blame] | 41 | namespace image { |
| 42 | class Image; |
| 43 | } |
| 44 | |
| 45 | |
José Fonseca | c8695f7 | 2013-03-06 12:12:04 +0000 | [diff] [blame] | 46 | namespace d3dstate { |
| 47 | |
| 48 | |
| 49 | HRESULT |
| 50 | ConvertFormat(DXGI_FORMAT SrcFormat, |
| 51 | void *SrcData, |
| 52 | UINT SrcPitch, |
| 53 | DXGI_FORMAT DstFormat, |
| 54 | void *DstData, |
| 55 | UINT DstPitch, |
| 56 | UINT Width, UINT Height); |
| 57 | |
José Fonseca | bbb9eb3 | 2013-04-16 19:38:00 +0100 | [diff] [blame] | 58 | image::Image * |
| 59 | ConvertImage(DXGI_FORMAT SrcFormat, |
| 60 | void *SrcData, |
| 61 | UINT SrcPitch, |
Zack Rusin | 4a7a061 | 2018-07-03 20:34:36 -0400 | [diff] [blame] | 62 | UINT Width, UINT Height, |
Jose Fonseca | 9383c67 | 2018-07-04 16:32:50 +0100 | [diff] [blame] | 63 | bool isDepthStencil); |
José Fonseca | bbb9eb3 | 2013-04-16 19:38:00 +0100 | [diff] [blame] | 64 | |
José Fonseca | c8695f7 | 2013-03-06 12:12:04 +0000 | [diff] [blame] | 65 | |
José Fonseca | 29d4bda | 2014-02-28 17:50:24 +0000 | [diff] [blame] | 66 | image::Image * |
| 67 | getRenderTargetImage(IDXGISwapChain *pSwapChain); |
| 68 | |
Zack Rusin | 86bd499 | 2015-03-03 21:50:43 -0500 | [diff] [blame] | 69 | std::string |
| 70 | getDXGIFormatName(DXGI_FORMAT format); |
| 71 | |
José Fonseca | 29d4bda | 2014-02-28 17:50:24 +0000 | [diff] [blame] | 72 | |
José Fonseca | c8695f7 | 2013-03-06 12:12:04 +0000 | [diff] [blame] | 73 | } /* namespace d3dstate */ |
| 74 | |
| 75 | |