mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-14 02:38:29 +12:00
Latte: Bound uniform buffers based on access patterns within the shader
This commit is contained in:
parent
4d6b72b353
commit
3e925b7707
6 changed files with 114 additions and 93 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
#include "Cafe/HW/Latte/Core/LatteConst.h"
|
||||
#include "Cafe/HW/Latte/Renderer/RendererShader.h"
|
||||
#include <boost/container/static_vector.hpp>
|
||||
|
||||
namespace LatteDecompiler
|
||||
{
|
||||
|
@ -158,11 +159,13 @@ struct LatteDecompilerShader
|
|||
struct LatteFetchShader* compatibleFetchShader{};
|
||||
// error tracking
|
||||
bool hasError{false}; // if set, the shader cannot be used
|
||||
// optimized access / iteration
|
||||
// list of uniform buffers used
|
||||
uint8 uniformBufferList[LATTE_NUM_MAX_UNIFORM_BUFFERS];
|
||||
uint8 uniformBufferListCount{ 0 };
|
||||
// list of used texture units (faster access than iterating textureUnitMask)
|
||||
// compact resource lists for optimized access
|
||||
struct QuickBufferEntry
|
||||
{
|
||||
uint8 index;
|
||||
uint16 size;
|
||||
};
|
||||
boost::container::static_vector<QuickBufferEntry, LATTE_NUM_MAX_UNIFORM_BUFFERS> list_quickBufferList;
|
||||
uint8 textureUnitList[LATTE_NUM_MAX_TEX_UNITS];
|
||||
uint8 textureUnitListCount{ 0 };
|
||||
// input
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue