mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-13 19:29:14 +01:00
[dxbc] Drop unused major/minor from DxbcProgramVersion
This commit is contained in:
parent
781ee00f5c
commit
8492f0501e
@ -6,9 +6,9 @@ namespace dxvk {
|
||||
// The shader version and type are stored in a 32-bit unit,
|
||||
// where the first byte contains the major and minor version
|
||||
// numbers, and the high word contains the program type.
|
||||
auto pVersion = reader.readu16() & 0xFF;
|
||||
reader.skip(2);
|
||||
auto pType = reader.readEnum<DxbcProgramType>();
|
||||
m_version = DxbcProgramVersion(pVersion >> 4, pVersion & 0xF, pType);
|
||||
m_version = DxbcProgramVersion(pType);
|
||||
|
||||
// Read the actual shader code as an array of DWORDs.
|
||||
auto codeLength = reader.readu32() - 2;
|
||||
@ -21,4 +21,4 @@ namespace dxvk {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -21,35 +21,17 @@ namespace dxvk {
|
||||
|
||||
|
||||
/**
|
||||
* \brief DXBC shader version info
|
||||
* \brief DXBC shader info
|
||||
*
|
||||
* Stores the shader model version
|
||||
* as well as the program type.
|
||||
* Stores the shader program type.
|
||||
*/
|
||||
class DxbcProgramVersion {
|
||||
|
||||
public:
|
||||
|
||||
DxbcProgramVersion() { }
|
||||
DxbcProgramVersion(
|
||||
uint8_t major, uint8_t minor, DxbcProgramType type)
|
||||
: m_major(major), m_minor(minor), m_type(type) { }
|
||||
|
||||
/**
|
||||
* \brief Major version
|
||||
* \returns Major version
|
||||
*/
|
||||
uint32_t major() const {
|
||||
return m_major;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Minor version
|
||||
* \returns Minor version
|
||||
*/
|
||||
uint32_t minor() const {
|
||||
return m_minor;
|
||||
}
|
||||
DxbcProgramVersion(DxbcProgramType type)
|
||||
: m_type(type) { }
|
||||
|
||||
/**
|
||||
* \brief Program type
|
||||
@ -79,10 +61,8 @@ namespace dxvk {
|
||||
|
||||
private:
|
||||
|
||||
uint8_t m_major = 0;
|
||||
uint8_t m_minor = 0;
|
||||
DxbcProgramType m_type = DxbcProgramType::PixelShader;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -32,8 +32,8 @@ namespace dxvk {
|
||||
~DxbcModule();
|
||||
|
||||
/**
|
||||
* \brief Shader type and version
|
||||
* \returns Shader type and version
|
||||
* \brief Shader type
|
||||
* \returns Shader type
|
||||
*/
|
||||
DxbcProgramVersion version() const {
|
||||
return m_shexChunk->version();
|
||||
|
Loading…
x
Reference in New Issue
Block a user