*/
#include "main/errors.h"
-#include "main/imports.h"
+#include "util/imports.h"
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/dlist.h"
cso_set_rasterizer(cso, &st->bitmap.rasterizer);
/* fragment shader state: TEX lookup program */
- cso_set_fragment_shader_handle(cso, fpv->driver_shader);
+ cso_set_fragment_shader_handle(cso, fpv->base.driver_shader);
/* vertex shader state: position + texcoord pass-through */
cso_set_vertex_shader_handle(cso, st->passthrough_vs);
st->state.fb_height,
st->state.fb_orientation == Y_0_TOP);
- cso_set_vertex_elements(cso, 3, st->util_velems);
+ st->util_velems.count = 3;
+ cso_set_vertex_elements(cso, &st->util_velems);
cso_set_stream_outputs(st->cso_context, 0, NULL, NULL);
}
/* XXX if the bitmap is larger than the max texture size, break
* it up into chunks.
*/
- GLuint MAYBE_UNUSED maxSize =
+ ASSERTED GLuint maxSize =
pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_TEXTURE_2D_SIZE);
assert(width <= (GLsizei) maxSize);
assert(height <= (GLsizei) maxSize);
if (px < 0 || px + width > BITMAP_CACHE_WIDTH ||
py < 0 || py + height > BITMAP_CACHE_HEIGHT ||
!TEST_EQ_4V(ctx->Current.RasterColor, cache->color) ||
- ((fabs(z - cache->zpos) > Z_EPSILON))) {
+ ((fabsf(z - cache->zpos) > Z_EPSILON))) {
/* This bitmap would extend beyond cache bounds, or the bitmap
* color is changing
* so flush and continue.
st->bitmap.rasterizer.depth_clip_far = 1;
/* find a usable texture format */
- if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM,
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R8_UNORM,
st->internal_target, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
- st->bitmap.tex_format = PIPE_FORMAT_I8_UNORM;
+ st->bitmap.tex_format = PIPE_FORMAT_R8_UNORM;
}
else if (screen->is_format_supported(screen, PIPE_FORMAT_A8_UNORM,
st->internal_target, 0, 0,
PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_A8_UNORM;
}
- else if (screen->is_format_supported(screen, PIPE_FORMAT_L8_UNORM,
- st->internal_target, 0, 0,
- PIPE_BIND_SAMPLER_VIEW)) {
- st->bitmap.tex_format = PIPE_FORMAT_L8_UNORM;
- }
else {
/* XXX support more formats */
assert(0);