Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Dec 11, 2024
1 parent 9e902d0 commit 9ee33ee
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions include/luisa/xir/instructions/intrinsic.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ enum struct IntrinsicOp {
BINDLESS_BUFFER_READ, // (bindless_array, index: uint, elem_index: uint) -> T
BINDLESS_BUFFER_WRITE,// (bindless_array, index: uint, elem_index: uint, value: T) -> void
BINDLESS_BUFFER_SIZE, // (bindless_array, index: uint, stride: uint) -> size: uint64
BINDLESS_BUFFER_TYPE, // (bindless_array, index: uint) -> uint64 (type id of the element); the returned value
// could be compared with the value of a TypeIDExpr to examine the type of the buffer

BINDLESS_BYTE_BUFFER_READ, // (bindless_array, index: uint, offset_bytes: uint64) -> T
BINDLESS_BYTE_BUFFER_WRITE,// (bindless_array, index: uint, offset_bytes: uint64, value: T) -> void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ LUISA_FALLBACK_WRAPPER void luisa_fallback_wrapper_texture3d_size(const TextureV
auto texture = bindless_handle->slots[slot_index].tex3d; \
auto sampler = bindless_handle->slots[slot_index]._compressed_buffer_size_sampler_2d_sampler_3d & 0x0fu;


LUISA_FALLBACK_WRAPPER void luisa_fallback_wrapper_bindless_texture2d_sample(const BindlessArrayView *handle, uint slot_index, const float2 *uv, float4 *out) noexcept {
LUISA_FALLBACK_BINDLESS_DECODE_TEXTURE2D(handle, slot_index)
*out = luisa_fallback_bindless_texture2d_sample(texture, sampler, uv->x, uv->y);
Expand Down
1 change: 0 additions & 1 deletion src/backends/fallback/fallback_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2512,7 +2512,6 @@ class FallbackCodegen {
case xir::IntrinsicOp::BINDLESS_BUFFER_READ: return _translate_bindless_buffer_read(current, b, inst);
case xir::IntrinsicOp::BINDLESS_BUFFER_WRITE: return _translate_bindless_buffer_write(current, b, inst);
case xir::IntrinsicOp::BINDLESS_BUFFER_SIZE: return _translate_bindless_buffer_size(current, b, inst);
case xir::IntrinsicOp::BINDLESS_BUFFER_TYPE: break;
case xir::IntrinsicOp::BINDLESS_BYTE_BUFFER_READ: return _translate_bindless_buffer_read(current, b, inst, true);
case xir::IntrinsicOp::BINDLESS_BYTE_BUFFER_WRITE: return _translate_bindless_buffer_write(current, b, inst, true);
case xir::IntrinsicOp::BINDLESS_BYTE_BUFFER_SIZE: return _translate_bindless_buffer_size(current, b, inst, true);
Expand Down
2 changes: 0 additions & 2 deletions src/xir/instructions/intrinsic_name_map.inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ luisa::string to_string(IntrinsicOp op) noexcept {
case IntrinsicOp::BINDLESS_BUFFER_READ: return "bindless_buffer_read";
case IntrinsicOp::BINDLESS_BUFFER_WRITE: return "bindless_buffer_write";
case IntrinsicOp::BINDLESS_BUFFER_SIZE: return "bindless_buffer_size";
case IntrinsicOp::BINDLESS_BUFFER_TYPE: return "bindless_buffer_type";
case IntrinsicOp::BINDLESS_BYTE_BUFFER_READ: return "bindless_byte_buffer_read";
case IntrinsicOp::BINDLESS_BYTE_BUFFER_WRITE: return "bindless_byte_buffer_write";
case IntrinsicOp::BINDLESS_BYTE_BUFFER_SIZE: return "bindless_byte_buffer_size";
Expand Down Expand Up @@ -401,7 +400,6 @@ IntrinsicOp intrinsic_op_from_string(luisa::string_view name) noexcept {
{"bindless_buffer_read", IntrinsicOp::BINDLESS_BUFFER_READ},
{"bindless_buffer_write", IntrinsicOp::BINDLESS_BUFFER_WRITE},
{"bindless_buffer_size", IntrinsicOp::BINDLESS_BUFFER_SIZE},
{"bindless_buffer_type", IntrinsicOp::BINDLESS_BUFFER_TYPE},
{"bindless_byte_buffer_read", IntrinsicOp::BINDLESS_BYTE_BUFFER_READ},
{"bindless_byte_buffer_write", IntrinsicOp::BINDLESS_BYTE_BUFFER_WRITE},
{"bindless_byte_buffer_size", IntrinsicOp::BINDLESS_BYTE_BUFFER_SIZE},
Expand Down
2 changes: 1 addition & 1 deletion src/xir/translators/ast2xir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ class AST2XIRContext {
case CallOp::BINDLESS_BUFFER_WRITE: return resource_call(IntrinsicOp::BINDLESS_BUFFER_WRITE);
case CallOp::BINDLESS_BYTE_BUFFER_READ: return resource_call(IntrinsicOp::BINDLESS_BYTE_BUFFER_READ);
case CallOp::BINDLESS_BUFFER_SIZE: return resource_call(IntrinsicOp::BINDLESS_BUFFER_SIZE);
case CallOp::BINDLESS_BUFFER_TYPE: return resource_call(IntrinsicOp::BINDLESS_BUFFER_TYPE);
case CallOp::BINDLESS_BUFFER_TYPE: LUISA_ERROR_WITH_LOCATION("Removed bindless_buffer_type operation.");
case CallOp::BINDLESS_BUFFER_ADDRESS: return resource_call(IntrinsicOp::BINDLESS_BUFFER_DEVICE_ADDRESS);
case CallOp::MAKE_BOOL2: return make_vector_call(Type::of<bool>(), 2);
case CallOp::MAKE_BOOL3: return make_vector_call(Type::of<bool>(), 3);
Expand Down

0 comments on commit 9ee33ee

Please sign in to comment.