mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +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,
|
// The shader version and type are stored in a 32-bit unit,
|
||||||
// where the first byte contains the major and minor version
|
// where the first byte contains the major and minor version
|
||||||
// numbers, and the high word contains the program type.
|
// numbers, and the high word contains the program type.
|
||||||
auto pVersion = reader.readu16() & 0xFF;
|
reader.skip(2);
|
||||||
auto pType = reader.readEnum<DxbcProgramType>();
|
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.
|
// Read the actual shader code as an array of DWORDs.
|
||||||
auto codeLength = reader.readu32() - 2;
|
auto codeLength = reader.readu32() - 2;
|
||||||
|
@ -21,35 +21,17 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief DXBC shader version info
|
* \brief DXBC shader info
|
||||||
*
|
*
|
||||||
* Stores the shader model version
|
* Stores the shader program type.
|
||||||
* as well as the program type.
|
|
||||||
*/
|
*/
|
||||||
class DxbcProgramVersion {
|
class DxbcProgramVersion {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DxbcProgramVersion() { }
|
DxbcProgramVersion() { }
|
||||||
DxbcProgramVersion(
|
DxbcProgramVersion(DxbcProgramType type)
|
||||||
uint8_t major, uint8_t minor, DxbcProgramType type)
|
: m_type(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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Program type
|
* \brief Program type
|
||||||
@ -79,8 +61,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
uint8_t m_major = 0;
|
|
||||||
uint8_t m_minor = 0;
|
|
||||||
DxbcProgramType m_type = DxbcProgramType::PixelShader;
|
DxbcProgramType m_type = DxbcProgramType::PixelShader;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -32,8 +32,8 @@ namespace dxvk {
|
|||||||
~DxbcModule();
|
~DxbcModule();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Shader type and version
|
* \brief Shader type
|
||||||
* \returns Shader type and version
|
* \returns Shader type
|
||||||
*/
|
*/
|
||||||
DxbcProgramVersion version() const {
|
DxbcProgramVersion version() const {
|
||||||
return m_shexChunk->version();
|
return m_shexChunk->version();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user