aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2012-02-23 18:17:37 +0100
committerJakob Bornecrantz <[email protected]>2012-02-23 19:16:58 +0100
commitbed7b4aa5ff7bab39e9aafe9d78c4ec63f5631bc (patch)
treeb84b5fcc6e4aeef912da6672742079dc67bda4c3 /src
parentbc39de8c0b6bb19e411cfa8606f189c4868a5f01 (diff)
st/dri: Fix crash in st/dri from dri format commit
Introduced with 8de5c355fa2bf0f30df2c7cf39aee01e793284bf, it would probably just crash. Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Jesse Barnes <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index cc8023d02d5..d0be710862b 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -440,8 +440,6 @@ dri2_create_image_from_name(__DRIscreen *_screen,
tex_usage = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
- img->dri_format = format;
-
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565:
pf = PIPE_FORMAT_B5G6R5_UNORM;
@@ -489,6 +487,7 @@ dri2_create_image_from_name(__DRIscreen *_screen,
img->level = 0;
img->layer = 0;
+ img->dri_format = format;
img->loader_private = loaderPrivate;
return img;