diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 17 |
3 files changed, 19 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index b6919a5c6d3..21e8012d46a 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -151,7 +151,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_INDEP_BLEND_ENABLE: return 1; case PIPE_CAP_INDEP_BLEND_FUNC: - return 0; + return 1; case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: return 1; diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 5d83a1e3579..7b7b2721ba8 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -1064,6 +1064,8 @@ lp_setup_begin_query(struct lp_setup_context *setup, { /* init the query to its beginning state */ assert(setup->active_query == NULL); + + set_scene_state(setup, SETUP_ACTIVE, "begin_query"); if (setup->scene) { if (!lp_scene_bin_everywhere(setup->scene, @@ -1093,6 +1095,8 @@ lp_setup_end_query(struct lp_setup_context *setup, struct llvmpipe_query *pq) { union lp_rast_cmd_arg dummy = { 0 }; + set_scene_state(setup, SETUP_ACTIVE, "end_query"); + assert(setup->active_query == pq); setup->active_query = NULL; diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 1b9119eda00..6243a96f454 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -546,6 +546,7 @@ generate_fragment(struct llvmpipe_context *lp, unsigned i; unsigned chan; unsigned cbuf; + boolean cbuf0_write_all; /* Adjust color input interpolation according to flatshade state: */ @@ -559,6 +560,15 @@ generate_fragment(struct llvmpipe_context *lp, } } + /* check if writes to cbuf[0] are to be copied to all cbufs */ + cbuf0_write_all = FALSE; + for (i = 0;i < shader->info.base.num_properties; i++) { + if (shader->info.base.properties[i].name == + TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS) { + cbuf0_write_all = TRUE; + break; + } + } /* TODO: actually pick these based on the fs and color buffer * characteristics. */ @@ -697,9 +707,10 @@ generate_fragment(struct llvmpipe_context *lp, mask_input, counter); - for(cbuf = 0; cbuf < key->nr_cbufs; cbuf++) - for(chan = 0; chan < NUM_CHANNELS; ++chan) - fs_out_color[cbuf][chan][i] = out_color[cbuf][chan]; + for (cbuf = 0; cbuf < key->nr_cbufs; cbuf++) + for (chan = 0; chan < NUM_CHANNELS; ++chan) + fs_out_color[cbuf][chan][i] = + out_color[cbuf * !cbuf0_write_all][chan]; } sampler->destroy(sampler); |