2018-02-11 21:34:20 -05:00
|
|
|
// Copyright 2018 yuzu Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-03-16 23:06:24 -04:00
|
|
|
#include <array>
|
2018-03-16 21:32:44 -04:00
|
|
|
#include <unordered_map>
|
|
|
|
#include <vector>
|
2018-03-22 19:47:28 -04:00
|
|
|
#include "common/assert.h"
|
2018-02-12 12:34:41 -05:00
|
|
|
#include "common/bit_field.h"
|
|
|
|
#include "common/common_funcs.h"
|
2018-02-11 21:34:20 -05:00
|
|
|
#include "common/common_types.h"
|
2018-03-26 20:45:10 -04:00
|
|
|
#include "common/math_util.h"
|
2018-03-24 00:45:24 -04:00
|
|
|
#include "video_core/gpu.h"
|
2018-03-28 16:20:18 -04:00
|
|
|
#include "video_core/macro_interpreter.h"
|
2018-02-12 12:34:41 -05:00
|
|
|
#include "video_core/memory_manager.h"
|
2018-03-23 19:56:27 -04:00
|
|
|
#include "video_core/textures/texture.h"
|
2018-02-11 21:34:20 -05:00
|
|
|
|
|
|
|
namespace Tegra {
|
|
|
|
namespace Engines {
|
|
|
|
|
2018-04-13 23:13:47 -04:00
|
|
|
#define MAXWELL3D_REG_INDEX(field_name) \
|
|
|
|
(offsetof(Tegra::Engines::Maxwell3D::Regs, field_name) / sizeof(u32))
|
|
|
|
|
2018-02-11 23:44:12 -05:00
|
|
|
class Maxwell3D final {
|
|
|
|
public:
|
2018-02-13 23:47:51 -05:00
|
|
|
explicit Maxwell3D(MemoryManager& memory_manager);
|
2018-02-11 23:44:12 -05:00
|
|
|
~Maxwell3D() = default;
|
2018-02-11 21:34:20 -05:00
|
|
|
|
2018-02-12 12:34:41 -05:00
|
|
|
/// Register structure of the Maxwell3D engine.
|
|
|
|
/// TODO(Subv): This structure will need to be made bigger as more registers are discovered.
|
|
|
|
struct Regs {
|
2018-04-23 21:03:50 -04:00
|
|
|
static constexpr size_t NUM_REGS = 0xE00;
|
2018-02-12 12:34:41 -05:00
|
|
|
|
2018-03-19 17:46:29 -04:00
|
|
|
static constexpr size_t NumRenderTargets = 8;
|
2018-03-24 02:22:19 -04:00
|
|
|
static constexpr size_t NumViewports = 16;
|
2018-03-17 17:17:45 -04:00
|
|
|
static constexpr size_t NumCBData = 16;
|
2018-03-16 23:47:45 -04:00
|
|
|
static constexpr size_t NumVertexArrays = 32;
|
2018-03-21 00:33:56 -04:00
|
|
|
static constexpr size_t NumVertexAttributes = 32;
|
2018-03-16 23:47:45 -04:00
|
|
|
static constexpr size_t MaxShaderProgram = 6;
|
2018-03-17 18:08:26 -04:00
|
|
|
static constexpr size_t MaxShaderStage = 5;
|
2018-03-17 18:06:23 -04:00
|
|
|
// Maximum number of const buffers per shader stage.
|
|
|
|
static constexpr size_t MaxConstBuffers = 16;
|
2018-03-16 23:47:45 -04:00
|
|
|
|
2018-02-12 12:34:41 -05:00
|
|
|
enum class QueryMode : u32 {
|
|
|
|
Write = 0,
|
|
|
|
Sync = 1,
|
2018-04-23 18:06:57 -04:00
|
|
|
// TODO(Subv): It is currently unknown what the difference between method 2 and method 0
|
|
|
|
// is.
|
|
|
|
Write2 = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class QueryUnit : u32 {
|
|
|
|
VFetch = 1,
|
|
|
|
VP = 2,
|
|
|
|
Rast = 4,
|
|
|
|
StrmOut = 5,
|
|
|
|
GP = 6,
|
|
|
|
ZCull = 7,
|
|
|
|
Prop = 10,
|
|
|
|
Crop = 15,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class QuerySelect : u32 {
|
|
|
|
Zero = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class QuerySyncCondition : u32 {
|
|
|
|
NotEqual = 0,
|
|
|
|
GreaterThan = 1,
|
2018-02-12 12:34:41 -05:00
|
|
|
};
|
|
|
|
|
2018-03-16 20:23:11 -04:00
|
|
|
enum class ShaderProgram : u32 {
|
|
|
|
VertexA = 0,
|
|
|
|
VertexB = 1,
|
|
|
|
TesselationControl = 2,
|
|
|
|
TesselationEval = 3,
|
|
|
|
Geometry = 4,
|
|
|
|
Fragment = 5,
|
|
|
|
};
|
|
|
|
|
2018-03-17 18:08:26 -04:00
|
|
|
enum class ShaderStage : u32 {
|
2018-03-16 20:23:11 -04:00
|
|
|
Vertex = 0,
|
|
|
|
TesselationControl = 1,
|
|
|
|
TesselationEval = 2,
|
|
|
|
Geometry = 3,
|
|
|
|
Fragment = 4,
|
|
|
|
};
|
|
|
|
|
2018-03-24 16:26:14 -04:00
|
|
|
struct VertexAttribute {
|
|
|
|
enum class Size : u32 {
|
|
|
|
Size_32_32_32_32 = 0x01,
|
|
|
|
Size_32_32_32 = 0x02,
|
|
|
|
Size_16_16_16_16 = 0x03,
|
|
|
|
Size_32_32 = 0x04,
|
|
|
|
Size_16_16_16 = 0x05,
|
|
|
|
Size_8_8_8_8 = 0x0a,
|
|
|
|
Size_16_16 = 0x0f,
|
|
|
|
Size_32 = 0x12,
|
|
|
|
Size_8_8_8 = 0x13,
|
|
|
|
Size_8_8 = 0x18,
|
|
|
|
Size_16 = 0x1b,
|
|
|
|
Size_8 = 0x1d,
|
|
|
|
Size_10_10_10_2 = 0x30,
|
|
|
|
Size_11_11_10 = 0x31,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class Type : u32 {
|
|
|
|
SignedNorm = 1,
|
|
|
|
UnsignedNorm = 2,
|
|
|
|
SignedInt = 3,
|
|
|
|
UnsignedInt = 4,
|
|
|
|
UnsignedScaled = 5,
|
|
|
|
SignedScaled = 6,
|
|
|
|
Float = 7,
|
|
|
|
};
|
|
|
|
|
|
|
|
union {
|
|
|
|
BitField<0, 5, u32> buffer;
|
|
|
|
BitField<6, 1, u32> constant;
|
|
|
|
BitField<7, 14, u32> offset;
|
|
|
|
BitField<21, 6, Size> size;
|
|
|
|
BitField<27, 3, Type> type;
|
|
|
|
BitField<31, 1, u32> bgra;
|
|
|
|
};
|
|
|
|
|
|
|
|
u32 ComponentCount() const {
|
|
|
|
switch (size) {
|
|
|
|
case Size::Size_32_32_32_32:
|
|
|
|
return 4;
|
|
|
|
case Size::Size_32_32_32:
|
|
|
|
return 3;
|
|
|
|
case Size::Size_16_16_16_16:
|
|
|
|
return 4;
|
|
|
|
case Size::Size_32_32:
|
|
|
|
return 2;
|
|
|
|
case Size::Size_16_16_16:
|
|
|
|
return 3;
|
|
|
|
case Size::Size_8_8_8_8:
|
|
|
|
return 4;
|
|
|
|
case Size::Size_16_16:
|
|
|
|
return 2;
|
|
|
|
case Size::Size_32:
|
|
|
|
return 1;
|
|
|
|
case Size::Size_8_8_8:
|
|
|
|
return 3;
|
|
|
|
case Size::Size_8_8:
|
|
|
|
return 2;
|
|
|
|
case Size::Size_16:
|
|
|
|
return 1;
|
|
|
|
case Size::Size_8:
|
|
|
|
return 1;
|
|
|
|
case Size::Size_10_10_10_2:
|
|
|
|
return 4;
|
|
|
|
case Size::Size_11_11_10:
|
|
|
|
return 3;
|
|
|
|
default:
|
|
|
|
UNREACHABLE();
|
|
|
|
}
|
|
|
|
}
|
2018-03-22 19:47:28 -04:00
|
|
|
|
2018-03-24 16:26:14 -04:00
|
|
|
u32 SizeInBytes() const {
|
|
|
|
switch (size) {
|
|
|
|
case Size::Size_32_32_32_32:
|
|
|
|
return 16;
|
|
|
|
case Size::Size_32_32_32:
|
|
|
|
return 12;
|
|
|
|
case Size::Size_16_16_16_16:
|
|
|
|
return 8;
|
|
|
|
case Size::Size_32_32:
|
|
|
|
return 8;
|
|
|
|
case Size::Size_16_16_16:
|
|
|
|
return 6;
|
|
|
|
case Size::Size_8_8_8_8:
|
|
|
|
return 4;
|
|
|
|
case Size::Size_16_16:
|
|
|
|
return 4;
|
|
|
|
case Size::Size_32:
|
|
|
|
return 4;
|
|
|
|
case Size::Size_8_8_8:
|
|
|
|
return 3;
|
|
|
|
case Size::Size_8_8:
|
|
|
|
return 2;
|
|
|
|
case Size::Size_16:
|
|
|
|
return 2;
|
|
|
|
case Size::Size_8:
|
|
|
|
return 1;
|
|
|
|
case Size::Size_10_10_10_2:
|
|
|
|
return 4;
|
|
|
|
case Size::Size_11_11_10:
|
|
|
|
return 4;
|
|
|
|
default:
|
|
|
|
UNREACHABLE();
|
|
|
|
}
|
2018-03-22 19:47:28 -04:00
|
|
|
}
|
|
|
|
|
2018-03-24 16:26:14 -04:00
|
|
|
std::string SizeString() const {
|
|
|
|
switch (size) {
|
|
|
|
case Size::Size_32_32_32_32:
|
|
|
|
return "32_32_32_32";
|
|
|
|
case Size::Size_32_32_32:
|
|
|
|
return "32_32_32";
|
|
|
|
case Size::Size_16_16_16_16:
|
|
|
|
return "16_16_16_16";
|
|
|
|
case Size::Size_32_32:
|
|
|
|
return "32_32";
|
|
|
|
case Size::Size_16_16_16:
|
|
|
|
return "16_16_16";
|
|
|
|
case Size::Size_8_8_8_8:
|
|
|
|
return "8_8_8_8";
|
|
|
|
case Size::Size_16_16:
|
|
|
|
return "16_16";
|
|
|
|
case Size::Size_32:
|
|
|
|
return "32";
|
|
|
|
case Size::Size_8_8_8:
|
|
|
|
return "8_8_8";
|
|
|
|
case Size::Size_8_8:
|
|
|
|
return "8_8";
|
|
|
|
case Size::Size_16:
|
|
|
|
return "16";
|
|
|
|
case Size::Size_8:
|
|
|
|
return "8";
|
|
|
|
case Size::Size_10_10_10_2:
|
|
|
|
return "10_10_10_2";
|
|
|
|
case Size::Size_11_11_10:
|
|
|
|
return "11_11_10";
|
|
|
|
}
|
|
|
|
UNREACHABLE();
|
|
|
|
return {};
|
2018-03-22 19:47:28 -04:00
|
|
|
}
|
2018-03-24 16:26:14 -04:00
|
|
|
|
2018-03-24 21:04:23 -04:00
|
|
|
std::string TypeString() const {
|
2018-03-24 16:26:14 -04:00
|
|
|
switch (type) {
|
|
|
|
case Type::SignedNorm:
|
2018-03-24 21:04:23 -04:00
|
|
|
return "SNORM";
|
2018-03-24 16:26:14 -04:00
|
|
|
case Type::UnsignedNorm:
|
2018-03-24 21:04:23 -04:00
|
|
|
return "UNORM";
|
2018-03-24 16:26:14 -04:00
|
|
|
case Type::SignedInt:
|
2018-03-24 21:04:23 -04:00
|
|
|
return "SINT";
|
2018-03-24 16:26:14 -04:00
|
|
|
case Type::UnsignedInt:
|
2018-03-24 21:04:23 -04:00
|
|
|
return "UINT";
|
2018-03-24 16:26:14 -04:00
|
|
|
case Type::UnsignedScaled:
|
2018-03-24 21:04:23 -04:00
|
|
|
return "USCALED";
|
2018-03-24 16:26:14 -04:00
|
|
|
case Type::SignedScaled:
|
2018-03-24 21:04:23 -04:00
|
|
|
return "SSCALED";
|
2018-03-24 16:26:14 -04:00
|
|
|
case Type::Float:
|
2018-03-24 21:04:23 -04:00
|
|
|
return "FLOAT";
|
2018-03-24 16:26:14 -04:00
|
|
|
}
|
|
|
|
UNREACHABLE();
|
|
|
|
return {};
|
|
|
|
}
|
2018-03-25 00:09:53 -04:00
|
|
|
|
|
|
|
bool IsNormalized() const {
|
|
|
|
return (type == Type::SignedNorm) || (type == Type::UnsignedNorm);
|
|
|
|
}
|
2018-03-24 16:26:14 -04:00
|
|
|
};
|
2018-03-22 19:47:28 -04:00
|
|
|
|
|
|
|
enum class PrimitiveTopology : u32 {
|
|
|
|
Points = 0x0,
|
|
|
|
Lines = 0x1,
|
|
|
|
LineLoop = 0x2,
|
|
|
|
LineStrip = 0x3,
|
|
|
|
Triangles = 0x4,
|
|
|
|
TriangleStrip = 0x5,
|
|
|
|
TriangleFan = 0x6,
|
|
|
|
Quads = 0x7,
|
|
|
|
QuadStrip = 0x8,
|
|
|
|
Polygon = 0x9,
|
|
|
|
LinesAdjacency = 0xa,
|
|
|
|
LineStripAdjacency = 0xb,
|
|
|
|
TrianglesAdjacency = 0xc,
|
|
|
|
TriangleStripAdjacency = 0xd,
|
|
|
|
Patches = 0xe,
|
|
|
|
};
|
|
|
|
|
2018-04-13 14:18:37 -04:00
|
|
|
enum class IndexFormat : u32 {
|
|
|
|
UnsignedByte = 0x0,
|
|
|
|
UnsignedShort = 0x1,
|
|
|
|
UnsignedInt = 0x2,
|
|
|
|
};
|
|
|
|
|
2018-07-02 14:31:20 -04:00
|
|
|
enum class ComparisonOp : u32 {
|
2018-07-05 14:01:31 -04:00
|
|
|
// These values are used by Nouveau and most games, they correspond to the OpenGL token
|
|
|
|
// values for these operations.
|
|
|
|
Never = 0x200,
|
|
|
|
Less = 0x201,
|
|
|
|
Equal = 0x202,
|
|
|
|
LessEqual = 0x203,
|
|
|
|
Greater = 0x204,
|
|
|
|
NotEqual = 0x205,
|
|
|
|
GreaterEqual = 0x206,
|
|
|
|
Always = 0x207,
|
|
|
|
|
|
|
|
// These values are used by some games, they seem to be NV04 values.
|
|
|
|
NeverOld = 1,
|
|
|
|
LessOld = 2,
|
|
|
|
EqualOld = 3,
|
|
|
|
LessEqualOld = 4,
|
|
|
|
GreaterOld = 5,
|
|
|
|
NotEqualOld = 6,
|
|
|
|
GreaterEqualOld = 7,
|
|
|
|
AlwaysOld = 8,
|
2018-07-02 14:31:20 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Cull {
|
|
|
|
enum class FrontFace : u32 {
|
|
|
|
ClockWise = 0x0900,
|
|
|
|
CounterClockWise = 0x0901,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class CullFace : u32 {
|
|
|
|
Front = 0x0404,
|
|
|
|
Back = 0x0405,
|
|
|
|
FrontAndBack = 0x0408,
|
|
|
|
};
|
|
|
|
|
|
|
|
u32 enabled;
|
|
|
|
FrontFace front_face;
|
|
|
|
CullFace cull_face;
|
|
|
|
};
|
|
|
|
|
2018-04-13 23:13:47 -04:00
|
|
|
struct Blend {
|
|
|
|
enum class Equation : u32 {
|
|
|
|
Add = 1,
|
|
|
|
Subtract = 2,
|
|
|
|
ReverseSubtract = 3,
|
|
|
|
Min = 4,
|
|
|
|
Max = 5,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class Factor : u32 {
|
|
|
|
Zero = 0x1,
|
|
|
|
One = 0x2,
|
|
|
|
SourceColor = 0x3,
|
|
|
|
OneMinusSourceColor = 0x4,
|
|
|
|
SourceAlpha = 0x5,
|
|
|
|
OneMinusSourceAlpha = 0x6,
|
|
|
|
DestAlpha = 0x7,
|
|
|
|
OneMinusDestAlpha = 0x8,
|
|
|
|
DestColor = 0x9,
|
|
|
|
OneMinusDestColor = 0xa,
|
|
|
|
SourceAlphaSaturate = 0xb,
|
|
|
|
Source1Color = 0x10,
|
|
|
|
OneMinusSource1Color = 0x11,
|
|
|
|
Source1Alpha = 0x12,
|
|
|
|
OneMinusSource1Alpha = 0x13,
|
|
|
|
ConstantColor = 0x61,
|
|
|
|
OneMinusConstantColor = 0x62,
|
|
|
|
ConstantAlpha = 0x63,
|
|
|
|
OneMinusConstantAlpha = 0x64,
|
|
|
|
};
|
|
|
|
|
|
|
|
u32 separate_alpha;
|
|
|
|
Equation equation_rgb;
|
|
|
|
Factor factor_source_rgb;
|
|
|
|
Factor factor_dest_rgb;
|
|
|
|
Equation equation_a;
|
|
|
|
Factor factor_source_a;
|
|
|
|
Factor factor_dest_a;
|
2018-06-08 18:04:41 -04:00
|
|
|
INSERT_PADDING_WORDS(1);
|
2018-04-13 23:13:47 -04:00
|
|
|
};
|
|
|
|
|
2018-06-26 14:38:53 -04:00
|
|
|
struct RenderTargetConfig {
|
|
|
|
u32 address_high;
|
|
|
|
u32 address_low;
|
|
|
|
u32 width;
|
|
|
|
u32 height;
|
|
|
|
Tegra::RenderTargetFormat format;
|
|
|
|
u32 block_dimensions;
|
|
|
|
u32 array_mode;
|
|
|
|
u32 layer_stride;
|
|
|
|
u32 base_layer;
|
|
|
|
INSERT_PADDING_WORDS(7);
|
|
|
|
|
|
|
|
GPUVAddr Address() const {
|
|
|
|
return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) |
|
|
|
|
address_low);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-07-12 22:57:57 -04:00
|
|
|
bool IsShaderConfigEnabled(size_t index) const {
|
|
|
|
// The VertexB is always enabled.
|
|
|
|
if (index == static_cast<size_t>(Regs::ShaderProgram::VertexB)) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return shader_config[index].enable != 0;
|
|
|
|
}
|
|
|
|
|
2018-02-12 12:34:41 -05:00
|
|
|
union {
|
|
|
|
struct {
|
2018-04-23 21:01:29 -04:00
|
|
|
INSERT_PADDING_WORDS(0x45);
|
|
|
|
|
|
|
|
struct {
|
|
|
|
INSERT_PADDING_WORDS(1);
|
|
|
|
u32 data;
|
|
|
|
u32 entry;
|
|
|
|
} macros;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x1B8);
|
2018-03-19 17:46:29 -04:00
|
|
|
|
2018-06-26 14:38:53 -04:00
|
|
|
RenderTargetConfig rt[NumRenderTargets];
|
2018-03-19 17:46:29 -04:00
|
|
|
|
2018-04-18 16:42:40 -04:00
|
|
|
struct {
|
|
|
|
f32 scale_x;
|
|
|
|
f32 scale_y;
|
|
|
|
f32 scale_z;
|
2018-06-04 17:36:54 -04:00
|
|
|
f32 translate_x;
|
|
|
|
f32 translate_y;
|
|
|
|
f32 translate_z;
|
2018-04-18 16:42:40 -04:00
|
|
|
INSERT_PADDING_WORDS(2);
|
2018-06-04 17:36:54 -04:00
|
|
|
|
|
|
|
MathUtil::Rectangle<s32> GetRect() const {
|
|
|
|
return {
|
|
|
|
GetX(), // left
|
|
|
|
GetY() + GetHeight(), // top
|
|
|
|
GetX() + GetWidth(), // right
|
|
|
|
GetY() // bottom
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
s32 GetX() const {
|
|
|
|
return static_cast<s32>(std::max(0.0f, translate_x - std::fabs(scale_x)));
|
|
|
|
}
|
|
|
|
|
|
|
|
s32 GetY() const {
|
|
|
|
return static_cast<s32>(std::max(0.0f, translate_y - std::fabs(scale_y)));
|
|
|
|
}
|
|
|
|
|
|
|
|
s32 GetWidth() const {
|
|
|
|
return static_cast<s32>(translate_x + std::fabs(scale_x)) - GetX();
|
|
|
|
}
|
|
|
|
|
|
|
|
s32 GetHeight() const {
|
|
|
|
return static_cast<s32>(translate_y + std::fabs(scale_y)) - GetY();
|
|
|
|
}
|
2018-04-18 16:42:40 -04:00
|
|
|
} viewport_transform[NumViewports];
|
2018-03-24 02:22:19 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
union {
|
|
|
|
BitField<0, 16, u32> x;
|
|
|
|
BitField<16, 16, u32> width;
|
|
|
|
};
|
|
|
|
union {
|
|
|
|
BitField<0, 16, u32> y;
|
|
|
|
BitField<16, 16, u32> height;
|
|
|
|
};
|
|
|
|
float depth_range_near;
|
|
|
|
float depth_range_far;
|
|
|
|
} viewport[NumViewports];
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x1D);
|
2018-03-21 00:28:06 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 first;
|
|
|
|
u32 count;
|
|
|
|
} vertex_buffer;
|
|
|
|
|
2018-06-07 00:53:43 -04:00
|
|
|
INSERT_PADDING_WORDS(1);
|
|
|
|
|
|
|
|
float clear_color[4];
|
|
|
|
float clear_depth;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x93);
|
2018-03-19 17:49:41 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 address_high;
|
|
|
|
u32 address_low;
|
2018-07-02 13:42:04 -04:00
|
|
|
Tegra::DepthFormat format;
|
2018-03-19 17:49:41 -04:00
|
|
|
u32 block_dimensions;
|
|
|
|
u32 layer_stride;
|
|
|
|
|
|
|
|
GPUVAddr Address() const {
|
|
|
|
return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) |
|
|
|
|
address_low);
|
|
|
|
}
|
|
|
|
} zeta;
|
|
|
|
|
2018-03-21 00:33:56 -04:00
|
|
|
INSERT_PADDING_WORDS(0x5B);
|
|
|
|
|
2018-03-24 16:26:14 -04:00
|
|
|
VertexAttribute vertex_attrib_format[NumVertexAttributes];
|
2018-03-21 00:33:56 -04:00
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0xF);
|
2018-03-19 17:46:29 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
union {
|
|
|
|
BitField<0, 4, u32> count;
|
|
|
|
};
|
|
|
|
} rt_control;
|
|
|
|
|
2018-07-02 14:31:20 -04:00
|
|
|
INSERT_PADDING_WORDS(0x2B);
|
|
|
|
|
|
|
|
u32 depth_test_enable;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x5);
|
2018-06-08 18:04:41 -04:00
|
|
|
|
|
|
|
u32 independent_blend_enable;
|
|
|
|
|
2018-07-02 14:31:20 -04:00
|
|
|
u32 depth_write_enabled;
|
|
|
|
|
2018-07-04 11:26:46 -04:00
|
|
|
INSERT_PADDING_WORDS(0x7);
|
|
|
|
|
|
|
|
u32 d3d_cull_mode;
|
2018-07-02 14:31:20 -04:00
|
|
|
|
2018-07-05 14:01:31 -04:00
|
|
|
ComparisonOp depth_test_func;
|
2018-07-02 14:31:20 -04:00
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0xB);
|
2018-06-08 18:04:41 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 separate_alpha;
|
|
|
|
Blend::Equation equation_rgb;
|
|
|
|
Blend::Factor factor_source_rgb;
|
|
|
|
Blend::Factor factor_dest_rgb;
|
|
|
|
Blend::Equation equation_a;
|
|
|
|
Blend::Factor factor_source_a;
|
|
|
|
INSERT_PADDING_WORDS(1);
|
|
|
|
Blend::Factor factor_dest_a;
|
|
|
|
|
|
|
|
u32 enable_common;
|
|
|
|
u32 enable[NumRenderTargets];
|
|
|
|
} blend;
|
|
|
|
|
2018-07-17 16:00:21 -04:00
|
|
|
struct {
|
|
|
|
u32 enable;
|
|
|
|
u32 front_op_fail;
|
|
|
|
u32 front_op_zfail;
|
|
|
|
u32 front_op_zpass;
|
|
|
|
u32 front_func_func;
|
|
|
|
u32 front_func_ref;
|
|
|
|
u32 front_func_mask;
|
|
|
|
u32 front_mask;
|
|
|
|
} stencil;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x3);
|
2018-07-04 11:26:46 -04:00
|
|
|
|
|
|
|
union {
|
|
|
|
BitField<4, 1, u32> triangle_rast_flip;
|
|
|
|
} screen_y_control;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x21);
|
2018-07-02 12:21:23 -04:00
|
|
|
|
|
|
|
u32 vb_element_base;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x49);
|
2018-03-19 01:36:25 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 tsc_address_high;
|
|
|
|
u32 tsc_address_low;
|
|
|
|
u32 tsc_limit;
|
|
|
|
|
|
|
|
GPUVAddr TSCAddress() const {
|
|
|
|
return static_cast<GPUVAddr>(
|
|
|
|
(static_cast<GPUVAddr>(tsc_address_high) << 32) | tsc_address_low);
|
|
|
|
}
|
|
|
|
} tsc;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x3);
|
2018-03-19 01:32:57 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 tic_address_high;
|
|
|
|
u32 tic_address_low;
|
|
|
|
u32 tic_limit;
|
|
|
|
|
|
|
|
GPUVAddr TICAddress() const {
|
|
|
|
return static_cast<GPUVAddr>(
|
|
|
|
(static_cast<GPUVAddr>(tic_address_high) << 32) | tic_address_low);
|
|
|
|
}
|
|
|
|
} tic;
|
|
|
|
|
2018-07-17 16:00:21 -04:00
|
|
|
INSERT_PADDING_WORDS(0x5);
|
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 enable;
|
|
|
|
u32 back_op_fail;
|
|
|
|
u32 back_op_zfail;
|
|
|
|
u32 back_op_zpass;
|
|
|
|
u32 back_func_func;
|
|
|
|
} stencil_two_side;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x17);
|
2018-07-04 11:26:46 -04:00
|
|
|
|
|
|
|
union {
|
|
|
|
BitField<2, 1, u32> coord_origin;
|
|
|
|
BitField<3, 10, u32> enable;
|
|
|
|
} point_coord_replace;
|
2018-03-19 01:32:57 -04:00
|
|
|
|
2018-03-16 20:23:11 -04:00
|
|
|
struct {
|
|
|
|
u32 code_address_high;
|
|
|
|
u32 code_address_low;
|
|
|
|
|
|
|
|
GPUVAddr CodeAddress() const {
|
|
|
|
return static_cast<GPUVAddr>(
|
|
|
|
(static_cast<GPUVAddr>(code_address_high) << 32) | code_address_low);
|
|
|
|
}
|
|
|
|
} code_address;
|
|
|
|
INSERT_PADDING_WORDS(1);
|
2018-03-22 19:47:28 -04:00
|
|
|
|
2018-03-04 19:13:15 -05:00
|
|
|
struct {
|
|
|
|
u32 vertex_end_gl;
|
2018-03-21 00:28:06 -04:00
|
|
|
union {
|
|
|
|
u32 vertex_begin_gl;
|
2018-03-22 19:47:28 -04:00
|
|
|
BitField<0, 16, PrimitiveTopology> topology;
|
2018-03-21 00:28:06 -04:00
|
|
|
};
|
2018-03-04 19:13:15 -05:00
|
|
|
} draw;
|
2018-03-22 19:47:28 -04:00
|
|
|
|
2018-04-13 14:18:37 -04:00
|
|
|
INSERT_PADDING_WORDS(0x6B);
|
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 start_addr_high;
|
|
|
|
u32 start_addr_low;
|
|
|
|
u32 end_addr_high;
|
|
|
|
u32 end_addr_low;
|
|
|
|
IndexFormat format;
|
|
|
|
u32 first;
|
|
|
|
u32 count;
|
|
|
|
|
|
|
|
unsigned FormatSizeInBytes() const {
|
|
|
|
switch (format) {
|
|
|
|
case IndexFormat::UnsignedByte:
|
|
|
|
return 1;
|
|
|
|
case IndexFormat::UnsignedShort:
|
|
|
|
return 2;
|
|
|
|
case IndexFormat::UnsignedInt:
|
|
|
|
return 4;
|
|
|
|
}
|
|
|
|
UNREACHABLE();
|
|
|
|
}
|
|
|
|
|
|
|
|
GPUVAddr StartAddress() const {
|
|
|
|
return static_cast<GPUVAddr>(
|
|
|
|
(static_cast<GPUVAddr>(start_addr_high) << 32) | start_addr_low);
|
|
|
|
}
|
|
|
|
|
|
|
|
GPUVAddr EndAddress() const {
|
|
|
|
return static_cast<GPUVAddr>((static_cast<GPUVAddr>(end_addr_high) << 32) |
|
|
|
|
end_addr_low);
|
|
|
|
}
|
|
|
|
} index_array;
|
|
|
|
|
2018-07-02 14:31:20 -04:00
|
|
|
INSERT_PADDING_WORDS(0x7);
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x46);
|
|
|
|
|
|
|
|
Cull cull;
|
|
|
|
|
2018-06-07 00:53:43 -04:00
|
|
|
INSERT_PADDING_WORDS(0x2B);
|
|
|
|
|
|
|
|
union {
|
|
|
|
u32 raw;
|
|
|
|
BitField<0, 1, u32> Z;
|
|
|
|
BitField<1, 1, u32> S;
|
|
|
|
BitField<2, 1, u32> R;
|
|
|
|
BitField<3, 1, u32> G;
|
|
|
|
BitField<4, 1, u32> B;
|
|
|
|
BitField<5, 1, u32> A;
|
|
|
|
BitField<6, 4, u32> RT;
|
|
|
|
BitField<10, 11, u32> layer;
|
|
|
|
} clear_buffers;
|
|
|
|
|
|
|
|
INSERT_PADDING_WORDS(0x4B);
|
2018-04-13 14:18:37 -04:00
|
|
|
|
2018-02-12 12:34:41 -05:00
|
|
|
struct {
|
|
|
|
u32 query_address_high;
|
|
|
|
u32 query_address_low;
|
|
|
|
u32 query_sequence;
|
|
|
|
union {
|
|
|
|
u32 raw;
|
|
|
|
BitField<0, 2, QueryMode> mode;
|
|
|
|
BitField<4, 1, u32> fence;
|
2018-04-23 18:06:57 -04:00
|
|
|
BitField<12, 4, QueryUnit> unit;
|
|
|
|
BitField<16, 1, QuerySyncCondition> sync_cond;
|
|
|
|
BitField<23, 5, QuerySelect> select;
|
|
|
|
BitField<28, 1, u32> short_query;
|
2018-02-12 12:34:41 -05:00
|
|
|
} query_get;
|
|
|
|
|
|
|
|
GPUVAddr QueryAddress() const {
|
|
|
|
return static_cast<GPUVAddr>(
|
|
|
|
(static_cast<GPUVAddr>(query_address_high) << 32) | query_address_low);
|
|
|
|
}
|
|
|
|
} query;
|
2018-03-16 20:23:11 -04:00
|
|
|
|
2018-03-16 23:47:45 -04:00
|
|
|
INSERT_PADDING_WORDS(0x3C);
|
|
|
|
|
|
|
|
struct {
|
|
|
|
union {
|
|
|
|
BitField<0, 12, u32> stride;
|
|
|
|
BitField<12, 1, u32> enable;
|
|
|
|
};
|
|
|
|
u32 start_high;
|
|
|
|
u32 start_low;
|
|
|
|
u32 divisor;
|
|
|
|
|
|
|
|
GPUVAddr StartAddress() const {
|
|
|
|
return static_cast<GPUVAddr>((static_cast<GPUVAddr>(start_high) << 32) |
|
|
|
|
start_low);
|
|
|
|
}
|
2018-04-21 20:19:33 -04:00
|
|
|
|
|
|
|
bool IsEnabled() const {
|
|
|
|
return enable != 0 && StartAddress() != 0;
|
|
|
|
}
|
|
|
|
|
2018-03-16 23:47:45 -04:00
|
|
|
} vertex_array[NumVertexArrays];
|
|
|
|
|
2018-06-08 18:04:41 -04:00
|
|
|
Blend independent_blend[NumRenderTargets];
|
2018-03-16 23:47:45 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 limit_high;
|
|
|
|
u32 limit_low;
|
|
|
|
|
|
|
|
GPUVAddr LimitAddress() const {
|
|
|
|
return static_cast<GPUVAddr>((static_cast<GPUVAddr>(limit_high) << 32) |
|
|
|
|
limit_low);
|
|
|
|
}
|
|
|
|
} vertex_array_limit[NumVertexArrays];
|
2018-03-16 20:23:11 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
union {
|
|
|
|
BitField<0, 1, u32> enable;
|
|
|
|
BitField<4, 4, ShaderProgram> program;
|
|
|
|
};
|
2018-04-07 23:14:41 -04:00
|
|
|
u32 offset;
|
|
|
|
INSERT_PADDING_WORDS(14);
|
2018-03-16 23:06:24 -04:00
|
|
|
} shader_config[MaxShaderProgram];
|
2018-03-16 20:23:11 -04:00
|
|
|
|
2018-04-07 23:14:41 -04:00
|
|
|
INSERT_PADDING_WORDS(0x80);
|
2018-03-17 17:17:45 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 cb_size;
|
|
|
|
u32 cb_address_high;
|
|
|
|
u32 cb_address_low;
|
|
|
|
u32 cb_pos;
|
|
|
|
u32 cb_data[NumCBData];
|
2018-03-17 18:06:23 -04:00
|
|
|
|
|
|
|
GPUVAddr BufferAddress() const {
|
|
|
|
return static_cast<GPUVAddr>(
|
|
|
|
(static_cast<GPUVAddr>(cb_address_high) << 32) | cb_address_low);
|
|
|
|
}
|
2018-03-17 17:17:45 -04:00
|
|
|
} const_buffer;
|
|
|
|
|
2018-03-17 17:29:20 -04:00
|
|
|
INSERT_PADDING_WORDS(0x10);
|
2018-03-17 17:17:45 -04:00
|
|
|
|
|
|
|
struct {
|
|
|
|
union {
|
2018-03-17 18:06:23 -04:00
|
|
|
u32 raw_config;
|
2018-03-17 17:17:45 -04:00
|
|
|
BitField<0, 1, u32> valid;
|
|
|
|
BitField<4, 5, u32> index;
|
|
|
|
};
|
|
|
|
INSERT_PADDING_WORDS(7);
|
2018-03-17 18:08:26 -04:00
|
|
|
} cb_bind[MaxShaderStage];
|
2018-03-17 17:17:45 -04:00
|
|
|
|
2018-03-18 04:13:22 -04:00
|
|
|
INSERT_PADDING_WORDS(0x56);
|
|
|
|
|
|
|
|
u32 tex_cb_index;
|
|
|
|
|
2018-03-18 16:22:06 -04:00
|
|
|
INSERT_PADDING_WORDS(0x395);
|
|
|
|
|
|
|
|
struct {
|
|
|
|
/// Compressed address of a buffer that holds information about bound SSBOs.
|
|
|
|
/// This address is usually bound to c0 in the shaders.
|
|
|
|
u32 buffer_address;
|
|
|
|
|
|
|
|
GPUVAddr BufferAddress() const {
|
|
|
|
return static_cast<GPUVAddr>(buffer_address) << 8;
|
|
|
|
}
|
|
|
|
} ssbo_info;
|
|
|
|
|
2018-03-18 20:03:20 -04:00
|
|
|
INSERT_PADDING_WORDS(0x11);
|
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 address[MaxShaderStage];
|
|
|
|
u32 size[MaxShaderStage];
|
|
|
|
} tex_info_buffers;
|
|
|
|
|
2018-04-23 21:03:50 -04:00
|
|
|
INSERT_PADDING_WORDS(0xCC);
|
2018-02-12 12:34:41 -05:00
|
|
|
};
|
|
|
|
std::array<u32, NUM_REGS> reg_array;
|
|
|
|
};
|
|
|
|
} regs{};
|
|
|
|
|
|
|
|
static_assert(sizeof(Regs) == Regs::NUM_REGS * sizeof(u32), "Maxwell3D Regs has wrong size");
|
|
|
|
|
2018-03-16 23:06:24 -04:00
|
|
|
struct State {
|
2018-03-17 18:06:23 -04:00
|
|
|
struct ConstBufferInfo {
|
|
|
|
GPUVAddr address;
|
|
|
|
u32 index;
|
|
|
|
u32 size;
|
|
|
|
bool enabled;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ShaderStageInfo {
|
|
|
|
std::array<ConstBufferInfo, Regs::MaxConstBuffers> const_buffers;
|
|
|
|
};
|
|
|
|
|
2018-03-17 18:08:26 -04:00
|
|
|
std::array<ShaderStageInfo, Regs::MaxShaderStage> shader_stages;
|
2018-03-16 23:06:24 -04:00
|
|
|
};
|
|
|
|
|
2018-03-17 17:17:45 -04:00
|
|
|
State state{};
|
2018-04-07 23:24:50 -04:00
|
|
|
MemoryManager& memory_manager;
|
2018-03-16 23:06:24 -04:00
|
|
|
|
2018-03-28 16:14:47 -04:00
|
|
|
/// Reads a register value located at the input method address
|
|
|
|
u32 GetRegisterValue(u32 method) const;
|
|
|
|
|
2018-03-23 19:56:27 -04:00
|
|
|
/// Write the value to the register identified by method.
|
|
|
|
void WriteReg(u32 method, u32 value, u32 remaining_params);
|
|
|
|
|
|
|
|
/// Returns a list of enabled textures for the specified shader stage.
|
2018-03-26 16:46:49 -04:00
|
|
|
std::vector<Texture::FullTextureInfo> GetStageTextures(Regs::ShaderStage stage) const;
|
2018-03-23 19:56:27 -04:00
|
|
|
|
2018-06-06 13:58:16 -04:00
|
|
|
/// Returns the texture information for a specific texture in a specific shader stage.
|
|
|
|
Texture::FullTextureInfo GetStageTexture(Regs::ShaderStage stage, size_t offset) const;
|
|
|
|
|
2018-02-12 12:34:41 -05:00
|
|
|
private:
|
2018-03-18 05:17:10 -04:00
|
|
|
std::unordered_map<u32, std::vector<u32>> uploaded_macros;
|
|
|
|
|
2018-03-18 04:13:22 -04:00
|
|
|
/// Macro method that is currently being executed / being fed parameters.
|
|
|
|
u32 executing_macro = 0;
|
|
|
|
/// Parameters that have been submitted to the macro call so far.
|
|
|
|
std::vector<u32> macro_params;
|
|
|
|
|
2018-03-28 16:20:18 -04:00
|
|
|
/// Interpreter for the macro codes uploaded to the GPU.
|
|
|
|
MacroInterpreter macro_interpreter;
|
|
|
|
|
2018-03-26 16:46:49 -04:00
|
|
|
/// Retrieves information about a specific TIC entry from the TIC buffer.
|
|
|
|
Texture::TICEntry GetTICEntry(u32 tic_index) const;
|
|
|
|
|
|
|
|
/// Retrieves information about a specific TSC entry from the TSC buffer.
|
|
|
|
Texture::TSCEntry GetTSCEntry(u32 tsc_index) const;
|
|
|
|
|
2018-03-18 04:13:22 -04:00
|
|
|
/**
|
2018-03-18 05:17:10 -04:00
|
|
|
* Call a macro on this engine.
|
2018-03-18 04:13:22 -04:00
|
|
|
* @param method Method to call
|
|
|
|
* @param parameters Arguments to the method call
|
|
|
|
*/
|
2018-03-28 16:20:18 -04:00
|
|
|
void CallMacroMethod(u32 method, std::vector<u32> parameters);
|
2018-03-18 04:13:22 -04:00
|
|
|
|
2018-04-23 21:01:29 -04:00
|
|
|
/// Handles writes to the macro uploading registers.
|
|
|
|
void ProcessMacroUpload(u32 data);
|
|
|
|
|
2018-06-07 00:53:43 -04:00
|
|
|
/// Handles a write to the CLEAR_BUFFERS register.
|
|
|
|
void ProcessClearBuffers();
|
|
|
|
|
2018-02-12 12:34:41 -05:00
|
|
|
/// Handles a write to the QUERY_GET register.
|
|
|
|
void ProcessQueryGet();
|
|
|
|
|
2018-03-18 16:19:47 -04:00
|
|
|
/// Handles a write to the CB_DATA[i] register.
|
|
|
|
void ProcessCBData(u32 value);
|
|
|
|
|
2018-03-17 18:06:23 -04:00
|
|
|
/// Handles a write to the CB_BIND register.
|
2018-03-17 18:08:26 -04:00
|
|
|
void ProcessCBBind(Regs::ShaderStage stage);
|
2018-03-17 18:06:23 -04:00
|
|
|
|
2018-03-04 19:13:15 -05:00
|
|
|
/// Handles a write to the VERTEX_END_GL register, triggering a draw.
|
|
|
|
void DrawArrays();
|
2018-02-11 23:44:12 -05:00
|
|
|
};
|
2018-02-11 21:34:20 -05:00
|
|
|
|
2018-02-12 12:34:41 -05:00
|
|
|
#define ASSERT_REG_POSITION(field_name, position) \
|
|
|
|
static_assert(offsetof(Maxwell3D::Regs, field_name) == position * 4, \
|
|
|
|
"Field " #field_name " has invalid position")
|
|
|
|
|
2018-04-23 21:01:29 -04:00
|
|
|
ASSERT_REG_POSITION(macros, 0x45);
|
2018-03-19 17:46:29 -04:00
|
|
|
ASSERT_REG_POSITION(rt, 0x200);
|
2018-04-18 16:42:40 -04:00
|
|
|
ASSERT_REG_POSITION(viewport_transform[0], 0x280);
|
2018-03-24 02:22:19 -04:00
|
|
|
ASSERT_REG_POSITION(viewport, 0x300);
|
2018-03-21 00:28:06 -04:00
|
|
|
ASSERT_REG_POSITION(vertex_buffer, 0x35D);
|
2018-06-07 00:53:43 -04:00
|
|
|
ASSERT_REG_POSITION(clear_color[0], 0x360);
|
|
|
|
ASSERT_REG_POSITION(clear_depth, 0x364);
|
2018-03-19 17:49:41 -04:00
|
|
|
ASSERT_REG_POSITION(zeta, 0x3F8);
|
2018-03-21 00:33:56 -04:00
|
|
|
ASSERT_REG_POSITION(vertex_attrib_format[0], 0x458);
|
2018-03-19 17:46:29 -04:00
|
|
|
ASSERT_REG_POSITION(rt_control, 0x487);
|
2018-07-02 14:31:20 -04:00
|
|
|
ASSERT_REG_POSITION(depth_test_enable, 0x4B3);
|
2018-06-08 18:04:41 -04:00
|
|
|
ASSERT_REG_POSITION(independent_blend_enable, 0x4B9);
|
2018-07-02 14:31:20 -04:00
|
|
|
ASSERT_REG_POSITION(depth_write_enabled, 0x4BA);
|
2018-07-04 11:26:46 -04:00
|
|
|
ASSERT_REG_POSITION(d3d_cull_mode, 0x4C2);
|
2018-07-02 14:31:20 -04:00
|
|
|
ASSERT_REG_POSITION(depth_test_func, 0x4C3);
|
2018-06-08 18:04:41 -04:00
|
|
|
ASSERT_REG_POSITION(blend, 0x4CF);
|
2018-07-17 16:00:21 -04:00
|
|
|
ASSERT_REG_POSITION(stencil, 0x4E0);
|
2018-07-04 11:26:46 -04:00
|
|
|
ASSERT_REG_POSITION(screen_y_control, 0x4EB);
|
2018-07-02 12:21:23 -04:00
|
|
|
ASSERT_REG_POSITION(vb_element_base, 0x50D);
|
2018-03-19 01:36:25 -04:00
|
|
|
ASSERT_REG_POSITION(tsc, 0x557);
|
2018-03-19 01:32:57 -04:00
|
|
|
ASSERT_REG_POSITION(tic, 0x55D);
|
2018-07-17 16:00:21 -04:00
|
|
|
ASSERT_REG_POSITION(stencil_two_side, 0x565);
|
2018-07-04 11:26:46 -04:00
|
|
|
ASSERT_REG_POSITION(point_coord_replace, 0x581);
|
2018-03-16 20:23:11 -04:00
|
|
|
ASSERT_REG_POSITION(code_address, 0x582);
|
|
|
|
ASSERT_REG_POSITION(draw, 0x585);
|
2018-04-13 14:18:37 -04:00
|
|
|
ASSERT_REG_POSITION(index_array, 0x5F2);
|
2018-07-02 14:31:20 -04:00
|
|
|
ASSERT_REG_POSITION(cull, 0x646);
|
2018-06-07 00:53:43 -04:00
|
|
|
ASSERT_REG_POSITION(clear_buffers, 0x674);
|
2018-02-12 12:34:41 -05:00
|
|
|
ASSERT_REG_POSITION(query, 0x6C0);
|
2018-03-16 23:47:45 -04:00
|
|
|
ASSERT_REG_POSITION(vertex_array[0], 0x700);
|
2018-06-08 18:04:41 -04:00
|
|
|
ASSERT_REG_POSITION(independent_blend, 0x780);
|
2018-03-16 23:47:45 -04:00
|
|
|
ASSERT_REG_POSITION(vertex_array_limit[0], 0x7C0);
|
2018-03-16 20:23:11 -04:00
|
|
|
ASSERT_REG_POSITION(shader_config[0], 0x800);
|
2018-03-17 17:17:45 -04:00
|
|
|
ASSERT_REG_POSITION(const_buffer, 0x8E0);
|
2018-03-17 17:29:20 -04:00
|
|
|
ASSERT_REG_POSITION(cb_bind[0], 0x904);
|
2018-03-18 04:13:22 -04:00
|
|
|
ASSERT_REG_POSITION(tex_cb_index, 0x982);
|
2018-03-18 16:22:06 -04:00
|
|
|
ASSERT_REG_POSITION(ssbo_info, 0xD18);
|
2018-03-18 20:03:20 -04:00
|
|
|
ASSERT_REG_POSITION(tex_info_buffers.address[0], 0xD2A);
|
|
|
|
ASSERT_REG_POSITION(tex_info_buffers.size[0], 0xD2F);
|
2018-02-12 12:34:41 -05:00
|
|
|
|
|
|
|
#undef ASSERT_REG_POSITION
|
|
|
|
|
2018-02-11 21:34:20 -05:00
|
|
|
} // namespace Engines
|
|
|
|
} // namespace Tegra
|