si_set_internal_const_buffer(sctx, SI_HS_CONST_DEFAULT_TESS_LEVELS, &cb);
}
-static void si_set_patch_vertices(struct pipe_context *ctx, uint8_t patch_vertices)
-{
- struct si_context *sctx = (struct si_context *)ctx;
-
- if (sctx->patch_vertices != patch_vertices) {
- sctx->patch_vertices = patch_vertices;
- si_update_tess_in_out_patch_vertices(sctx);
- }
-}
-
static void si_texture_barrier(struct pipe_context *ctx, unsigned flags)
{
struct si_context *sctx = (struct si_context *)ctx;
sctx->b.texture_barrier = si_texture_barrier;
sctx->b.set_min_samples = si_set_min_samples;
sctx->b.set_tess_state = si_set_tess_state;
- sctx->b.set_patch_vertices = si_set_patch_vertices;
sctx->b.set_active_query_state = si_set_active_query_state;
}
bool si_update_spi_tmpring_size(struct si_context *sctx, unsigned bytes);
unsigned si_get_shader_prefetch_size(struct si_shader *shader);
bool si_set_tcs_to_fixed_func_shader(struct si_context *sctx);
-void si_update_tess_in_out_patch_vertices(struct si_context *sctx);
/* si_state_draw.cpp */
void si_cp_dma_prefetch(struct si_context *sctx, struct pipe_resource *buf,
#include "util/u_prim.h"
#include "tgsi/tgsi_from_mesa.h"
+static void si_update_tess_in_out_patch_vertices(struct si_context *sctx);
+
unsigned si_determine_wave_size(struct si_screen *sscreen, struct si_shader *shader)
{
/* There are a few uses that pass shader=NULL here, expecting the default compute wave size. */
return true;
}
-void si_update_tess_in_out_patch_vertices(struct si_context *sctx)
+static void si_update_tess_in_out_patch_vertices(struct si_context *sctx)
{
if (sctx->is_user_tcs) {
struct si_shader_selector *tcs = sctx->shader.tcs.cso;
}
}
+static void si_set_patch_vertices(struct pipe_context *ctx, uint8_t patch_vertices)
+{
+ struct si_context *sctx = (struct si_context *)ctx;
+
+ if (sctx->patch_vertices != patch_vertices) {
+ sctx->patch_vertices = patch_vertices;
+ si_update_tess_in_out_patch_vertices(sctx);
+ }
+}
+
void si_init_screen_live_shader_cache(struct si_screen *sscreen)
{
util_live_shader_cache_init(&sscreen->live_shader_cache, si_create_shader_selector,
sctx->b.delete_tes_state = si_delete_shader_selector;
sctx->b.delete_gs_state = si_delete_shader_selector;
sctx->b.delete_fs_state = si_delete_shader_selector;
+
+ sctx->b.set_patch_vertices = si_set_patch_vertices;
}