void evergreen_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id);
void evergreen_context_pipe_state_set_vs_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id);
+struct radeon *radeon_decref(struct radeon *radeon);
+
#endif
unsigned level)
{
struct pipe_resource *ptex = &rtex->resource.base.b;
- struct radeon *radeon = (struct radeon *)screen->winsys;
- enum chip_class chipc = r600_get_family_class(radeon);
unsigned width, stride, tile_width;
if (rtex->pitch_override)
#ifndef RADEON_INFO_TILING_CONFIG
#define RADEON_INFO_TILING_CONFIG 0x6
#endif
+
+static struct radeon *radeon_new(int fd, unsigned device);
+
static int radeon_get_device(struct radeon *radeon)
{
struct drm_radeon_info info;
return 0;
}
-struct radeon *radeon_new(int fd, unsigned device)
+static struct radeon *radeon_new(int fd, unsigned device)
{
struct radeon *radeon;
int r;
return NULL;
}
- if (radeon->cman)
- radeon->cman->destroy(radeon->cman);
+ if (radeon->cman)
+ radeon->cman->destroy(radeon->cman);
- if (radeon->kman)
- radeon->kman->destroy(radeon->kman);
+ if (radeon->kman)
+ radeon->kman->destroy(radeon->kman);
- if (radeon->fd >= 0)
- drmClose(radeon->fd);
+ if (radeon->fd >= 0)
+ drmClose(radeon->fd);
free(radeon);
return NULL;
struct pb_buffer *pb;
unsigned size;
unsigned tiling_flags;
- unsigned kernel_pitch;
+ unsigned kernel_pitch;
unsigned domains;
};
/* radeon_pciid.c */
unsigned radeon_family_from_device(unsigned device);
-/* r600_drm.c */
-struct radeon *radeon_decref(struct radeon *radeon);
-
/* radeon_bo.c */
struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,
unsigned size, unsigned alignment);
* Jerome Glisse
*/
#include <stdlib.h>
-#include "r600.h"
+#include "r600_priv.h"
struct pci_id {
unsigned vendor;
}
return CHIP_UNKNOWN;
}
-
-int radeon_is_family_compatible(unsigned family1, unsigned family2)
-{
- switch (family1) {
- case CHIP_R600:
- case CHIP_RV610:
- case CHIP_RV630:
- case CHIP_RV670:
- case CHIP_RV620:
- case CHIP_RV635:
- case CHIP_RS780:
- case CHIP_RS880:
- case CHIP_RV770:
- case CHIP_RV730:
- case CHIP_RV710:
- case CHIP_RV740:
- case CHIP_CEDAR:
- case CHIP_REDWOOD:
- case CHIP_JUNIPER:
- case CHIP_CYPRESS:
- case CHIP_HEMLOCK:
- case CHIP_PALM:
- switch (family2) {
- case CHIP_R600:
- case CHIP_RV610:
- case CHIP_RV630:
- case CHIP_RV670:
- case CHIP_RV620:
- case CHIP_RV635:
- case CHIP_RS780:
- case CHIP_RS880:
- case CHIP_RV770:
- case CHIP_RV730:
- case CHIP_RV710:
- case CHIP_RV740:
- case CHIP_CEDAR:
- case CHIP_REDWOOD:
- case CHIP_JUNIPER:
- case CHIP_CYPRESS:
- case CHIP_HEMLOCK:
- case CHIP_PALM:
- return 1;
- default:
- return 0;
- }
- break;
- case CHIP_R100:
- case CHIP_RV100:
- case CHIP_RS100:
- case CHIP_RV200:
- case CHIP_RS200:
- case CHIP_R200:
- case CHIP_RV250:
- case CHIP_RS300:
- case CHIP_RV280:
- case CHIP_R300:
- case CHIP_R350:
- case CHIP_RV350:
- case CHIP_RV380:
- case CHIP_R420:
- case CHIP_R423:
- case CHIP_RV410:
- case CHIP_RS400:
- case CHIP_RS480:
- case CHIP_RS600:
- case CHIP_RS690:
- case CHIP_RS740:
- case CHIP_RV515:
- case CHIP_R520:
- case CHIP_RV530:
- case CHIP_RV560:
- case CHIP_RV570:
- case CHIP_R580:
- default:
- return 0;
- }
-}