-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/30/2011 03:39 AM, Francisco Jerez wrote:
> "Ian Romanick" <i...@freedesktop.org> writes:
> 
>> From: Ian Romanick <ian.d.roman...@intel.com>
>>
>> Specifically, the following extensions are enabled:
>>
>>     GL_ARB_vertex_program
>>     GL_EXT_gpu_program_paramaters
>>     GL_NV_vertex_program
>>     GL_NV_vertex_program1_1
>>
>> In addition, ctx->Const.MaxCombinedTextureImageUnits is set.
>>
>> This has been compiled, but I don't have any nv10 or nv20 hardware to
>> test.  I only have nv02, nv03, and nv05.  This is the last swtnl that
>> doesn't already have vertex programs enabled.  The enable code was
>> mostly copied from the (now removed) mga driver.
>>
> I'm not convinced that this makes sense. Vertex programs aren't
> functional on nv2x at this moment, and on nv1x they probably never will
> because there's no hardware support for it.

Right.  It's the same as for r100, i830, i915, and several of the
recently removed DRI1 drivers.  For what it's worth, NVIDIA used to
support vertex programs all the way back to Riva TNT (NV03) in their
Windows drivers.

The main reason for doing this is that it allows us to make vertex
program support non-optional.  Once that happens, a lot of conditional
code elsewhere in the stack can be removed.  That has been a bit
contentious, so I'll probably hold off on this patch until those other
issues are resolved.

>> Cc: Ben Skeggs <bske...@redhat.com>
>> Cc: Francisco Jerez <curroje...@riseup.net>
>> Cc: Viktor Novotný <novik...@seznam.cz>
>> ---
>>  src/mesa/drivers/dri/nouveau/nouveau_context.c |    4 ++++
>>  src/mesa/drivers/dri/nouveau/nv10_context.c    |    3 +++
>>  src/mesa/drivers/dri/nouveau/nv20_context.c    |    3 +++
>>  3 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c 
>> b/src/mesa/drivers/dri/nouveau/nouveau_context.c
>> index 1c35578..f713078 100644
>> --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
>> +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
>> @@ -119,6 +119,7 @@ nouveau_context_init(struct gl_context *ctx, struct 
>> nouveau_screen *screen,
>>      /* Enable any supported extensions. */
>>      ctx->Extensions.ARB_multitexture = true;
>>      ctx->Extensions.ARB_texture_mirrored_repeat = true;
>> +    ctx->Extensions.ARB_vertex_program = true;
>>      ctx->Extensions.EXT_blend_color = true;
>>      ctx->Extensions.EXT_blend_logic_op = true;
>>      ctx->Extensions.EXT_blend_minmax = true;
>> @@ -126,6 +127,7 @@ nouveau_context_init(struct gl_context *ctx, struct 
>> nouveau_screen *screen,
>>      ctx->Extensions.EXT_fog_coord = true;
>>      ctx->Extensions.EXT_framebuffer_blit = true;
>>      ctx->Extensions.EXT_framebuffer_object = true;
>> +    ctx->Extensions.EXT_gpu_program_parameters = true;
>>      ctx->Extensions.EXT_packed_depth_stencil = true;
>>      ctx->Extensions.EXT_secondary_color = true;
>>      ctx->Extensions.EXT_stencil_wrap = true;
>> @@ -135,6 +137,8 @@ nouveau_context_init(struct gl_context *ctx, struct 
>> nouveau_screen *screen,
>>      ctx->Extensions.EXT_texture_lod_bias = true;
>>      ctx->Extensions.NV_blend_square = true;
>>      ctx->Extensions.NV_texture_env_combine4 = true;
>> +    ctx->Extensions.NV_vertex_program = true;
>> +    ctx->Extensions.NV_vertex_program1_1 = true;
>>  
>>      return GL_TRUE;
>>  }
>> diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c 
>> b/src/mesa/drivers/dri/nouveau/nv10_context.c
>> index da0ef2b..d6f8fcb 100644
>> --- a/src/mesa/drivers/dri/nouveau/nv10_context.c
>> +++ b/src/mesa/drivers/dri/nouveau/nv10_context.c
>> @@ -442,6 +442,9 @@ nv10_context_create(struct nouveau_screen *screen, const 
>> struct gl_config *visua
>>      ctx->Const.MaxTextureCoordUnits = NV10_TEXTURE_UNITS;
>>      ctx->Const.MaxTextureImageUnits = NV10_TEXTURE_UNITS;
>>      ctx->Const.MaxTextureUnits = NV10_TEXTURE_UNITS;
>> +    ctx->Const.MaxCombinedTextureImageUnits =
>> +       ctx->Const.MaxVertexTextureImageUnits +
>> +       ctx->Const.MaxTextureImageUnits;
>>      ctx->Const.MaxTextureMaxAnisotropy = 2;
>>      ctx->Const.MaxTextureLodBias = 15;
>>      ctx->Driver.Clear = nv10_clear;
>> diff --git a/src/mesa/drivers/dri/nouveau/nv20_context.c 
>> b/src/mesa/drivers/dri/nouveau/nv20_context.c
>> index 2766851..5016568 100644
>> --- a/src/mesa/drivers/dri/nouveau/nv20_context.c
>> +++ b/src/mesa/drivers/dri/nouveau/nv20_context.c
>> @@ -455,6 +455,9 @@ nv20_context_create(struct nouveau_screen *screen, const 
>> struct gl_config *visua
>>      ctx->Const.MaxTextureCoordUnits = NV20_TEXTURE_UNITS;
>>      ctx->Const.MaxTextureImageUnits = NV20_TEXTURE_UNITS;
>>      ctx->Const.MaxTextureUnits = NV20_TEXTURE_UNITS;
>> +    ctx->Const.MaxCombinedTextureImageUnits =
>> +       ctx->Const.MaxVertexTextureImageUnits +
>> +       ctx->Const.MaxTextureImageUnits;
>>      ctx->Const.MaxTextureMaxAnisotropy = 8;
>>      ctx->Const.MaxTextureLodBias = 15;
>>      ctx->Driver.Clear = nv20_clear;

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk5dXNQACgkQX1gOwKyEAw832wCgnlPRliMRogSZURWwyyHnDwIR
kHcAoJL9JS8c9PcwKdFWcwE6RKrSKXjy
=sh5D
-----END PGP SIGNATURE-----
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to