Commit 435de835 authored by Adam Jackson's avatar Adam Jackson 🎧 Committed by Marge Bot
Browse files

swrast: Remove the classic swrast DRI driver

Following up from the classic swrast OSMesa removal in favor of
llvmpipe/softpipe, remove the classic swrast DRI driver.  It's unused by
any distribution -- debian was the last holdout until this week, which had
it enabled instead of softpipe on obscure platforms (non-LLVM and hurd).
Now that debian has switched, remove the driver so nobody can accidentally
enable it again.

Fixes: #325, #324, #322, #321, #319, #318, #317, #315, #313, #311, #310,
       #306, #305, #304, #302, #301, #300, #299, #298, #297, #293, #289



Reviewed-by: Eric Anholt <eric@anholt.net> (commit message rewritten)
Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
Part-of: <!8069>
parent 38529675
......@@ -8,3 +8,4 @@ Add support for VK_VALVE_mutable_descriptor_type on RADV
Removed classic OSMesa in favor of the newly improved gallium OSMesa
VK_KHR_fragment_shading_rate on RADV (RDNA2 only)
Freedreno a6xx exposes GL 3.2
Classic swrast dri driver removed in favor of gallium swrast (llvmpipe or softpipe)
......@@ -183,7 +183,6 @@ with_dri_i965 = dri_drivers.contains('i965')
with_dri_r100 = dri_drivers.contains('r100')
with_dri_r200 = dri_drivers.contains('r200')
with_dri_nouveau = dri_drivers.contains('nouveau')
with_dri_swrast = dri_drivers.contains('swrast')
with_dri = dri_drivers.length() != 0
......@@ -283,9 +282,6 @@ with_any_intel = with_dri_i965 or with_intel_vk or with_gallium_iris
if with_swrast_vk and not with_gallium_softpipe
error('swrast vulkan requires gallium swrast')
endif
if with_dri_swrast and (with_gallium_softpipe or with_gallium_swr)
error('Only one swrast provider can be built')
endif
if with_dri_i915 and with_gallium_i915
error('Only one i915 provider can be built')
endif
......
......@@ -45,7 +45,7 @@ option(
'dri-drivers',
type : 'array',
value : ['auto'],
choices : ['auto', 'i915', 'i965', 'r100', 'r200', 'nouveau', 'swrast'],
choices : ['auto', 'i915', 'i965', 'r100', 'r200', 'nouveau'],
description : 'List of dri drivers to build. If this is set to auto all drivers applicable to the target OS/architecture will be built'
)
option(
......
......@@ -22,11 +22,6 @@ subdir('common')
_dri_drivers = []
_dri_link = []
if with_dri_swrast
subdir('swrast')
_dri_drivers += libswrast_dri
_dri_link += 'swrast_dri.so'
endif
if with_dri_i915
subdir('i915')
_dri_drivers += libi915
......
SWRAST_DRIVER_FILES = \
swrast.c \
swrast_priv.h
SWRAST_C_FILES = \
$(SWRAST_DRIVER_FILES)
# Copyright © 2017 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, 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 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 NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 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.
libswrast_dri = static_library(
'swrast_dri',
files('swrast.c', 'swrast_priv.h'),
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_dri_common],
dependencies : [dep_libdrm, idep_mesautil],
)
This diff is collapsed.
/*
* Mesa 3-D graphics library
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
* Copyright 2008, 2010 George Sapountzis <gsapountzis@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* 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 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 NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 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.
*/
#ifndef _SWRAST_PRIV_H
#define _SWRAST_PRIV_H
#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
#include "main/mtypes.h"
#include "dri_util.h"
#include "swrast/s_context.h"
/**
* Debugging
*/
#define DEBUG_CORE 0
#define DEBUG_SPAN 0
#if DEBUG_CORE
#define TRACE printf("--> %s\n", __func__)
#else
#define TRACE
#endif
#if DEBUG_SPAN
#define TRACE_SPAN printf("--> %s\n", __func__)
#else
#define TRACE_SPAN
#endif
/**
* Data types
*/
struct dri_context
{
/* mesa, base class, must be first */
struct gl_context Base;
/* dri */
__DRIcontext *cPriv;
};
static inline struct dri_context *
dri_context(__DRIcontext * driContextPriv)
{
return (struct dri_context *)driContextPriv->driverPrivate;
}
static inline struct dri_context *
swrast_context(struct gl_context *ctx)
{
return (struct dri_context *) ctx;
}
struct dri_drawable
{
/* mesa, base class, must be first */
struct gl_framebuffer Base;
/* dri */
__DRIdrawable *dPriv;
/* scratch row for optimized front-buffer rendering */
char *row;
};
static inline struct dri_drawable *
dri_drawable(__DRIdrawable * driDrawPriv)
{
return (struct dri_drawable *)driDrawPriv->driverPrivate;
}
static inline struct dri_drawable *
swrast_drawable(struct gl_framebuffer *fb)
{
return (struct dri_drawable *) fb;
}
struct dri_swrast_renderbuffer {
struct swrast_renderbuffer Base;
__DRIdrawable *dPriv;
/* GL_MAP_*_BIT, used for mapping of front buffer. */
GLbitfield map_mode;
int map_x, map_y, map_w, map_h;
/* renderbuffer pitch (in bytes) */
GLuint pitch;
/* bits per pixel of storage */
GLuint bpp;
};
static inline struct dri_swrast_renderbuffer *
dri_swrast_renderbuffer(struct gl_renderbuffer *rb)
{
return (struct dri_swrast_renderbuffer *) rb;
}
/**
* Pixel formats we support
*/
#define PF_A8R8G8B8 1 /**< 32bpp TrueColor: 8-A, 8-R, 8-G, 8-B bits */
#define PF_R5G6B5 2 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */
#define PF_R3G3B2 3 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */
#define PF_X8R8G8B8 4 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */
#endif /* _SWRAST_PRIV_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment