mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 13:08:50 +01:00
54ed8f0bb0
Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de> Co-authored-by: Robin Kertels <robin.kertels@gmail.com> Co-authored-by: pchome <pchome@users.noreply.github.com> Co-authored-by: Christopher Egert <cme3000@gmail.com> Co-authored-by: Derek Lesho <dereklesho52@Gmail.com> Co-authored-by: Luis Cáceres <lacaceres97@gmail.com> Co-authored-by: Nelson Chen <crazysim@gmail.com> Co-authored-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> Co-authored-by: Riesi <riesi@opentrash.com> Co-authored-by: gbMichelle <gbmichelle.dev@gmail.com>
24 lines
687 B
C++
24 lines
687 B
C++
#include "dxso_header.h"
|
|
|
|
namespace dxvk {
|
|
|
|
DxsoHeader::DxsoHeader(DxsoReader& reader) {
|
|
uint32_t headerToken = reader.readu32();
|
|
|
|
uint32_t headerTypeMask = headerToken & 0xffff0000;
|
|
|
|
DxsoProgramType programType;
|
|
if (headerTypeMask == 0xffff0000)
|
|
programType = DxsoProgramTypes::PixelShader;
|
|
else if (headerTypeMask == 0xfffe0000)
|
|
programType = DxsoProgramTypes::VertexShader;
|
|
else
|
|
throw DxvkError("DxsoHeader: invalid header - invalid version");
|
|
|
|
const uint32_t majorVersion = (headerToken >> 8) & 0xff;
|
|
const uint32_t minorVersion = headerToken & 0xff;
|
|
|
|
m_info = DxsoProgramInfo{ programType, minorVersion, majorVersion };
|
|
}
|
|
|
|
} |