mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-13 06:10:04 +00:00
video_core: Reduce nihstro includes in headers. (#6626)
This commit is contained in:
parent
3faddd5e03
commit
03dbdfc12f
4 changed files with 41 additions and 37 deletions
|
@ -12,7 +12,6 @@
|
|||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/array.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <nihstro/shader_bytecode.h>
|
||||
#include "common/assert.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
|
@ -22,10 +21,6 @@
|
|||
#include "video_core/regs_rasterizer.h"
|
||||
#include "video_core/regs_shader.h"
|
||||
|
||||
using nihstro::DestRegister;
|
||||
using nihstro::RegisterType;
|
||||
using nihstro::SourceRegister;
|
||||
|
||||
namespace Pica::Shader {
|
||||
|
||||
constexpr unsigned MAX_PROGRAM_CODE_LENGTH = 4096;
|
||||
|
@ -164,36 +159,19 @@ struct UnitState {
|
|||
|
||||
GSEmitter* emitter_ptr;
|
||||
|
||||
static std::size_t InputOffset(const SourceRegister& reg) {
|
||||
switch (reg.GetRegisterType()) {
|
||||
case RegisterType::Input:
|
||||
return offsetof(UnitState, registers.input) +
|
||||
reg.GetIndex() * sizeof(Common::Vec4<float24>);
|
||||
|
||||
case RegisterType::Temporary:
|
||||
return offsetof(UnitState, registers.temporary) +
|
||||
reg.GetIndex() * sizeof(Common::Vec4<float24>);
|
||||
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
static std::size_t InputOffset(int register_index) {
|
||||
return offsetof(UnitState, registers.input) +
|
||||
register_index * sizeof(Common::Vec4<float24>);
|
||||
}
|
||||
|
||||
static std::size_t OutputOffset(const DestRegister& reg) {
|
||||
switch (reg.GetRegisterType()) {
|
||||
case RegisterType::Output:
|
||||
return offsetof(UnitState, registers.output) +
|
||||
reg.GetIndex() * sizeof(Common::Vec4<float24>);
|
||||
static std::size_t OutputOffset(int register_index) {
|
||||
return offsetof(UnitState, registers.output) +
|
||||
register_index * sizeof(Common::Vec4<float24>);
|
||||
}
|
||||
|
||||
case RegisterType::Temporary:
|
||||
return offsetof(UnitState, registers.temporary) +
|
||||
reg.GetIndex() * sizeof(Common::Vec4<float24>);
|
||||
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
static std::size_t TemporaryOffset(int register_index) {
|
||||
return offsetof(UnitState, registers.temporary) +
|
||||
register_index * sizeof(Common::Vec4<float24>);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue