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

« back to all changes in this revision

Viewing changes to src/mesa/program/program.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:
169
169
{
170
170
#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
171
171
   _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
172
 
                            (struct gl_vertex_program *)
173
172
                            ctx->Shared->DefaultVertexProgram);
174
173
   assert(ctx->VertexProgram.Current);
175
174
#endif
176
175
 
177
176
#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program
178
177
   _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
179
 
                            (struct gl_fragment_program *)
180
178
                            ctx->Shared->DefaultFragmentProgram);
181
179
   assert(ctx->FragmentProgram.Current);
182
180
#endif
183
181
 
184
182
#if FEATURE_ARB_geometry_shader4
185
183
   _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current,
186
 
                            (struct gl_geometry_program *)
187
 
                            ctx->Shared->DefaultGeometryProgram);
 
184
                      ctx->Shared->DefaultGeometryProgram);
188
185
#endif
189
186
 
190
187
   /* XXX probably move this stuff */
538
535
   switch (prog->Target) {
539
536
   case GL_VERTEX_PROGRAM_ARB:
540
537
      {
541
 
         const struct gl_vertex_program *vp
542
 
            = (const struct gl_vertex_program *) prog;
543
 
         struct gl_vertex_program *vpc = (struct gl_vertex_program *) clone;
 
538
         const struct gl_vertex_program *vp = gl_vertex_program_const(prog);
 
539
         struct gl_vertex_program *vpc = gl_vertex_program(clone);
544
540
         vpc->IsPositionInvariant = vp->IsPositionInvariant;
545
541
         vpc->IsNVProgram = vp->IsNVProgram;
546
542
      }
547
543
      break;
548
544
   case GL_FRAGMENT_PROGRAM_ARB:
549
545
      {
550
 
         const struct gl_fragment_program *fp
551
 
            = (const struct gl_fragment_program *) prog;
552
 
         struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone;
 
546
         const struct gl_fragment_program *fp = gl_fragment_program_const(prog);
 
547
         struct gl_fragment_program *fpc = gl_fragment_program(clone);
553
548
         fpc->UsesKill = fp->UsesKill;
 
549
         fpc->UsesDFdy = fp->UsesDFdy;
554
550
         fpc->OriginUpperLeft = fp->OriginUpperLeft;
555
551
         fpc->PixelCenterInteger = fp->PixelCenterInteger;
556
552
      }
557
553
      break;
558
554
   case MESA_GEOMETRY_PROGRAM:
559
555
      {
560
 
         const struct gl_geometry_program *gp
561
 
            = (const struct gl_geometry_program *) prog;
562
 
         struct gl_geometry_program *gpc = (struct gl_geometry_program *) clone;
 
556
         const struct gl_geometry_program *gp = gl_geometry_program_const(prog);
 
557
         struct gl_geometry_program *gpc = gl_geometry_program(clone);
563
558
         gpc->VerticesOut = gp->VerticesOut;
564
559
         gpc->InputType = gp->InputType;
565
560
         gpc->OutputType = gp->OutputType;
763
758
                             usedTemps, MAX_PROGRAM_TEMPS);
764
759
 
765
760
   if (newProg->Target == GL_FRAGMENT_PROGRAM_ARB) {
766
 
      struct gl_fragment_program *fprogA, *fprogB, *newFprog;
 
761
      const struct gl_fragment_program *fprogA, *fprogB;
 
762
      struct gl_fragment_program *newFprog;
767
763
      GLbitfield progB_inputsRead = progB->InputsRead;
768
764
      GLint progB_colorFile, progB_colorIndex;
769
765
 
770
 
      fprogA = (struct gl_fragment_program *) progA;
771
 
      fprogB = (struct gl_fragment_program *) progB;
772
 
      newFprog = (struct gl_fragment_program *) newProg;
 
766
      fprogA = gl_fragment_program_const(progA);
 
767
      fprogB = gl_fragment_program_const(progB);
 
768
      newFprog = gl_fragment_program(newProg);
773
769
 
774
770
      newFprog->UsesKill = fprogA->UsesKill || fprogB->UsesKill;
 
771
      newFprog->UsesDFdy = fprogA->UsesDFdy || fprogB->UsesDFdy;
775
772
 
776
773
      /* We'll do a search and replace for instances
777
774
       * of progB_colorFile/progB_colorIndex below...