[Mesa-dev] [PATCH] st/mesa: remove ST_NEW_MESA flag

Marek Olšák maraeo at gmail.com
Thu Mar 10 17:09:32 UTC 2016


Yes, please see the attached updated patch.

Thanks,
Marek

On Thu, Mar 10, 2016 at 6:00 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Do you also need to do this when validating the compute pipeline?
>
> On Thu, Mar 10, 2016 at 11:59 AM, Marek Olšák <maraeo at gmail.com> wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> Only used indirectly when checking dirty.st != 0
>> ---
>>  src/mesa/state_tracker/st_context.c | 2 --
>>  src/mesa/state_tracker/st_context.h | 2 +-
>>  src/mesa/state_tracker/st_draw.c    | 4 ++--
>>  3 files changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
>> index e3ddee6..f5a6f85 100644
>> --- a/src/mesa/state_tracker/st_context.c
>> +++ b/src/mesa/state_tracker/st_context.c
>> @@ -141,9 +141,7 @@ void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
>>
>>     /* Invalidate render and compute pipelines. */
>>     st->dirty.mesa |= new_state;
>> -   st->dirty.st |= ST_NEW_MESA;
>>     st->dirty_cp.mesa |= new_state;
>> -   st->dirty_cp.st |= ST_NEW_MESA;
>>
>>     /* This is the only core Mesa module we depend upon.
>>      * No longer use swrast, swsetup, tnl.
>> diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
>> index f960c64..ba51a9c 100644
>> --- a/src/mesa/state_tracker/st_context.h
>> +++ b/src/mesa/state_tracker/st_context.h
>> @@ -50,7 +50,7 @@ struct st_perf_monitor_group;
>>  struct u_upload_mgr;
>>
>>
>> -#define ST_NEW_MESA                    (1 << 0) /* Mesa state has changed */
>> +/* gap  */
>>  #define ST_NEW_FRAGMENT_PROGRAM        (1 << 1)
>>  #define ST_NEW_VERTEX_PROGRAM          (1 << 2)
>>  #define ST_NEW_FRAMEBUFFER             (1 << 3)
>> diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
>> index 2de6620..fdd59a3 100644
>> --- a/src/mesa/state_tracker/st_draw.c
>> +++ b/src/mesa/state_tracker/st_draw.c
>> @@ -201,7 +201,7 @@ st_draw_vbo(struct gl_context *ctx,
>>     st_flush_bitmap_cache(st);
>>
>>     /* Validate state. */
>> -   if (st->dirty.st || ctx->NewDriverState) {
>> +   if (st->dirty.st || st->dirty.mesa || ctx->NewDriverState) {
>>        st_validate_state(st, ST_PIPELINE_RENDER);
>>
>>  #if 0
>> @@ -314,7 +314,7 @@ st_indirect_draw_vbo(struct gl_context *ctx,
>>     assert(stride);
>>
>>     /* Validate state. */
>> -   if (st->dirty.st || ctx->NewDriverState) {
>> +   if (st->dirty.st || st->dirty.mesa || ctx->NewDriverState) {
>>        st_validate_state(st, ST_PIPELINE_RENDER);
>>     }
>>
>> --
>> 2.5.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-st-mesa-remove-ST_NEW_MESA-flag-v2.patch
Type: text/x-diff
Size: 2982 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160310/f4576219/attachment.patch>


More information about the mesa-dev mailing list