summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915/i915_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_context.c')
-rw-r--r--src/gallium/drivers/i915/i915_context.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index 1bbe2246fd7..f9ecb6c5c09 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -27,6 +27,7 @@
#include "i915_context.h"
#include "i915_batch.h"
+#include "i915_debug.h"
#include "i915_query.h"
#include "i915_resource.h"
#include "i915_screen.h"
@@ -42,8 +43,6 @@
#include "util/u_prim.h"
#include "util/u_upload_mgr.h"
-DEBUG_GET_ONCE_BOOL_OPTION(i915_no_vbuf, "I915_NO_VBUF", false)
-
/*
* Draw functions
*/
@@ -98,7 +97,7 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
mapped_indices = info->has_user_indices ? info->index.user : NULL;
if (!mapped_indices)
mapped_indices = i915_buffer(info->index.resource)->data;
- draw_set_indexes(draw, (ubyte *)mapped_indices, info->index_size, ~0);
+ draw_set_indexes(draw, (uint8_t *)mapped_indices, info->index_size, ~0);
}
if (i915->constants[PIPE_SHADER_VERTEX])
@@ -153,10 +152,7 @@ i915_destroy(struct pipe_context *pipe)
i915->iws->batchbuffer_destroy(i915->batch);
/* unbind framebuffer */
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
- pipe_surface_reference(&i915->framebuffer.cbufs[i], NULL);
- }
- pipe_surface_reference(&i915->framebuffer.zsbuf, NULL);
+ util_unreference_framebuffer_state(&i915->framebuffer);
/* unbind constant buffers */
for (i = 0; i < PIPE_SHADER_TYPES; i++) {
@@ -168,7 +164,7 @@ i915_destroy(struct pipe_context *pipe)
static void
i915_set_debug_callback(struct pipe_context *pipe,
- const struct pipe_debug_callback *cb)
+ const struct util_debug_callback *cb)
{
struct i915_context *i915 = i915_context(pipe);
@@ -216,7 +212,7 @@ i915_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
*/
i915->draw = draw_create(&i915->base);
assert(i915->draw);
- if (!debug_get_option_i915_no_vbuf()) {
+ if (i915_debug & DBG_VBUF) {
draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915));
} else {
draw_set_rasterize_stage(i915->draw, i915_draw_render_stage(i915));
@@ -238,7 +234,7 @@ i915_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
i915->no_log_program_errors = false;
draw_install_aaline_stage(i915->draw, &i915->base);
- draw_install_aapoint_stage(i915->draw, &i915->base);
+ draw_install_aapoint_stage(i915->draw, &i915->base, nir_type_float32);
draw_enable_point_sprites(i915->draw, true);
i915->dirty = ~0;