[Mesa-dev] [v3 5/8] mesa: Add driver entry point for ARB_texture_view

Courtney Goeltzenleuchter courtney at lunarg.com
Mon Nov 25 16:37:50 PST 2013


On Thu, Nov 21, 2013 at 5:56 PM, Brian Paul <brianp at vmware.com> wrote:

> On 11/19/2013 04:16 PM, Courtney Goeltzenleuchter wrote:
>
>>
>> Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
>> ---
>>   src/mesa/drivers/common/driverfuncs.c | 3 +++
>>   src/mesa/main/dd.h                    | 5 +++++
>>   2 files changed, 8 insertions(+)
>>
>> diff --git a/src/mesa/drivers/common/driverfuncs.c
>> b/src/mesa/drivers/common/driverfuncs.c
>> index 5faa98a..f185688 100644
>> --- a/src/mesa/drivers/common/driverfuncs.c
>> +++ b/src/mesa/drivers/common/driverfuncs.c
>> @@ -211,6 +211,9 @@ _mesa_init_driver_functions(struct dd_function_table
>> *driver)
>>      /* GL_ARB_texture_storage */
>>      driver->AllocTextureStorage = _mesa_alloc_texture_storage;
>>
>> +   /* GL_ARB_texture_view */
>> +   driver->TextureView = NULL;
>> +
>>      /* GL_ARB_texture_multisample */
>>      driver->GetSamplePosition = NULL;
>>   }
>> diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
>> index b5b874f..3e263f4 100644
>> --- a/src/mesa/main/dd.h
>> +++ b/src/mesa/main/dd.h
>> @@ -375,6 +375,11 @@ struct dd_function_table {
>>                                       GLsizei levels, GLsizei width,
>>                                       GLsizei height, GLsizei depth);
>>
>> +   /** Called as part of glTextureView to add views to origTexObj */
>> +   GLboolean (*TextureView)(struct gl_context *ctx,
>> +                            struct gl_texture_object *texObj,
>> +                            struct gl_texture_object *origTexObj);
>>
>
> Either the comment on this function, or the place where it's called from
> should probably be beefed up with more info about what's expected of the
> driver.  Is it possible to return FALSE for any reason beyond out-of-memory?
>
>
When the driver side is done I'll have more details. Ideally this should
never fail as we are simply creating a different way to look at a texture
that already exists.


>
>
>
>  +
>>      /**
>>       * Map a renderbuffer into user space.
>>       * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
>>
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>



-- 
Courtney Goeltzenleuchter
LunarG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131125/8a46d85b/attachment.html>


More information about the mesa-dev mailing list