Subversion Repository Public Repository

Divide-Dependencies

This repository has no backups
This repository's network speed is throttled to 100KB/sec

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
//-------------------------------------------------------------------------------------
// BCDirectCompute.h
//  
// Direct3D 11 Compute Shader BC Compressor
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-------------------------------------------------------------------------------------

#pragma once

namespace DirectX
{

class GPUCompressBC
{
public:
    GPUCompressBC();

    HRESULT Initialize( _In_ ID3D11Device* pDevice );

    HRESULT Prepare( _In_ size_t width, _In_ size_t height, _In_ DXGI_FORMAT format, _In_ float alphaWeight = 1.f );

    HRESULT Compress( _In_ const Image& srcImage, _In_ const Image& destImage );

    DXGI_FORMAT GetSourceFormat() const { return m_srcformat; }

private:
    DXGI_FORMAT                                         m_bcformat;
    DXGI_FORMAT                                         m_srcformat;
    float                                               m_alphaWeight;
    size_t                                              m_width;
    size_t                                              m_height;

    Microsoft::WRL::ComPtr<ID3D11Device>                m_device;
    Microsoft::WRL::ComPtr<ID3D11DeviceContext>         m_context;

    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_err1;
    Microsoft::WRL::ComPtr<ID3D11UnorderedAccessView>   m_err1UAV;
    Microsoft::WRL::ComPtr<ID3D11ShaderResourceView>    m_err1SRV;

    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_err2;
    Microsoft::WRL::ComPtr<ID3D11UnorderedAccessView>   m_err2UAV;
    Microsoft::WRL::ComPtr<ID3D11ShaderResourceView>    m_err2SRV;

    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_output;
    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_outputCPU;
    Microsoft::WRL::ComPtr<ID3D11UnorderedAccessView>   m_outputUAV;
    Microsoft::WRL::ComPtr<ID3D11Buffer>                m_constBuffer;
    
    // Compute shader library
    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC6H_tryModeG10CS;
    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC6H_tryModeLE10CS;
    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC6H_encodeBlockCS;

    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC7_tryMode456CS;
    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC7_tryMode137CS;
    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC7_tryMode02CS;
    Microsoft::WRL::ComPtr<ID3D11ComputeShader>         m_BC7_encodeBlockCS;    
};

}; // namespace

Commits for Divide-Dependencies/physx/APEX_1.4/externals/extensions/externals/include/directxtex/BCDirectCompute.h

Diff revisions: vs.
Revision Author Commited Message
105 IonutCava picture IonutCava Tue 16 Apr, 2019 19:55:41 +0000

Forgot to actually add physx