#include "state.h"
#include "JitManager.h"
-#include "state_llvm.h"
+#include "gen_state_llvm.h"
#include "pipe/p_defines.h"
#include "pipe/p_shader_tokens.h"
#include "util/u_memory.h"
#include "swr_tex_sample.h"
-#include "swr_context_llvm.h"
+#include "gen_swr_context_llvm.h"
+using namespace SwrJit;
/**
* This provides the bridge between the sampler state store in
const struct swr_sampler_static_state *static_state;
- unsigned shader_type;
+ enum pipe_shader_type shader_type;
};
case PIPE_SHADER_VERTEX:
indices[1] = lp_build_const_int32(gallivm, swr_draw_context_texturesVS);
break;
+ case PIPE_SHADER_GEOMETRY:
+ indices[1] = lp_build_const_int32(gallivm, swr_draw_context_texturesGS);
+ break;
default:
assert(0 && "unsupported shader type");
break;
/* context[0].textures[unit].member */
indices[3] = lp_build_const_int32(gallivm, member_index);
- ptr = LLVMBuildGEP(builder, context_ptr, indices, Elements(indices), "");
+ ptr = LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
if (emit_load)
res = LLVMBuildLoad(builder, ptr, "");
case PIPE_SHADER_VERTEX:
indices[1] = lp_build_const_int32(gallivm, swr_draw_context_samplersVS);
break;
+ case PIPE_SHADER_GEOMETRY:
+ indices[1] = lp_build_const_int32(gallivm, swr_draw_context_samplersGS);
+ break;
default:
assert(0 && "unsupported shader type");
break;
/* context[0].samplers[unit].member */
indices[3] = lp_build_const_int32(gallivm, member_index);
- ptr = LLVMBuildGEP(builder, context_ptr, indices, Elements(indices), "");
+ ptr = LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
if (emit_load)
res = LLVMBuildLoad(builder, ptr, "");
struct lp_build_sampler_soa *
swr_sampler_soa_create(const struct swr_sampler_static_state *static_state,
- unsigned shader_type)
+ enum pipe_shader_type shader_type)
{
struct swr_sampler_soa *sampler;