i965: Start program_string_id from 1, not 0.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Dec 2015 11:18:11 +0000 (03:18 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 23 Dec 2015 01:22:08 +0000 (17:22 -0800)
This way, I can safely use brw_tcs_prog_key::program_string_id == 0
to mean "not filled out because no program exists", which avoids the
need for adding an extra boolean to that struct.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/intel_screen.c

index 2836ecf665c161bddc3673c8ab46aac14b9762f6..a9f58b09422dd3fbd291b4f31c291bc74d17611b 100644 (file)
@@ -1497,6 +1497,7 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
 
    intelScreen->compiler = brw_compiler_create(intelScreen,
                                                intelScreen->devinfo);
+   intelScreen->program_id = 1;
 
    if (intelScreen->devinfo->has_resource_streamer) {
       int val = -1;