projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium: adapt drivers to pipe_constant_buffer removal
[mesa.git]
/
src
/
gallium
/
drivers
/
llvmpipe
/
lp_state.h
diff --git
a/src/gallium/drivers/llvmpipe/lp_state.h
b/src/gallium/drivers/llvmpipe/lp_state.h
index db21096f215a52cf1cb42b2edf52790d7c7bf635..131e3621e94e4d31445dbb0ff18b3e4a75915cf8 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_state.h
+++ b/
src/gallium/drivers/llvmpipe/lp_state.h
@@
-35,6
+35,8
@@
#include "pipe/p_state.h"
#include "tgsi/tgsi_scan.h"
#include "pipe/p_state.h"
#include "tgsi/tgsi_scan.h"
+#include "lp_jit.h"
+#include "lp_bld_sample.h" /* for struct lp_sampler_static_state */
#define LP_NEW_VIEWPORT 0x1
#define LP_NEW_VIEWPORT 0x1
@@
-56,37
+58,32
@@
struct tgsi_sampler;
struct vertex_info;
struct tgsi_sampler;
struct vertex_info;
+struct pipe_context;
+struct llvmpipe_context;
+struct lp_fragment_shader;
-typedef void
-(*lp_shader_fs_func)(uint32_t x,
- uint32_t y,
- const void *a0,
- const void *dadx,
- const void *dady,
- const void *consts,
- uint32_t *mask,
- void *color,
- void *depth,
- struct tgsi_sampler **samplers);
+struct lp_fragment_shader_variant_key
+{
+ enum pipe_format zsbuf_format;
+ struct pipe_depth_state depth;
+ struct pipe_alpha_state alpha;
+ struct pipe_blend_state blend;
-struct lp_fragment_shader;
+ struct lp_sampler_static_state sampler[PIPE_MAX_SAMPLERS];
+};
-/**
- * Subclass of pipe_shader_state (though it doesn't really need to be).
- *
- * This is starting to look an awful lot like a quad pipeline stage...
- */
struct lp_fragment_shader_variant
{
struct lp_fragment_shader *shader;
struct lp_fragment_shader_variant
{
struct lp_fragment_shader *shader;
- struct pipe_alpha_state alpha;
+
+ struct lp_fragment_shader_variant_key key;
LLVMValueRef function;
LLVMValueRef function;
- lp_
shader_fs
_func jit_function;
+ lp_
jit_frag
_func jit_function;
struct lp_fragment_shader_variant *next;
};
struct lp_fragment_shader_variant *next;
};
@@
-103,8
+100,6
@@
struct lp_fragment_shader
struct tgsi_shader_info info;
struct tgsi_shader_info info;
- struct llvmpipe_screen *screen;
-
struct lp_fragment_shader_variant *variants;
struct lp_fragment_shader_variant *current;
struct lp_fragment_shader_variant *variants;
struct lp_fragment_shader_variant *current;
@@
-118,23
+113,6
@@
struct lp_vertex_shader {
};
};
-typedef void
-(*lp_blend_func)(const uint8_t *mask,
- const uint8_t *src,
- const uint8_t *con,
- uint8_t *dst);
-
-
-struct lp_blend_state
-{
- struct pipe_blend_state base;
-
- LLVMValueRef function;
-
- lp_blend_func jit_function;
-};
-
-
void *
llvmpipe_create_blend_state(struct pipe_context *,
void *
llvmpipe_create_blend_state(struct pipe_context *,
@@
-148,6
+126,10
@@
void *
llvmpipe_create_sampler_state(struct pipe_context *,
const struct pipe_sampler_state *);
void llvmpipe_bind_sampler_states(struct pipe_context *, unsigned, void **);
llvmpipe_create_sampler_state(struct pipe_context *,
const struct pipe_sampler_state *);
void llvmpipe_bind_sampler_states(struct pipe_context *, unsigned, void **);
+void
+llvmpipe_bind_vertex_sampler_states(struct pipe_context *,
+ unsigned num_samplers,
+ void **samplers);
void llvmpipe_delete_sampler_state(struct pipe_context *, void *);
void *
void llvmpipe_delete_sampler_state(struct pipe_context *, void *);
void *
@@
-173,7
+155,7
@@
void llvmpipe_set_clip_state( struct pipe_context *,
void llvmpipe_set_constant_buffer(struct pipe_context *,
uint shader, uint index,
void llvmpipe_set_constant_buffer(struct pipe_context *,
uint shader, uint index,
- const struct pipe_
constant_
buffer *buf);
+ const struct pipe_buffer *buf);
void *llvmpipe_create_fs_state(struct pipe_context *,
const struct pipe_shader_state *);
void *llvmpipe_create_fs_state(struct pipe_context *,
const struct pipe_shader_state *);
@@
-194,6
+176,11
@@
void llvmpipe_set_sampler_textures( struct pipe_context *,
unsigned num,
struct pipe_texture ** );
unsigned num,
struct pipe_texture ** );
+void
+llvmpipe_set_vertex_sampler_textures(struct pipe_context *,
+ unsigned num_textures,
+ struct pipe_texture **);
+
void llvmpipe_set_viewport_state( struct pipe_context *,
const struct pipe_viewport_state * );
void llvmpipe_set_viewport_state( struct pipe_context *,
const struct pipe_viewport_state * );
@@
-225,10
+212,6
@@
llvmpipe_draw_range_elements(struct pipe_context *pipe,
unsigned max_index,
unsigned mode, unsigned start, unsigned count);
unsigned max_index,
unsigned mode, unsigned start, unsigned count);
-void
-llvmpipe_set_edgeflags(struct pipe_context *pipe, const unsigned *edgeflags);
-
-
void
llvmpipe_map_transfers(struct llvmpipe_context *lp);
void
llvmpipe_map_transfers(struct llvmpipe_context *lp);