tgsi/scan: track which shader images are really buffers

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle 2016-03-13 15:06:15 -05:00
parent fa096a14af
commit 457f9c6b25
2 changed files with 7 additions and 0 deletions

View File

@ -427,6 +427,9 @@ scan_declaration(struct tgsi_shader_info *info,
}
} else if (file == TGSI_FILE_SAMPLER) {
info->samplers_declared |= 1 << reg;
} else if (file == TGSI_FILE_IMAGE) {
if (fulldecl->Image.Resource == TGSI_TEXTURE_BUFFER)
info->images_buffers |= 1 << reg;
}
}
}

View File

@ -122,6 +122,10 @@ struct tgsi_shader_info
* Indirect image accesses are not reflected in this mask.
*/
unsigned images_writemask;
/**
* Bitmask indicating which declared image is a buffer.
*/
unsigned images_buffers;
/**
* Bitmask indicating which register files are accessed with
* indirect addressing. The bits are (1 << TGSI_FILE_x), etc.