mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-22 07:42:52 +00:00
[spir-v] Add is_integer flag to texture descriptors and update image type handling
This commit is contained in:
committed by
Caio Oliveira
parent
04e0b3147b
commit
14d3d5814b
@@ -445,6 +445,7 @@ public:
|
||||
})};
|
||||
// TODO: Read this from TIC
|
||||
texture_descriptors[index].is_multisample |= desc.is_multisample;
|
||||
texture_descriptors[index].is_integer |= desc.is_integer;
|
||||
return index;
|
||||
}
|
||||
|
||||
@@ -607,6 +608,7 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
|
||||
default:
|
||||
break;
|
||||
}
|
||||
const bool is_integer = IsTexturePixelFormatInteger(env, cbuf);
|
||||
u32 index;
|
||||
switch (inst->GetOpcode()) {
|
||||
case IR::Opcode::ImageRead:
|
||||
@@ -627,7 +629,6 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
|
||||
}
|
||||
const bool is_written{inst->GetOpcode() != IR::Opcode::ImageRead};
|
||||
const bool is_read{inst->GetOpcode() != IR::Opcode::ImageWrite};
|
||||
const bool is_integer{IsTexturePixelFormatInteger(env, cbuf)};
|
||||
if (flags.type == TextureType::Buffer) {
|
||||
index = descriptors.Add(ImageBufferDescriptor{
|
||||
.format = flags.image_format,
|
||||
@@ -672,6 +673,7 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
|
||||
.type = flags.type,
|
||||
.is_depth = flags.is_depth != 0,
|
||||
.is_multisample = is_multisample,
|
||||
.is_integer = is_integer,
|
||||
.has_secondary = cbuf.has_secondary,
|
||||
.cbuf_index = cbuf.index,
|
||||
.cbuf_offset = cbuf.offset,
|
||||
|
||||
Reference in New Issue
Block a user