mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
llvmpipe: asst. clean-ups in lp_state_surface.c
Signed-off-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
This commit is contained in:
parent
47fa82d48e
commit
03bd429fab
1 changed files with 8 additions and 9 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
*
|
||||
* Copyright 2007 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
|
|
@ -10,11 +10,11 @@
|
|||
* distribute, sub license, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
/* Authors: Keith Whitwell <keithw@vmware.com>
|
||||
|
|
@ -52,7 +52,6 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
|
|||
struct llvmpipe_context *lp = llvmpipe_context(pipe);
|
||||
|
||||
boolean changed = !util_framebuffer_state_equal(&lp->framebuffer, fb);
|
||||
unsigned i;
|
||||
|
||||
assert(fb->width <= LP_MAX_WIDTH);
|
||||
assert(fb->height <= LP_MAX_HEIGHT);
|
||||
|
|
@ -61,7 +60,7 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
|
|||
/*
|
||||
* If no depth buffer is bound, send the utility function the default
|
||||
* format for no bound depth (PIPE_FORMAT_NONE).
|
||||
*/
|
||||
*/
|
||||
enum pipe_format depth_format = fb->zsbuf ?
|
||||
fb->zsbuf->format : PIPE_FORMAT_NONE;
|
||||
const struct util_format_description *depth_desc =
|
||||
|
|
@ -71,7 +70,7 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
|
|||
debug_printf("Illegal setting of fb state with zsbuf created in "
|
||||
"another context\n");
|
||||
}
|
||||
for (i = 0; i < fb->nr_cbufs; i++) {
|
||||
for (unsigned i = 0; i < fb->nr_cbufs; i++) {
|
||||
if (fb->cbufs[i] &&
|
||||
fb->cbufs[i]->context != pipe) {
|
||||
debug_printf("Illegal setting of fb state with cbuf %d created in "
|
||||
|
|
@ -91,13 +90,13 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
|
|||
*/
|
||||
lp->floating_point_depth =
|
||||
(util_get_depth_format_type(depth_desc) == UTIL_FORMAT_TYPE_FLOAT);
|
||||
|
||||
|
||||
lp->mrd = util_get_depth_format_mrd(depth_desc);
|
||||
|
||||
/* Tell the draw module how deep the Z/depth buffer is. */
|
||||
draw_set_zs_format(lp->draw, depth_format);
|
||||
|
||||
lp_setup_bind_framebuffer( lp->setup, &lp->framebuffer );
|
||||
lp_setup_bind_framebuffer(lp->setup, &lp->framebuffer);
|
||||
|
||||
lp->dirty |= LP_NEW_FRAMEBUFFER;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue