#define BEGIN_CS(size) do { \
CHECK_CS(size); \
+ debug_printf("r300: BEGIN_CS in %s (%s:%d)", __FUNCTION__, __FILE__, \
+ __LINE__); \
cs_winsys->begin_cs(cs, (size), __FILE__, __FUNCTION__, __LINE__); \
} while (0)
cs_winsys->write_cs_reloc(cs, bo, rd, wd, flags); \
} while (0)
-#define END_CS \
- cs_winsys->end_cs(cs, __FILE__, __FUNCTION__, __LINE__)
+#define END_CS do { \
+ debug_printf("r300: END_CS in %s (%s:%d)", __FUNCTION__, __FILE__, \
+ __LINE__); \
+ cs_winsys->end_cs(cs, __FILE__, __FUNCTION__, __LINE__); \
+} while (0)
-#define FLUSH_CS \
- cs_winsys->flush_cs(cs)
+#define FLUSH_CS do { \
+ debug_printf("r300: FLUSH_CS in %s (%s:%d)", __FUNCTION__, __FILE__, \
+ __LINE__); \
+ cs_winsys->flush_cs(cs); \
+} while (0)
#endif /* R300_CS_H */
#include "r300_screen.h"
+/* Return the identifier behind whom the brave coders responsible for this
+ * amalgamation of code, sweat, and duct tape, routinely obscure their names.
+ *
+ * ...I should have just put "Corbin Simpson", but I'm not that cool.
+ *
+ * (Or egotistical. Yet.) */
static const char* r300_get_vendor(struct pipe_screen* pscreen)
{
return "X.Org R300 Project";
}
+static const char* chip_families[] = {
+ "R300",
+ "R350",
+ "R360",
+ "RV350",
+ "RV370",
+ "RV380",
+ "R420",
+ "R423",
+ "R430",
+ "R480",
+ "R481",
+ "RV410",
+ "RS400",
+ "RC410",
+ "RS480",
+ "RS482",
+ "RS690",
+ "RS740",
+ "RV515",
+ "R520",
+ "RV530",
+ "R580",
+ "RV560",
+ "RV570"
+};
+
static const char* r300_get_name(struct pipe_screen* pscreen)
{
struct r300_screen* r300screen = r300_screen(pscreen);
/* IN THEORY */
return 0;
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
- /* 12 == 2048x2048 */
- return 12;
+ if (r300screen->caps->is_r500) {
+ /* 13 == 4096x4096 */
+ return 13;
+ } else {
+ /* 12 == 2048x2048 */
+ return 12;
+ }
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
- /* XXX educated guess */
- return 8;
+ /* So, technically, the limit is the same as above, but some math
+ * shows why this is silly. Assuming RGBA, 4cpp, we can see that
+ * 4096*4096*4096 = 64.0 GiB exactly, so it's not exactly
+ * practical. However, if at some point a game really wants this,
+ * then we can remove this limit. */
+ if (r300screen->caps->is_r500) {
+ /* 9 == 256x256x256 */
+ return 9;
+ } else {
+ /* 8 == 128*128*128 */
+ return 8;
+ }
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- /* XXX educated guess */
- return 11;
+ if (r300screen->caps->is_r500) {
+ /* 13 == 4096x4096 */
+ return 13;
+ } else {
+ /* 12 == 2048x2048 */
+ return 12;
+ }
case PIPE_CAP_MAX_RENDER_TARGETS:
/* XXX 4 eventually */
return 1;
default:
+ debug_printf("r300: Implementation error: Bad param %d", param);
return 0;
}
}
case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
return 16.0f;
default:
- /* XXX implementation error? */
+ debug_printf("r300: Implementation error: Bad paramf %d", param);
return 0.0f;
}
}
case PIPE_FORMAT_I8_UNORM:
return TRUE;
default:
+ debug_printf("r300: Warning: Got unknown format: %d, in %s",
+ format, __FUNCTION__);
break;
}
case PIPE_TEXTURE_2D:
return check_tex_2d_format(format);
default:
+ debug_printf("r300: Warning: Got unknown format target: %d",
+ format);
break;
}