#include "nir.h"
#include "nir_builder.h"
#include "d3d12_compiler.h"
+#include "d3d12_nir_passes.h"
#include "program/prog_statevars.h"
struct lower_state {
#include "nir_builder.h"
#include "nir_builtin_builder.h"
-bool
+static bool
lower_sample_tex_compare_filter(const nir_instr *instr,
UNUSED const void *_options)
{
}
}
-bool
+static bool
lower_bool_input_filter(const nir_instr *instr,
UNUSED const void *_options)
{
return progress;
}
-bool
+static bool
lower_load_ubo_packed_filter(const nir_instr *instr,
UNUSED const void *_options) {
if (instr->type != nir_instr_type_intrinsic)
bool
dxil_buffer_align(struct dxil_buffer *b);
-static bool
+static inline bool
dxil_buffer_emit_abbrev_id(struct dxil_buffer *b, uint32_t id)
{
return dxil_buffer_emit_bits(b, id, b->abbrev_width);
dxil_buffer_finish(&m->buf);
}
-bool
+static bool
emit_bits64(struct dxil_buffer *b, uint64_t data, unsigned width)
{
if (data > UINT32_MAX) {
return emit_record_no_abbrev(&m->buf, CST_CODE_UNDEF, NULL, 0);
}
-uint64_t
+static uint64_t
encode_signed(int64_t value)
{
return value >= 0 ?
return true;
}
-bool
+static bool
emit_module_consts(struct dxil_module *m)
{
return enter_subblock(m, DXIL_CONST_BLOCK, 4) &&
data, ARRAY_SIZE(data));
}
-bool
+static bool
emit_branch(struct dxil_module *m, struct dxil_instr *instr)
{
assert(instr->type == INSTR_BR);
data, ARRAY_SIZE(data));
}
-bool
+static bool
emit_phi(struct dxil_module *m, struct dxil_instr *instr)
{
assert(instr->type == INSTR_PHI);
return true;
}
-void
+static void
lower_load_vec32(nir_builder *b, nir_ssa_def *index, unsigned num_comps, nir_ssa_def **comps, nir_intrinsic_op op)
{
for (unsigned i = 0; i < num_comps; i++) {
return progress;
}
-bool
+static bool
lower_load_ubo(nir_builder *b, nir_intrinsic_instr *intr)
{
assert(intr->dest.is_ssa);
return progress;
}
+static bool
lower_shared_atomic(nir_builder *b, nir_intrinsic_instr *intr,
nir_intrinsic_op dxil_op)
{
#include "nir_builder.h"
#include "nir_builtin_builder.h"
-bool
+static bool
lower_sample_to_txf_for_integer_tex_filter(const nir_instr *instr,
UNUSED const void *_options)
{
return (tex->dest_type & (nir_type_int | nir_type_uint));
}
-nir_ssa_def *
+static nir_ssa_def *
dx_get_texture_lod(nir_builder *b, nir_tex_instr *tex)
{
nir_tex_instr *tql;
return nir_build_imm(b, ndest_comp, 32, const_value);
}
-nir_tex_instr *
+static nir_tex_instr *
create_txf_from_tex(nir_builder *b, nir_tex_instr *tex)
{
nir_tex_instr *txf;
}
}
-const struct dxil_value *
+static const struct dxil_value *
load_ubo(struct ntd_context *ctx, const struct dxil_value *handle,
const struct dxil_value *offset, enum overload_type overload)
{
dxil_emit_module(&ctx->mod);
}
-unsigned int
+static unsigned int
get_dxil_shader_kind(struct nir_shader *s)
{
switch (s->info.stage) {