#include "r300_context.h"
#include "r300_screen.h"
#include "r300_emit.h"
-#include "r300_query.h"
#include <stdio.h>
static boolean r300_get_query_result(struct pipe_context* pipe,
struct pipe_query* query,
boolean wait,
- uint64_t* result)
+ void* vresult)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_screen* r300screen = r300->screen;
uint32_t* map;
uint32_t temp = 0;
unsigned i, num_results;
+ uint64_t *result = (uint64_t*)vresult;
if (q->flushed == FALSE)
pipe->flush(pipe, 0, NULL);
/* Looks like our results aren't ready yet. */
if (wait) {
fprintf(stderr, "r300: Despite waiting, OQ results haven't "
- "come in yet.\n");
+ "come in yet. This is a driver bug.\n"
+ "r300: Returning bogus results to avoid "
+ "a possible infinite loop...\n");
+ temp = 987654321;
+ } else {
+ temp = ~0U;
}
- temp = ~0U;
break;
}
temp += *map;