i965: annotate struct intel_image_format as const

Already used as such througout the code.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Emil Velikov 2017-07-31 19:45:26 +01:00 committed by Emil Velikov
parent 31a6750988
commit 69fa9e91cb
3 changed files with 10 additions and 10 deletions

View file

@ -80,7 +80,7 @@ struct __DRIimageRec {
*/
uint32_t strides[3];
uint32_t offsets[3];
struct intel_image_format *planar_format;
const struct intel_image_format *planar_format;
/* particular miptree level */
GLuint width;

View file

@ -859,7 +859,7 @@ static struct intel_mipmap_tree *
miptree_create_for_planar_image(struct brw_context *brw,
__DRIimage *image, GLenum target)
{
struct intel_image_format *f = image->planar_format;
const struct intel_image_format *f = image->planar_format;
struct intel_mipmap_tree *planar_mt = NULL;
for (int i = 0; i < f->nplanes; i++) {

View file

@ -187,7 +187,7 @@ static const struct __DRI2flushExtensionRec intelFlushExtension = {
.flush_with_flags = intel_dri2_flush_with_flags,
};
static struct intel_image_format intel_image_formats[] = {
static const struct intel_image_format intel_image_formats[] = {
{ __DRI_IMAGE_FOURCC_ARGB8888, __DRI_IMAGE_COMPONENTS_RGBA, 1,
{ { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB8888, 4 } } },
@ -346,10 +346,10 @@ intel_image_warn_if_unaligned(__DRIimage *image, const char *func)
}
}
static struct intel_image_format *
static const struct intel_image_format *
intel_image_format_lookup(int fourcc)
{
struct intel_image_format *f = NULL;
const struct intel_image_format *f = NULL;
for (unsigned i = 0; i < ARRAY_SIZE(intel_image_formats); i++) {
if (intel_image_formats[i].fourcc == fourcc) {
@ -818,7 +818,7 @@ intel_create_image_from_names(__DRIscreen *dri_screen,
int *strides, int *offsets,
void *loaderPrivate)
{
struct intel_image_format *f = NULL;
const struct intel_image_format *f = NULL;
__DRIimage *image;
int i, index;
@ -855,7 +855,7 @@ intel_create_image_from_fds_common(__DRIscreen *dri_screen,
void *loaderPrivate)
{
struct intel_screen *screen = dri_screen->driverPrivate;
struct intel_image_format *f;
const struct intel_image_format *f;
__DRIimage *image;
int i, index;
bool ok;
@ -992,7 +992,7 @@ intel_create_image_from_dma_bufs2(__DRIscreen *dri_screen,
void *loaderPrivate)
{
__DRIimage *image;
struct intel_image_format *f = intel_image_format_lookup(fourcc);
const struct intel_image_format *f = intel_image_format_lookup(fourcc);
if (!f) {
*error = __DRI_IMAGE_ERROR_BAD_MATCH;
@ -1075,7 +1075,7 @@ intel_query_dma_buf_modifiers(__DRIscreen *_screen, int fourcc, int max,
int *count)
{
struct intel_screen *screen = _screen->driverPrivate;
struct intel_image_format *f;
const struct intel_image_format *f;
int num_mods = 0, i;
f = intel_image_format_lookup(fourcc);
@ -1117,7 +1117,7 @@ static __DRIimage *
intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate)
{
int width, height, offset, stride, dri_format, index;
struct intel_image_format *f;
const struct intel_image_format *f;
__DRIimage *image;
if (parent == NULL || parent->planar_format == NULL)