GL_ARB_texture_buffer_object_rgb32 DONE (freedreno, i965/gen6+, softpipe, swr)
GL_ARB_texture_cube_map_array DONE (i965/gen6+, nv50, softpipe, swr, zink)
GL_ARB_texture_gather DONE (freedreno, i965/gen6+, nv50, softpipe, swr, v3d, panfrost)
- GL_ARB_texture_query_lod DONE (freedreno, i965, nv50, softpipe, swr, v3d, panfrost)
+ GL_ARB_texture_query_lod DONE (freedreno, i965, nv50, softpipe, swr, v3d, panfrost, zink)
GL_ARB_transform_feedback2 DONE (i965/gen6+, nv50, softpipe, swr, v3d, panfrost)
GL_ARB_transform_feedback3 DONE (i965/gen7+, softpipe, swr)
tex->op == nir_texop_txd ||
tex->op == nir_texop_txf ||
tex->op == nir_texop_txf_ms ||
- tex->op == nir_texop_txs);
+ tex->op == nir_texop_txs ||
+ tex->op == nir_texop_lod);
assert(tex->texture_index == tex->sampler_index);
SpvId coord = 0, proj = 0, bias = 0, lod = 0, dref = 0, dx = 0, dy = 0,
constituents,
coord_components);
}
-
+ if (tex->op == nir_texop_lod) {
+ SpvId result = spirv_builder_emit_image_query_lod(&ctx->builder,
+ dest_type, load,
+ coord);
+ store_dest(ctx, &tex->dest, result, tex->dest_type);
+ return;
+ }
SpvId actual_dest_type = dest_type;
if (dref)
actual_dest_type = spirv_builder_type_float(&ctx->builder, 32);
}
SpvId
+spirv_builder_emit_image_query_lod(struct spirv_builder *b,
+ SpvId result_type,
+ SpvId image,
+ SpvId coords)
+{
+ int opcode = SpvOpImageQueryLod;
+ int words = 5;
+
+ SpvId result = spirv_builder_new_id(b);
+ spirv_buffer_prepare(&b->instructions, b->mem_ctx, words);
+ spirv_buffer_emit_word(&b->instructions, opcode | (words << 16));
+ spirv_buffer_emit_word(&b->instructions, result_type);
+ spirv_buffer_emit_word(&b->instructions, result);
+ spirv_buffer_emit_word(&b->instructions, image);
+ spirv_buffer_emit_word(&b->instructions, coords);
+
+ return result;
+}
+
+SpvId
spirv_builder_emit_ext_inst(struct spirv_builder *b, SpvId result_type,
SpvId set, uint32_t instruction,
const SpvId *args, size_t num_args)
SpvId lod);
SpvId
+spirv_builder_emit_image_query_lod(struct spirv_builder *b,
+ SpvId result_type,
+ SpvId image,
+ SpvId coords);
+
+SpvId
spirv_builder_emit_ext_inst(struct spirv_builder *b, SpvId result_type,
SpvId set, uint32_t instruction,
const SpvId args[], size_t num_args);
case PIPE_CAP_NPOT_TEXTURES:
case PIPE_CAP_TGSI_TEXCOORD:
case PIPE_CAP_DRAW_INDIRECT:
+ case PIPE_CAP_TEXTURE_QUERY_LOD:
return 1;
case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: