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

« back to all changes in this revision

Viewing changes to src/gallium/drivers/svga/svga_screen.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-08-23 15:37:30 UTC
  • mfrom: (1.7.6)
  • Revision ID: package-import@ubuntu.com-20120823153730-c499sefj7btu4386
Tags: 9.0~git20120821.c1114c61-0ubuntu1
* Merge from unreleased debian git.
  - Includes support for ATI Trinity PCI IDs (LP: #1009089)
* rules, control, libgl1-mesa-swx11*: Remove swx11 support.
* Refresh patches:
  - drop 115_llvm_dynamic_linking.diff,
    117_nullptr_check_in_query_version.patch, and
    118_glsl_initialize_samplers.patch, all upstream
  - disable 116_use_shared_galliumcore.diff until it's reviewed and
    reworked to apply
* not-installed, libegl1-mesa-drivers-install.linux.in: Updated to
  match the single-pass build.
* libgl1-mesa-dri.*install.in: Drop libglsl.so, it's included in
  libdricore.so now.
* rules: Don't disable GLU on the common flags, we need to build it
  on the dri target.
* libglu*install.in: Fix the source file paths to match the build target.
  Drop the static lib from -dev since only shared libs get built.
* libgl1-mesa-dev.install.in: Fix the source file paths to match the
  build target.
* libgl1-mesa-dri.install.linux.in: Don't try to install libgallium.so,
  which isn't built yet.
* rules: Enable llvmpipe on armhf to see if it works or not.
* rules: Remove bin/install-sh on clean, and don't create a symlink for
  it.
* control: Add Pre-Depends on dpkg-dev due to the binaries using xz
  compression.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
   case PIPE_CAPF_MAX_POINT_WIDTH:
110
110
      /* fall-through */
111
111
   case PIPE_CAPF_MAX_POINT_WIDTH_AA:
112
 
      /* Keep this to a reasonable size to avoid failures in
113
 
       * conform/pntaa.c:
114
 
       */
115
 
      return SVGA_MAX_POINTSIZE;
 
112
      return svgascreen->maxPointSize;
116
113
 
117
114
   case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY:
118
115
      if(!sws->get_cap(sws, SVGA3D_DEVCAP_MAX_TEXTURE_ANISOTROPY, &result))
121
118
 
122
119
   case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS:
123
120
      return 15.0;
124
 
 
125
 
   default:
126
 
      return 0;
 
121
   case PIPE_CAPF_GUARD_BAND_LEFT:
 
122
   case PIPE_CAPF_GUARD_BAND_TOP:
 
123
   case PIPE_CAPF_GUARD_BAND_RIGHT:
 
124
   case PIPE_CAPF_GUARD_BAND_BOTTOM:
 
125
      return 0.0;
127
126
   }
 
127
 
 
128
   debug_printf("Unexpected PIPE_CAPF_ query %u\n", param);
 
129
   return 0;
128
130
}
129
131
 
130
132
 
142
144
      return 1;
143
145
   case PIPE_CAP_TWO_SIDED_STENCIL:
144
146
      return 1;
 
147
   case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
 
148
      return 0;
145
149
   case PIPE_CAP_ANISOTROPIC_FILTER:
146
150
      return 1;
147
151
   case PIPE_CAP_POINT_SPRITE:
160
164
      return 1;
161
165
   case PIPE_CAP_TEXTURE_SWIZZLE:
162
166
      return 1;
 
167
   case PIPE_CAP_USER_VERTEX_BUFFERS:
 
168
   case PIPE_CAP_USER_INDEX_BUFFERS:
 
169
      return 0;
 
170
   case PIPE_CAP_USER_CONSTANT_BUFFERS:
 
171
      return 1;
 
172
   case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
 
173
      return 16;
163
174
 
164
175
   case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
