#include "main/macros.h"
#include "main/mtypes.h"
#include "main/errors.h"
-#include "vbo/vbo.h"
#include "brw_structs.h"
#include "brw_pipe_control.h"
#include "compiler/brw_compiler.h"
BRW_MAX_CACHE
};
+enum gen9_astc5x5_wa_tex_type {
+ GEN9_ASTC5X5_WA_TEX_TYPE_ASTC5x5 = 1 << 0,
+ GEN9_ASTC5X5_WA_TEX_TYPE_AUX = 1 << 1,
+};
+
enum brw_state_id {
/* brw_cache_ids must come first - see brw_program_cache.c */
BRW_STATE_URB_FENCE = BRW_MAX_CACHE,
ST_GS,
ST_FS8,
ST_FS16,
+ ST_FS32,
ST_CS,
};
bool flushed;
};
-enum brw_gpu_ring {
- UNKNOWN_RING,
- RENDER_RING,
- BLT_RING,
-};
-
struct brw_reloc_list {
struct drm_i915_gem_relocation_entry *relocs;
int reloc_count;
struct brw_bo *partial_bo;
uint32_t *partial_bo_map;
unsigned partial_bytes;
+ enum brw_memory_zone memzone;
};
struct intel_batchbuffer {
uint32_t *map_next;
uint32_t state_used;
- enum brw_gpu_ring ring;
bool use_shadow_copy;
bool use_batch_first;
bool needs_sol_reset;
int exec_array_size;
/** The amount of aperture space (in bytes) used by all exec_bos */
- int aperture_space;
+ uint64_t aperture_space;
struct {
uint32_t *map_next;
struct brw_bo *bo,
uint32_t offset_in_bytes,
uint32_t report_id);
+
+ void (*emit_compute_walker)(struct brw_context *brw);
} vtbl;
struct brw_bufmgr *bufmgr;
*/
bool front_buffer_dirty;
+ /**
+ * True if the __DRIdrawable's current __DRIimageBufferMask is
+ * __DRI_IMAGE_BUFFER_SHARED.
+ */
+ bool is_shared_buffer_bound;
+
+ /**
+ * True if a shared buffer is bound and it has received any rendering since
+ * the previous __DRImutableRenderBufferLoaderExtension::displaySharedBuffer().
+ */
+ bool is_shared_buffer_dirty;
+
/** Framerate throttling: @{ */
struct brw_bo *throttle_batch[2];
* drirc options:
* @{
*/
- bool no_rast;
bool always_flush_batch;
bool always_flush_cache;
bool disable_throttling;
GLuint primitive; /**< Hardware primitive, such as _3DPRIM_TRILIST. */
+ bool object_preemption; /**< Object level preemption enabled. */
+
GLenum reduced_primitive;
/**
*/
uint8_t attrib_wa_flags[VERT_ATTRIB_MAX];
- /* For the initial pushdown, keep the list of vbo inputs. */
- struct vbo_inputs draw_arrays;
+ /* High bits of the last seen vertex buffer address (for workarounds). */
+ uint16_t last_bo_high_bits[33];
} vb;
struct {
* referencing the same index buffer.
*/
unsigned int start_vertex_offset;
+
+ /* High bits of the last seen index buffer address (for workarounds). */
+ uint16_t last_bo_high_bits;
+
+ /* Used to understand is GPU state of primitive restart is up to date */
+ bool enable_cut_index;
} ib;
/* Active vertex program:
*/
enum isl_aux_usage draw_aux_usage[MAX_DRAW_BUFFERS];
+ enum gen9_astc5x5_wa_tex_type gen9_astc5x5_wa_tex_mask;
+
__DRIcontext *driContext;
struct intel_screen *screen;
};
__DRIdrawable *drawable);
void intel_prepare_render(struct brw_context *brw);
+void gen9_apply_single_tex_astc5x5_wa(struct brw_context *brw,
+ mesa_format format,
+ enum isl_aux_usage aux_usage);
+
void brw_predraw_resolve_inputs(struct brw_context *brw, bool rendering,
bool *draw_aux_buffer_disabled);
unsigned *error,
void *sharedContextPrivate);
-/*======================================================================
- * brw_misc_state.c
- */
-void
-brw_meta_resolve_color(struct brw_context *brw,
- struct intel_mipmap_tree *mt);
-
/*======================================================================
* brw_misc_state.c
*/
uint32_t reg, uint32_t imm);
void brw_load_register_imm64(struct brw_context *brw,
uint32_t reg, uint64_t imm);
-void brw_load_register_reg(struct brw_context *brw, uint32_t src,
- uint32_t dest);
-void brw_load_register_reg64(struct brw_context *brw, uint32_t src,
- uint32_t dest);
+void brw_load_register_reg(struct brw_context *brw, uint32_t dst,
+ uint32_t src);
+void brw_load_register_reg64(struct brw_context *brw, uint32_t dst,
+ uint32_t src);
void brw_store_data_imm32(struct brw_context *brw, struct brw_bo *bo,
uint32_t offset, uint32_t imm);
void brw_store_data_imm64(struct brw_context *brw, struct brw_bo *bo,
return false;
}
+static inline bool
+key_debug_float(struct brw_context *brw, const char *name, float a, float b)
+{
+ if (a != b) {
+ perf_debug(" %s %f->%f\n", name, a, b);
+ return true;
+ }
+ return false;
+}
+
void brwInitFragProgFuncs( struct dd_function_table *functions );
void brw_get_scratch_bo(struct brw_context *brw,
/* brw_draw_upload.c */
unsigned brw_get_vertex_surface_type(struct brw_context *brw,
- const struct gl_array_attributes *glattr);
+ const struct gl_vertex_format *glformat);
static inline unsigned
brw_get_index_type(unsigned index_size)
brw_program_binary_init(unsigned device_id);
extern void
brw_get_program_binary_driver_sha1(struct gl_context *ctx, uint8_t *sha1);
+void brw_serialize_program_binary(struct gl_context *ctx,
+ struct gl_shader_program *sh_prog,
+ struct gl_program *prog);
extern void
brw_deserialize_program_binary(struct gl_context *ctx,
struct gl_shader_program *shProg,
void
brw_program_serialize_nir(struct gl_context *ctx, struct gl_program *prog);
void
-brw_program_deserialize_nir(struct gl_context *ctx, struct gl_program *prog,
- gl_shader_stage stage);
+brw_program_deserialize_driver_blob(struct gl_context *ctx,
+ struct gl_program *prog,
+ gl_shader_stage stage);
/*======================================================================
* Inline conversion functions. These are better-typed than the