#ifndef ILO_SHADER_H
#define ILO_SHADER_H
+#include "core/ilo_state_shader.h"
+
#include "ilo_common.h"
enum ilo_kernel_param {
ILO_KERNEL_INPUT_COUNT,
ILO_KERNEL_OUTPUT_COUNT,
ILO_KERNEL_SAMPLER_COUNT,
- ILO_KERNEL_URB_DATA_START_REG,
ILO_KERNEL_SKIP_CBUF0_UPLOAD,
ILO_KERNEL_PCB_CBUF0_SIZE,
ILO_KERNEL_VS_INPUT_EDGEFLAG,
ILO_KERNEL_VS_PCB_UCP_SIZE,
ILO_KERNEL_VS_GEN6_SO,
- ILO_KERNEL_VS_GEN6_SO_START_REG,
ILO_KERNEL_VS_GEN6_SO_POINT_OFFSET,
ILO_KERNEL_VS_GEN6_SO_LINE_OFFSET,
ILO_KERNEL_VS_GEN6_SO_TRI_OFFSET,
ILO_KERNEL_GS_GEN6_SURFACE_SO_BASE,
ILO_KERNEL_GS_GEN6_SURFACE_SO_COUNT,
- ILO_KERNEL_FS_INPUT_Z,
- ILO_KERNEL_FS_INPUT_W,
- ILO_KERNEL_FS_OUTPUT_Z,
- ILO_KERNEL_FS_USE_KILL,
ILO_KERNEL_FS_BARYCENTRIC_INTERPOLATIONS,
ILO_KERNEL_FS_DISPATCH_16_OFFSET,
ILO_KERNEL_FS_SURFACE_RT_BASE,
struct ilo_state_sol;
struct ilo_state_vector;
+union ilo_shader_cso {
+ struct ilo_state_vs vs;
+ struct ilo_state_hs hs;
+ struct ilo_state_ds ds;
+ struct ilo_state_gs gs;
+ struct ilo_state_ps ps;
+
+ struct {
+ struct ilo_state_vs vs;
+ struct ilo_state_gs sol;
+ } vs_sol;
+};
+
struct ilo_shader_cache *
ilo_shader_cache_create(void);
void
ilo_shader_cache_invalidate(struct ilo_shader_cache *shc);
+void
+ilo_shader_cache_get_max_scratch_sizes(const struct ilo_shader_cache *shc,
+ int *vs_scratch_size,
+ int *gs_scratch_size,
+ int *fs_scratch_size);
+
struct ilo_shader_state *
ilo_shader_create_vs(const struct ilo_dev *dev,
const struct pipe_shader_state *state,
void
ilo_shader_destroy(struct ilo_shader_state *shader);
-int
-ilo_shader_get_type(const struct ilo_shader_state *shader);
-
bool
ilo_shader_select_kernel(struct ilo_shader_state *shader,
const struct ilo_state_vector *vec,