mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-01-24 08:53:04 +00:00
feat: dump material techniques for T6
This commit is contained in:
@@ -32,14 +32,17 @@ namespace d3d11
|
||||
m_flags(0u)
|
||||
{
|
||||
}
|
||||
} // namespace d3d11
|
||||
|
||||
static constexpr auto TAG_RDEF = FileUtils::MakeMagic32('R', 'D', 'E', 'F');
|
||||
static constexpr auto TAG_SHDR = FileUtils::MakeMagic32('S', 'H', 'D', 'R');
|
||||
namespace
|
||||
{
|
||||
constexpr auto TAG_RDEF = FileUtils::MakeMagic32('R', 'D', 'E', 'F');
|
||||
constexpr auto TAG_SHDR = FileUtils::MakeMagic32('S', 'H', 'D', 'R');
|
||||
|
||||
static constexpr auto VERSION_5_0 = 0x500;
|
||||
static constexpr auto VERSION_5_1 = 0x501;
|
||||
static constexpr auto TARGET_VERSION_MASK = 0xFFFF;
|
||||
static constexpr auto CHUNK_TABLE_OFFSET = 28u;
|
||||
constexpr auto VERSION_5_0 = 0x500;
|
||||
constexpr auto VERSION_5_1 = 0x501;
|
||||
constexpr auto TARGET_VERSION_MASK = 0xFFFF;
|
||||
constexpr auto CHUNK_TABLE_OFFSET = 28u;
|
||||
|
||||
struct FileRdefHeader
|
||||
{
|
||||
@@ -669,16 +672,16 @@ namespace d3d11
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace d3d11
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<ShaderInfo> ShaderAnalyser::GetShaderInfo(const uint8_t* shader, const size_t shaderSize)
|
||||
std::unique_ptr<ShaderInfo> ShaderAnalyser::GetShaderInfo(const void* shader, const size_t shaderSize)
|
||||
{
|
||||
if (shader == nullptr || shaderSize == 0)
|
||||
return nullptr;
|
||||
|
||||
auto shaderInfo = std::make_unique<ShaderInfo>();
|
||||
|
||||
if (!PopulateShaderInfoFromBytes(*shaderInfo, shader, shaderSize))
|
||||
if (!PopulateShaderInfoFromBytes(*shaderInfo, static_cast<const uint8_t*>(shader), shaderSize))
|
||||
return nullptr;
|
||||
|
||||
return shaderInfo;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace d3d11
|
||||
{
|
||||
enum class ShaderType
|
||||
enum class ShaderType : std::uint8_t
|
||||
{
|
||||
UNKNOWN,
|
||||
PIXEL_SHADER,
|
||||
@@ -33,7 +34,7 @@ namespace d3d11
|
||||
unsigned m_flags;
|
||||
};
|
||||
|
||||
enum class ConstantBufferType
|
||||
enum class ConstantBufferType : std::uint8_t
|
||||
{
|
||||
UNKNOWN,
|
||||
CBUFFER,
|
||||
@@ -59,7 +60,7 @@ namespace d3d11
|
||||
std::vector<ConstantBufferVariable> m_variables;
|
||||
};
|
||||
|
||||
enum class BoundResourceType
|
||||
enum class BoundResourceType : std::uint8_t
|
||||
{
|
||||
UNKNOWN,
|
||||
CBUFFER,
|
||||
@@ -68,7 +69,7 @@ namespace d3d11
|
||||
SAMPLER
|
||||
};
|
||||
|
||||
enum class BoundResourceReturnType
|
||||
enum class BoundResourceReturnType : std::uint8_t
|
||||
{
|
||||
UNKNOWN,
|
||||
UNORM,
|
||||
@@ -81,7 +82,7 @@ namespace d3d11
|
||||
CONTINUED,
|
||||
};
|
||||
|
||||
enum class BoundResourceDimension
|
||||
enum class BoundResourceDimension : std::uint8_t
|
||||
{
|
||||
UNKNOWN,
|
||||
BUFFER,
|
||||
@@ -131,6 +132,6 @@ namespace d3d11
|
||||
class ShaderAnalyser
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr<ShaderInfo> GetShaderInfo(const uint8_t* shader, size_t shaderSize);
|
||||
static std::unique_ptr<ShaderInfo> GetShaderInfo(const void* shader, size_t shaderSize);
|
||||
};
|
||||
} // namespace d3d11
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace d3d9
|
||||
{
|
||||
enum class ShaderType
|
||||
enum class ShaderType : std::uint8_t
|
||||
{
|
||||
UNKNOWN,
|
||||
PIXEL_SHADER,
|
||||
@@ -14,7 +15,7 @@ namespace d3d9
|
||||
};
|
||||
|
||||
// https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dxregister-set
|
||||
enum class RegisterSet
|
||||
enum class RegisterSet : std::uint8_t
|
||||
{
|
||||
BOOL,
|
||||
INT_4,
|
||||
@@ -26,7 +27,7 @@ namespace d3d9
|
||||
};
|
||||
|
||||
// https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dxparameter-class
|
||||
enum class ParameterClass
|
||||
enum class ParameterClass : std::uint8_t
|
||||
{
|
||||
SCALAR,
|
||||
VECTOR,
|
||||
@@ -40,7 +41,7 @@ namespace d3d9
|
||||
};
|
||||
|
||||
// https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dxparameter-type
|
||||
enum class ParameterType
|
||||
enum class ParameterType : std::uint8_t
|
||||
{
|
||||
VOID,
|
||||
BOOL,
|
||||
|
||||
Reference in New Issue
Block a user