165
176
      {
200
211
 
201
212
   case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
202
213
      return 1;
 
214
 
 
215
   case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
 
216
      return 1; /* The color outputs of vertex shaders are not clamped */
 
217
   case PIPE_CAP_VERTEX_COLOR_CLAMPED:
 
218
      return 0; /* The driver can't clamp vertex colors */
 
219
   case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
 
220
      return 0; /* The driver can't clamp fragment colors */
 
221
 
203
222
   case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
204
 
      return 0;
205
 
 
206
 
   default:
207
 
      return 0;
 
223
      return 1; /* expected for GL_ARB_framebuffer_object */
 
224
 
 
225
   case PIPE_CAP_GLSL_FEATURE_LEVEL:
 
226
      return 120;
 
227
 
 
228
   /* Unsupported features */
 
229
   case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
 
230
   case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
 
231
   case PIPE_CAP_SM3:
 
232
   case PIPE_CAP_SHADER_STENCIL_EXPORT:
 
233
   case PIPE_CAP_DEPTH_CLIP_DISABLE:
 
234
   case PIPE_CAP_SEAMLESS_CUBE_MAP:
 
235
   case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
 
236
   case PIPE_CAP_INDEP_BLEND_ENABLE:
 
237
   case PIPE_CAP_INDEP_BLEND_FUNC:
 
238
   case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
 
239
   case PIPE_CAP_PRIMITIVE_RESTART:
 
240
   case PIPE_CAP_TGSI_INSTANCEID:
 
241
   case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
 
242
   case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
 
243
   case PIPE_CAP_SCALED_RESOLVE:
 
244
   case PIPE_CAP_MIN_TEXEL_OFFSET:
 
245
   case PIPE_CAP_MAX_TEXEL_OFFSET:
 
246
   case PIPE_CAP_CONDITIONAL_RENDER:
 
247
   case PIPE_CAP_TEXTURE_BARRIER:
 
248
   case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
 
249
   case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
 
250
   case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
 
251
   case PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS:
 
252
   case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS:
 
253
   case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
 
254
   case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
 
255
   case PIPE_CAP_COMPUTE:
 
256
   case PIPE_CAP_START_INSTANCE:
 
257
   case PIPE_CAP_QUERY_TIMESTAMP:
 
258
      return 0;
 
259
   case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
 
260
      return 1;
208
261
   }
 
262
 
 
263
   debug_printf("Unexpected PIPE_CAP_ query %u\n", param);
 
264
   return 0;
209
265
}
210
266
 
211
267
static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param)
259
315
         return 0;
260
316
      case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
261
317
         return 16;
262
 
      case PIPE_SHADER_CAP_OUTPUT_READ:
 
318
      default:
 
319
         debug_printf("Unexpected vertex shader query %u\n", param);
263
320
         return 0;
264
321
      }
265
322
      break;
304
361
         return 0;
305
362
      case PIPE_SHADER_CAP_INTEGERS:
306
363
         return 0;
307
 
      case PIPE_SHADER_CAP_OUTPUT_READ:
 
364
      case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
308
365
         return 0;
309
366
      default:
310
 
         break;
 
367
         debug_printf("Unexpected vertex shader query %u\n", param);
 
368
         return 0;
311
369
      }
312
370
      break;
 
371
   case PIPE_SHADER_GEOMETRY:
 
372
      /* no support for geometry shaders at this time */
 
373
      return 0;
313
374
   default:
314
 
      break;
 
375
      debug_printf("Unexpected shader type (%u) query\n", shader);
 
376
      return 0;
315
377
   }
316
378
   return 0;
317
379
}
355
417
      /* Often unsupported/problematic. This means we end up with the same
356
418
       * visuals for all virtual hardware implementations.
357
419
       */
358
 
      case PIPE_FORMAT_B4G4R4A4_UNORM:
359
 
      case PIPE_FORMAT_B5G5R5A1_UNORM:
 
420
      case SVGA3D_A4R4G4B4:
 
421
      case SVGA3D_A1R5G5B5:
360
422
         return FALSE;
361
423
         
362
424
      default:
544
606
      }
545
607
   }
546
608
 
 
609
   if (!sws->get_cap(sws, SVGA3D_DEVCAP_MAX_POINT_SIZE, &result)) {
 
610
      svgascreen->maxPointSize = 1.0F;
 
611
   } else {
 
612
      /* Keep this to a reasonable size to avoid failures in
 
613
       * conform/pntaa.c:
 
614
       */
 
615
      svgascreen->maxPointSize = MIN2(result.f, 80.0f);
 
616
   }
 
617
 
547
618
   pipe_mutex_init(svgascreen->tex_mutex);
548
619
   pipe_mutex_init(svgascreen->swc_mutex);
549
620