Texture descriptors in gfx10 are very different.
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
hw_level = 0;
}
- si_make_texture_descriptor(screen, tex,
+ screen->make_texture_descriptor(screen, tex,
false, res->b.b.target,
view->format, swizzle,
hw_level, hw_level,
uint64_t debug_flags;
char renderer_string[183];
+ void (*make_texture_descriptor)(
+ struct si_screen *screen,
+ struct si_texture *tex,
+ bool sampler,
+ enum pipe_texture_target target,
+ enum pipe_format pipe_format,
+ const unsigned char state_swizzle[4],
+ unsigned first_level, unsigned last_level,
+ unsigned first_layer, unsigned last_layer,
+ unsigned width, unsigned height, unsigned depth,
+ uint32_t *state,
+ uint32_t *fmask_state);
+
unsigned pa_sc_raster_config;
unsigned pa_sc_raster_config_1;
unsigned se_tile_repeat;
/**
* Build the sampler view descriptor for a texture.
*/
-void
+static void
si_make_texture_descriptor(struct si_screen *screen,
struct si_texture *tex,
bool sampler,
state->u.tex.first_level,
state->format);
- si_make_texture_descriptor(sctx->screen, tex, true,
+ sctx->screen->make_texture_descriptor(sctx->screen, tex, true,
state->target, pipe_format, state_swizzle,
first_level, last_level,
state->u.tex.first_layer, last_layer,
void si_init_screen_state_functions(struct si_screen *sscreen)
{
sscreen->b.is_format_supported = si_is_format_supported;
+
+ sscreen->make_texture_descriptor = si_make_texture_descriptor;
}
static void si_set_grbm_gfx_index(struct si_context *sctx,
enum pipe_format format,
unsigned offset, unsigned size,
uint32_t *state);
-void
-si_make_texture_descriptor(struct si_screen *screen,
- struct si_texture *tex,
- bool sampler,
- enum pipe_texture_target target,
- enum pipe_format pipe_format,
- const unsigned char state_swizzle[4],
- unsigned first_level, unsigned last_level,
- unsigned first_layer, unsigned last_layer,
- unsigned width, unsigned height, unsigned depth,
- uint32_t *state,
- uint32_t *fmask_state);
struct pipe_sampler_view *
si_create_sampler_view_custom(struct pipe_context *ctx,
struct pipe_resource *texture,
bool is_array = util_texture_is_array(res->target);
uint32_t desc[8];
- si_make_texture_descriptor(sscreen, tex, true,
+ sscreen->make_texture_descriptor(sscreen, tex, true,
res->target, res->format,
swizzle, 0, res->last_level, 0,
is_array ? res->array_size - 1 : 0,