summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authornobled <[email protected]>2010-08-11 23:36:52 +0300
committerGeorge Sapountzis <[email protected]>2010-08-13 22:57:26 +0300
commit5270deaab682c938e360f0d3b52f35b4027db858 (patch)
treef4bcc3e297833e111a5033c4dab5b1c10401317d /src/gallium
parentd3758feb6b38292d90f4697fa41ea12dce563d5a (diff)
st/dri: Fix segmentation fault in sw drivers
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/dri/sw/drisw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index ae96f1b20e2..249ccd7fcf6 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c
+++ b/src/gallium/state_trackers/dri/sw/drisw.c
@@ -201,7 +201,7 @@ drisw_allocate_textures(struct dri_drawable *drawable,
struct pipe_resource templ;
unsigned width, height;
boolean resized;
- int i;
+ unsigned i;
width = drawable->dPriv->w;
height = drawable->dPriv->h;
@@ -222,7 +222,7 @@ drisw_allocate_textures(struct dri_drawable *drawable,
templ.depth0 = 1;
templ.last_level = 0;
- for (i = 0; i < ST_ATTACHMENT_COUNT; i++) {
+ for (i = 0; i < count; i++) {
enum pipe_format format;
unsigned bind;