Fix DecFmt bug
This commit is contained in:
parent
6a90b8fbb4
commit
1c99ebcbcc
4 changed files with 14 additions and 8 deletions
|
@ -77,12 +77,16 @@ void DecVtxFormat::ComputeID() {
|
||||||
|
|
||||||
void DecVtxFormat::InitializeFromID(uint32_t id) {
|
void DecVtxFormat::InitializeFromID(uint32_t id) {
|
||||||
this->id = id;
|
this->id = id;
|
||||||
uvfmt = (id & 0xF);
|
w0fmt = ((id) & 0xF);
|
||||||
c0fmt = ((id >> 4) & 0xF);
|
w1fmt = ((id >> 4) & 0xF);
|
||||||
c1fmt = ((id >> 8) & 0xF);
|
uvfmt = ((id >> 8) & 0xF);
|
||||||
nrmfmt = ((id >> 12) & 0xF);
|
c0fmt = ((id >> 12) & 0xF);
|
||||||
posfmt = ((id >> 16) & 0xF);
|
c1fmt = ((id >> 16) & 0xF);
|
||||||
uvoff = 0;
|
nrmfmt = ((id >> 20) & 0xF);
|
||||||
|
posfmt = ((id >> 24) & 0xF);
|
||||||
|
w0off = 0;
|
||||||
|
w1off = w0off + DecFmtSize(w0fmt);
|
||||||
|
uvoff = w1off + DecFmtSize(w1fmt);
|
||||||
c0off = uvoff + DecFmtSize(uvfmt);
|
c0off = uvoff + DecFmtSize(uvfmt);
|
||||||
c1off = c0off + DecFmtSize(c0fmt);
|
c1off = c0off + DecFmtSize(c0fmt);
|
||||||
nrmoff = c1off + DecFmtSize(c1fmt);
|
nrmoff = c1off + DecFmtSize(c1fmt);
|
||||||
|
|
|
@ -790,7 +790,7 @@ std::string ShaderManagerGLES::DebugGetShaderString(std::string id, DebugShaderT
|
||||||
// as sometimes these features might have an effect on the ID bits.
|
// as sometimes these features might have an effect on the ID bits.
|
||||||
|
|
||||||
#define CACHE_HEADER_MAGIC 0x83277592
|
#define CACHE_HEADER_MAGIC 0x83277592
|
||||||
#define CACHE_VERSION 8
|
#define CACHE_VERSION 10
|
||||||
struct CacheHeader {
|
struct CacheHeader {
|
||||||
uint32_t magic;
|
uint32_t magic;
|
||||||
uint32_t version;
|
uint32_t version;
|
||||||
|
|
|
@ -76,6 +76,8 @@ static const DeclTypeInfo VComp[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void VertexAttribSetup(VkVertexInputAttributeDescription *attr, int fmt, int offset, PspAttributeLocation location) {
|
static void VertexAttribSetup(VkVertexInputAttributeDescription *attr, int fmt, int offset, PspAttributeLocation location) {
|
||||||
|
assert(fmt != DEC_NONE);
|
||||||
|
assert(fmt < ARRAY_SIZE(VComp));
|
||||||
attr->location = (uint32_t)location;
|
attr->location = (uint32_t)location;
|
||||||
attr->binding = 0;
|
attr->binding = 0;
|
||||||
attr->format = VComp[fmt].type;
|
attr->format = VComp[fmt].type;
|
||||||
|
|
|
@ -350,7 +350,7 @@ VulkanFragmentShader *ShaderManagerVulkan::GetFragmentShaderFromModule(VkShaderM
|
||||||
// instantaneous.
|
// instantaneous.
|
||||||
|
|
||||||
#define CACHE_HEADER_MAGIC 0xff51f420
|
#define CACHE_HEADER_MAGIC 0xff51f420
|
||||||
#define CACHE_VERSION 10
|
#define CACHE_VERSION 12
|
||||||
struct VulkanCacheHeader {
|
struct VulkanCacheHeader {
|
||||||
uint32_t magic;
|
uint32_t magic;
|
||||||
uint32_t version;
|
uint32_t version;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue