ttn: Fill out more info fields
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 27 Aug 2019 09:34:35 +0000 (11:34 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Tue, 3 Sep 2019 13:54:57 +0000 (15:54 +0200)
We'll use these in radeonsi.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/nir/tgsi_to_nir.c

index 79d04fae9d9e929ceed6e721c2b34462df382ee7..a80f066b7b22e99a8edda249bf24f793d3f3837f 100644 (file)
@@ -2456,6 +2456,10 @@ ttn_compile_init(const void *tgsi_tokens,
    s->num_inputs = scan.file_max[TGSI_FILE_INPUT] + 1;
    s->num_uniforms = scan.const_file_max[0] + 1;
    s->num_outputs = scan.file_max[TGSI_FILE_OUTPUT] + 1;
+   s->info.num_ssbos = util_last_bit(scan.shader_buffers_declared);
+   s->info.num_ubos = util_last_bit(scan.const_buffers_declared >> 1);
+   s->info.num_images = util_last_bit(scan.images_declared);
+   s->info.num_textures = util_last_bit(scan.samplers_declared);
 
    for (unsigned i = 0; i < TGSI_PROPERTY_COUNT; i++) {
       unsigned value = scan.properties[i];