~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/i965/intel_ioctl.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-02-21 12:44:07 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20070221124407-rgcacs32mycrtadl
ImportĀ upstreamĀ versionĀ 6.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
void intel_batch_ioctl( struct intel_context *intel, 
107
107
                        GLuint start_offset,
108
 
                        GLuint used,
109
 
                        GLboolean ignore_cliprects)
 
108
                        GLuint used)
110
109
{
111
110
   drmI830BatchBuffer batch;
112
111
 
114
113
   assert(used);
115
114
 
116
115
   if (0)
117
 
      fprintf(stderr, "%s used %d offset %x..%x ignore_cliprects %d\n",
 
116
      fprintf(stderr, "%s used %d offset %x..%x\n",
118
117
              __FUNCTION__, 
119
118
              used, 
120
119
              start_offset,
121
 
              start_offset + used,
122
 
              ignore_cliprects);
 
120
              start_offset + used);
123
121
 
124
122
   batch.start = start_offset;
125
123
   batch.used = used;
126
 
   batch.cliprects = intel->pClipRects;
127
 
   batch.num_cliprects = ignore_cliprects ? 0 : intel->numClipRects;
 
124
   batch.cliprects = NULL;
 
125
   batch.num_cliprects = 0;
128
126
   batch.DR1 = 0;
129
 
   batch.DR4 = ((((GLuint)intel->drawX) & 0xffff) | 
130
 
                (((GLuint)intel->drawY) << 16));
 
127
   batch.DR4 = 0;
131
128
      
132
129
   if (INTEL_DEBUG & DEBUG_DMA)
133
 
      fprintf(stderr, "%s: 0x%x..0x%x DR4: %x cliprects: %d\n",
 
130
      fprintf(stderr, "%s: 0x%x..0x%x\n",
134
131
              __FUNCTION__, 
135
132
              batch.start, 
136
 
              batch.start + batch.used * 4,
137
 
              batch.DR4, batch.num_cliprects);
 
133
              batch.start + batch.used * 4);
138
134
 
139
135
   if (!intel->no_hw) {
140
136
      if (drmCommandWrite (intel->driFd, DRM_I830_BATCHBUFFER, &batch, 
148
144
 
149
145
void intel_cmd_ioctl( struct intel_context *intel, 
150
146
                      char *buf,
151
 
                      GLuint used,
152
 
                      GLboolean ignore_cliprects)
 
147
                      GLuint used)
153
148
{
154
149
   drmI830CmdBuffer cmd;
155
150
 
159
154
   cmd.buf = buf;
160
155
   cmd.sz = used;
161
156
   cmd.cliprects = intel->pClipRects;
162
 
   cmd.num_cliprects = ignore_cliprects ? 0 : intel->numClipRects;
 
157
   cmd.num_cliprects = 0;
163
158
   cmd.DR1 = 0;
164
 
   cmd.DR4 = ((((GLuint)intel->drawX) & 0xffff) | 
165
 
              (((GLuint)intel->drawY) << 16));
 
159
   cmd.DR4 = 0;
166
160
      
167
161
   if (INTEL_DEBUG & DEBUG_DMA)
168
 
      fprintf(stderr, "%s: 0x%x..0x%x DR4: %x cliprects: %d\n",
 
162
      fprintf(stderr, "%s: 0x%x..0x%x\n",
169
163
              __FUNCTION__, 
170
164
              0, 
171
 
              0 + cmd.sz,
172
 
              cmd.DR4, cmd.num_cliprects);
 
165
              0 + cmd.sz);
173
166
 
174
167
   if (!intel->no_hw) {
175
168
      if (drmCommandWrite (intel->driFd, DRM_I830_CMDBUFFER, &cmd,