Compare commits
1 commit
dev
...
textureima
Author | SHA1 | Date | |
---|---|---|---|
89468f90a2 |
1 changed files with 10 additions and 4 deletions
|
@ -196,8 +196,11 @@ Id Texture(EmitContext& ctx, IR::TextureInstInfo info, [[maybe_unused]] const IR
|
||||||
}
|
}
|
||||||
|
|
||||||
Id TextureImage(EmitContext& ctx, IR::TextureInstInfo info, const IR::Value& index) {
|
Id TextureImage(EmitContext& ctx, IR::TextureInstInfo info, const IR::Value& index) {
|
||||||
if (!index.IsImmediate() || index.U32() != 0) {
|
// if (!index.IsImmediate() || index.Type() != Shader::IR::Type::U32 || index.U32() != 0) {
|
||||||
throw NotImplementedException("Indirect image indexing");
|
// throw NotImplementedException("Indirect image indexing");
|
||||||
|
// }
|
||||||
|
if (index.Type() != Shader::IR::Type::U32) {
|
||||||
|
LOG_WARNING(Shader_SPIRV, "Non-U32 type provided as index: {}", index.Type());
|
||||||
}
|
}
|
||||||
if (info.type == TextureType::Buffer) {
|
if (info.type == TextureType::Buffer) {
|
||||||
const TextureBufferDefinition& def{ctx.texture_buffers.at(info.descriptor_index)};
|
const TextureBufferDefinition& def{ctx.texture_buffers.at(info.descriptor_index)};
|
||||||
|
@ -215,8 +218,11 @@ Id TextureImage(EmitContext& ctx, IR::TextureInstInfo info, const IR::Value& ind
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<Id, bool> Image(EmitContext& ctx, const IR::Value& index, IR::TextureInstInfo info) {
|
std::pair<Id, bool> Image(EmitContext& ctx, const IR::Value& index, IR::TextureInstInfo info) {
|
||||||
if (!index.IsImmediate() || index.U32() != 0) {
|
// if (!index.IsImmediate() || index.Type() != Shader::IR::Type::U32 || index.U32() != 0) {
|
||||||
throw NotImplementedException("Indirect image indexing");
|
// throw NotImplementedException("Indirect image indexing");
|
||||||
|
// }
|
||||||
|
if (index.Type() != Shader::IR::Type::U32) {
|
||||||
|
LOG_WARNING(Shader_SPIRV, "Non-U32 type provided as index: {}", index.Type());
|
||||||
}
|
}
|
||||||
if (info.type == TextureType::Buffer) {
|
if (info.type == TextureType::Buffer) {
|
||||||
const ImageBufferDefinition def{ctx.image_buffers.at(info.descriptor_index)};
|
const ImageBufferDefinition def{ctx.image_buffers.at(info.descriptor_index)};
|
||||||
|
|
Loading…
Reference in a new issue