Browse Source

radeonsi: rename si_textures_info -> si_samplers, si_images_info -> si_images

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
tags/17.3-branchpoint
Marek Olšák 8 years ago
parent
commit
23cdde5138

+ 5
- 5
src/gallium/drivers/radeonsi/si_blit.c View File



static void static void
si_decompress_sampler_depth_textures(struct si_context *sctx, si_decompress_sampler_depth_textures(struct si_context *sctx,
struct si_textures_info *textures)
struct si_samplers *textures)
{ {
unsigned i; unsigned i;
unsigned mask = textures->needs_depth_decompress_mask; unsigned mask = textures->needs_depth_decompress_mask;


static void static void
si_decompress_sampler_color_textures(struct si_context *sctx, si_decompress_sampler_color_textures(struct si_context *sctx,
struct si_textures_info *textures)
struct si_samplers *textures)
{ {
unsigned i; unsigned i;
unsigned mask = textures->needs_color_decompress_mask; unsigned mask = textures->needs_color_decompress_mask;


static void static void
si_decompress_image_color_textures(struct si_context *sctx, si_decompress_image_color_textures(struct si_context *sctx,
struct si_images_info *images)
struct si_images *images)
{ {
unsigned i; unsigned i;
unsigned mask = images->needs_color_decompress_mask; unsigned mask = images->needs_color_decompress_mask;
} }


static void si_check_render_feedback_textures(struct si_context *sctx, static void si_check_render_feedback_textures(struct si_context *sctx,
struct si_textures_info *textures)
struct si_samplers *textures)
{ {
uint32_t mask = textures->views.enabled_mask; uint32_t mask = textures->views.enabled_mask;


} }


static void si_check_render_feedback_images(struct si_context *sctx, static void si_check_render_feedback_images(struct si_context *sctx,
struct si_images_info *images)
struct si_images *images)
{ {
uint32_t mask = images->enabled_mask; uint32_t mask = images->enabled_mask;



+ 11
- 11
src/gallium/drivers/radeonsi/si_descriptors.c View File

unsigned slot, struct pipe_sampler_view *view, unsigned slot, struct pipe_sampler_view *view,
bool disallow_early_out) bool disallow_early_out)
{ {
struct si_textures_info *samplers = &sctx->samplers[shader];
struct si_samplers *samplers = &sctx->samplers[shader];
struct si_sampler_views *views = &samplers->views; struct si_sampler_views *views = &samplers->views;
struct si_sampler_view *rview = (struct si_sampler_view*)view; struct si_sampler_view *rview = (struct si_sampler_view*)view;
struct si_descriptors *descs = si_sampler_and_image_descriptors(sctx, shader); struct si_descriptors *descs = si_sampler_and_image_descriptors(sctx, shader);
static void si_update_shader_needs_decompress_mask(struct si_context *sctx, static void si_update_shader_needs_decompress_mask(struct si_context *sctx,
unsigned shader) unsigned shader)
{ {
struct si_textures_info *samplers = &sctx->samplers[shader];
struct si_samplers *samplers = &sctx->samplers[shader];
unsigned shader_bit = 1 << shader; unsigned shader_bit = 1 << shader;


if (samplers->needs_depth_decompress_mask || if (samplers->needs_depth_decompress_mask ||
} }


static void static void
si_samplers_update_needs_color_decompress_mask(struct si_textures_info *samplers)
si_samplers_update_needs_color_decompress_mask(struct si_samplers *samplers)
{ {
unsigned mask = samplers->views.enabled_mask; unsigned mask = samplers->views.enabled_mask;


/* IMAGE VIEWS */ /* IMAGE VIEWS */


static void static void
si_release_image_views(struct si_images_info *images)
si_release_image_views(struct si_images *images)
{ {
unsigned i; unsigned i;


} }


static void static void
si_image_views_begin_new_cs(struct si_context *sctx, struct si_images_info *images)
si_image_views_begin_new_cs(struct si_context *sctx, struct si_images *images)
{ {
uint mask = images->enabled_mask; uint mask = images->enabled_mask;


static void static void
si_disable_shader_image(struct si_context *ctx, unsigned shader, unsigned slot) si_disable_shader_image(struct si_context *ctx, unsigned shader, unsigned slot)
{ {
struct si_images_info *images = &ctx->images[shader];
struct si_images *images = &ctx->images[shader];


if (images->enabled_mask & (1u << slot)) { if (images->enabled_mask & (1u << slot)) {
struct si_descriptors *descs = si_sampler_and_image_descriptors(ctx, shader); struct si_descriptors *descs = si_sampler_and_image_descriptors(ctx, shader);
unsigned slot, const struct pipe_image_view *view, unsigned slot, const struct pipe_image_view *view,
bool skip_decompress) bool skip_decompress)
{ {
struct si_images_info *images = &ctx->images[shader];
struct si_images *images = &ctx->images[shader];
struct si_descriptors *descs = si_sampler_and_image_descriptors(ctx, shader); struct si_descriptors *descs = si_sampler_and_image_descriptors(ctx, shader);
struct r600_resource *res; struct r600_resource *res;
unsigned desc_slot = si_get_image_slot(slot); unsigned desc_slot = si_get_image_slot(slot);
} }


static void static void
si_images_update_needs_color_decompress_mask(struct si_images_info *images)
si_images_update_needs_color_decompress_mask(struct si_images *images)
{ {
unsigned mask = images->enabled_mask; unsigned mask = images->enabled_mask;


unsigned start, unsigned count, void **states) unsigned start, unsigned count, void **states)
{ {
struct si_context *sctx = (struct si_context *)ctx; struct si_context *sctx = (struct si_context *)ctx;
struct si_textures_info *samplers = &sctx->samplers[shader];
struct si_samplers *samplers = &sctx->samplers[shader];
struct si_descriptors *desc = si_sampler_and_image_descriptors(sctx, shader); struct si_descriptors *desc = si_sampler_and_image_descriptors(sctx, shader);
struct si_sampler_state **sstates = (struct si_sampler_state**)states; struct si_sampler_state **sstates = (struct si_sampler_state**)states;
int i; int i;
/* Shader images */ /* Shader images */
if (rbuffer->bind_history & PIPE_BIND_SHADER_IMAGE) { if (rbuffer->bind_history & PIPE_BIND_SHADER_IMAGE) {
for (shader = 0; shader < SI_NUM_SHADERS; ++shader) { for (shader = 0; shader < SI_NUM_SHADERS; ++shader) {
struct si_images_info *images = &sctx->images[shader];
struct si_images *images = &sctx->images[shader];
struct si_descriptors *descs = struct si_descriptors *descs =
si_sampler_and_image_descriptors(sctx, shader); si_sampler_and_image_descriptors(sctx, shader);
unsigned mask = images->enabled_mask; unsigned mask = images->enabled_mask;


for (shader = 0; shader < SI_NUM_SHADERS; shader++) { for (shader = 0; shader < SI_NUM_SHADERS; shader++) {
struct si_sampler_views *samplers = &sctx->samplers[shader].views; struct si_sampler_views *samplers = &sctx->samplers[shader].views;
struct si_images_info *images = &sctx->images[shader];
struct si_images *images = &sctx->images[shader];
unsigned mask; unsigned mask;


/* Images. */ /* Images. */

+ 4
- 4
src/gallium/drivers/radeonsi/si_pipe.h View File

bool uses_scratch; bool uses_scratch;
}; };


struct si_textures_info {
struct si_samplers {
struct si_sampler_views views; struct si_sampler_views views;
uint32_t needs_depth_decompress_mask; uint32_t needs_depth_decompress_mask;
uint32_t needs_color_decompress_mask; uint32_t needs_color_decompress_mask;
}; };


struct si_images_info {
struct si_images {
struct pipe_image_view views[SI_NUM_IMAGES]; struct pipe_image_view views[SI_NUM_IMAGES];
uint32_t needs_color_decompress_mask; uint32_t needs_color_decompress_mask;
unsigned enabled_mask; unsigned enabled_mask;
unsigned shader_needs_decompress_mask; unsigned shader_needs_decompress_mask;
struct si_buffer_resources rw_buffers; struct si_buffer_resources rw_buffers;
struct si_buffer_resources const_and_shader_buffers[SI_NUM_SHADERS]; struct si_buffer_resources const_and_shader_buffers[SI_NUM_SHADERS];
struct si_textures_info samplers[SI_NUM_SHADERS];
struct si_images_info images[SI_NUM_SHADERS];
struct si_samplers samplers[SI_NUM_SHADERS];
struct si_images images[SI_NUM_SHADERS];


/* other shader resources */ /* other shader resources */
struct pipe_constant_buffer null_const_buf; /* used for set_constant_buffer(NULL) on CIK */ struct pipe_constant_buffer null_const_buf; /* used for set_constant_buffer(NULL) on CIK */

Loading…
Cancel
Save