} shader_time;
__DRIcontext *driContext;
+ struct intel_screen *intelScreen;
};
/*======================================================================
case GL_VERTEX_PROGRAM_ARB: {
struct brw_vertex_program *prog = CALLOC_STRUCT(brw_vertex_program);
if (prog) {
- prog->id = get_new_program_id(brw->intel.intelScreen);
+ prog->id = get_new_program_id(brw->intelScreen);
return _mesa_init_vertex_program( ctx, &prog->program,
target, id );
case GL_FRAGMENT_PROGRAM_ARB: {
struct brw_fragment_program *prog = CALLOC_STRUCT(brw_fragment_program);
if (prog) {
- prog->id = get_new_program_id(brw->intel.intelScreen);
+ prog->id = get_new_program_id(brw->intelScreen);
return _mesa_init_fragment_program( ctx, &prog->program,
target, id );
if (newFP == curFP)
brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM;
- newFP->id = get_new_program_id(brw->intel.intelScreen);
+ newFP->id = get_new_program_id(brw->intelScreen);
break;
}
case GL_VERTEX_PROGRAM_ARB: {
if (newVP->program.IsPositionInvariant) {
_mesa_insert_mvp_code(ctx, &newVP->program);
}
- newVP->id = get_new_program_id(brw->intel.intelScreen);
+ newVP->id = get_new_program_id(brw->intelScreen);
/* Also tell tnl about it:
*/
static void
do_batch_dump(struct brw_context *brw)
{
- struct intel_context *intel = &brw->intel;
struct drm_intel_decode *decode;
struct intel_batchbuffer *batch = &brw->batch;
int ret;
- decode = drm_intel_decode_context_alloc(intel->intelScreen->deviceID);
+ decode = drm_intel_decode_context_alloc(brw->intelScreen->deviceID);
if (!decode)
return;
}
}
- if (!intel->intelScreen->no_hw) {
+ if (!brw->intelScreen->no_hw) {
int flags;
if (intel->gen < 6 || !batch->is_blit) {
static const GLubyte *
intelGetString(struct gl_context * ctx, GLenum name)
{
- const struct intel_context *const intel = intel_context(ctx);
+ const struct brw_context *const brw = brw_context(ctx);
const char *chipset;
static char buffer[128];
break;
case GL_RENDERER:
- switch (intel->intelScreen->deviceID) {
+ switch (brw->intelScreen->deviceID) {
#undef CHIPSET
#define CHIPSET(id, symbol, str) case id: chipset = str; break;
#include "pci_ids/i965_pci_ids.h"
intel_flush_front(struct gl_context *ctx)
{
struct brw_context *brw = brw_context(ctx);
- struct intel_context *intel = intel_context(ctx);
__DRIcontext *driContext = brw->driContext;
__DRIdrawable *driDrawable = driContext->driDrawablePriv;
- __DRIscreen *const screen = intel->intelScreen->driScrnPriv;
+ __DRIscreen *const screen = brw->intelScreen->driScrnPriv;
if (brw->front_buffer_dirty && _mesa_is_winsys_fbo(ctx->DrawBuffer)) {
if (screen->dri2.loader->flushFrontBuffer != NULL &&
mesaVis = &visual;
}
- intel->intelScreen = intelScreen;
+ brw->intelScreen = intelScreen;
if (!_mesa_initialize_context(&intel->ctx, api, mesaVis, shareCtx,
functions)) {
intel->is_g4x = true;
}
- intel->has_separate_stencil = intel->intelScreen->hw_has_separate_stencil;
- intel->must_use_separate_stencil = intel->intelScreen->hw_must_use_separate_stencil;
+ intel->has_separate_stencil = brw->intelScreen->hw_has_separate_stencil;
+ intel->must_use_separate_stencil = brw->intelScreen->hw_must_use_separate_stencil;
intel->has_hiz = intel->gen >= 6;
- intel->has_llc = intel->intelScreen->hw_has_llc;
- intel->has_swizzling = intel->intelScreen->hw_has_swizzling;
+ intel->has_llc = brw->intelScreen->hw_has_llc;
+ intel->has_swizzling = brw->intelScreen->hw_has_swizzling;
memset(&ctx->TextureFormatSupported,
0, sizeof(ctx->TextureFormatSupported));
int *buffer_count)
{
struct intel_context *intel = &brw->intel;
- __DRIscreen *screen = intel->intelScreen->driScrnPriv;
+ __DRIscreen *screen = brw->intelScreen->driScrnPriv;
struct gl_framebuffer *fb = drawable->driverPrivate;
int i = 0;
unsigned attachments[8];
struct intel_renderbuffer *rb,
const char *buffer_name)
{
- struct intel_context *intel = &brw->intel;
struct intel_region *region = NULL;
if (!rb)
}
intel_miptree_release(&rb->mt);
- region = intel_region_alloc_for_handle(intel->intelScreen,
+ region = intel_region_alloc_for_handle(brw->intelScreen,
buffer->cpp,
drawable->w,
drawable->h,
bool has_hiz;
bool has_llc;
bool has_swizzling;
-
- struct intel_screen *intelScreen;
};
/**
{
struct brw_context *brw = brw_context(ctx);
struct intel_context *intel = intel_context(ctx);
- struct intel_screen *screen = intel->intelScreen;
+ struct intel_screen *screen = brw->intelScreen;
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
rb->NumSamples = intel_quantize_num_samples(screen, rb->NumSamples);
void *image_handle)
{
struct brw_context *brw = brw_context(ctx);
- struct intel_context *intel = intel_context(ctx);
struct intel_renderbuffer *irb;
__DRIscreen *screen;
__DRIimage *image;
- screen = intel->intelScreen->driScrnPriv;
+ screen = brw->intelScreen->driScrnPriv;
image = screen->dri2.image->lookupEGLImage(screen, image_handle,
screen->loaderPrivate);
if (image == NULL)
bool y_or_x = tiling == (I915_TILING_Y | I915_TILING_X);
mt->etc_format = etc_format;
- mt->region = intel_region_alloc(intel->intelScreen,
+ mt->region = intel_region_alloc(brw->intelScreen,
y_or_x ? I915_TILING_Y : tiling,
mt->cpp,
total_width,
mt->total_width, mt->total_height);
intel_region_release(&mt->region);
- mt->region = intel_region_alloc(intel->intelScreen,
+ mt->region = intel_region_alloc(brw->intelScreen,
I915_TILING_X,
mt->cpp,
total_width,
struct gl_texture_image *image)
{
struct brw_context *brw = brw_context(ctx);
- struct intel_context *intel = intel_context(ctx);
struct intel_texture_image *intel_image = intel_texture_image(image);
struct gl_texture_object *texobj = image->TexObject;
struct intel_texture_object *intel_texobj = intel_texture_object(texobj);
/* Quantize sample count */
if (image->NumSamples) {
- image->NumSamples = intel_quantize_num_samples(intel->intelScreen, image->NumSamples);
+ image->NumSamples = intel_quantize_num_samples(brw->intelScreen, image->NumSamples);
if (!image->NumSamples)
return false;
}
struct gl_texture_image *texImage,
GLeglImageOES image_handle)
{
- struct intel_context *intel = intel_context(ctx);
+ struct brw_context *brw = brw_context(ctx);
__DRIscreen *screen;
__DRIimage *image;
- screen = intel->intelScreen->driScrnPriv;
+ screen = brw->intelScreen->driScrnPriv;
image = screen->dri2.image->lookupEGLImage(screen, image_handle,
screen->loaderPrivate);
if (image == NULL)