From ac942f5aa2dc3ec43ab879a6065da048ed6cfce3 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 24 Apr 2010 14:38:48 -0700 Subject: nv50: Add to SCons build. --- src/gallium/drivers/nv50/SConscript | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/gallium/drivers/nv50/SConscript (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nv50/SConscript b/src/gallium/drivers/nv50/SConscript new file mode 100644 index 0000000000..8625f92622 --- /dev/null +++ b/src/gallium/drivers/nv50/SConscript @@ -0,0 +1,26 @@ +Import('*') + +env = env.Clone() + +nv50 = env.ConvenienceLibrary( + target = 'nv50', + source = [ + 'nv50_buffer.c', + 'nv50_clear.c', + 'nv50_context.c', + 'nv50_draw.c', + 'nv50_miptree.c', + 'nv50_query.c', + 'nv50_program.c', + 'nv50_resource.c', + 'nv50_screen.c', + 'nv50_state.c', + 'nv50_state_validate.c', + 'nv50_surface.c', + 'nv50_tex.c', + 'nv50_transfer.c', + 'nv50_vbo.c', + 'nv50_push.c', + ]) + +Export('nv50') -- cgit v1.2.3 From b59b23a51dc17da59ccff0b3f8a73009056746e5 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Mon, 17 May 2010 21:28:14 +0200 Subject: nouveau: adapt to interface changes this probably needs further cleanup (just getting a surface for the resource seems quite nonoptimal and potentially cause unnecessary copies I think) --- src/gallium/drivers/nouveau/nouveau_screen.c | 2 -- src/gallium/drivers/nv50/nv50_screen.c | 4 +++ src/gallium/drivers/nv50/nv50_surface.c | 38 ++++++++++++++++++++-------- src/gallium/drivers/nvfx/nv04_surface_2d.c | 9 +++---- src/gallium/drivers/nvfx/nvfx_miptree.c | 2 +- src/gallium/drivers/nvfx/nvfx_screen.c | 4 +++ src/gallium/drivers/nvfx/nvfx_surface.c | 37 ++++++++++++++++++++------- src/gallium/drivers/nvfx/nvfx_transfer.c | 6 +++-- 8 files changed, 72 insertions(+), 30 deletions(-) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index 233a91a2ff..89d5ffa8aa 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -51,8 +51,6 @@ nouveau_screen_bo_new(struct pipe_screen *pscreen, unsigned alignment, if (bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL | - PIPE_BIND_BLIT_SOURCE | - PIPE_BIND_BLIT_DESTINATION | PIPE_BIND_SCANOUT | PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SAMPLER_VIEW)) diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index 2dd1042424..a8cb1e25d8 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -32,8 +32,12 @@ static boolean nv50_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, + unsigned sample_count, unsigned tex_usage, unsigned geom_flags) { + if (sample_count > 1) + return FALSE; + if (tex_usage & PIPE_BIND_RENDER_TARGET) { switch (format) { case PIPE_FORMAT_B8G8R8X8_UNORM: diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c index d905d95354..40b8d25533 100644 --- a/src/gallium/drivers/nv50/nv50_surface.c +++ b/src/gallium/drivers/nv50/nv50_surface.c @@ -195,27 +195,40 @@ nv50_surface_do_copy(struct nv50_screen *screen, struct pipe_surface *dst, static void nv50_surface_copy(struct pipe_context *pipe, - struct pipe_surface *dest, unsigned destx, unsigned desty, - struct pipe_surface *src, unsigned srcx, unsigned srcy, + struct pipe_resource *dest, struct pipe_subresource subdst, + unsigned destx, unsigned desty, unsigned destz, + struct pipe_resource *src, struct pipe_subresource subsrc, + unsigned srcx, unsigned srcy, unsigned srcz, unsigned width, unsigned height) { struct nv50_context *nv50 = nv50_context(pipe); struct nv50_screen *screen = nv50->screen; + struct pipe_surface *ps_dst, *ps_src; assert((src->format == dest->format) || (nv50_2d_format_faithful(src->format) && nv50_2d_format_faithful(dest->format))); - nv50_surface_do_copy(screen, dest, destx, desty, src, srcx, - srcy, width, height); + ps_src = nv50_miptree_surface_new(pipe->screen, dest, subsrc.face, + subsrc.level, srcz, 0 /* bind flags */); + ps_dst = nv50_miptree_surface_new(pipe->screen, dest, subdst.face, + subdst.level, destz, 0 /* bindflags */); + + nv50_surface_do_copy(screen, ps_dst, destx, desty, ps_src, srcx, + srcy, width, height); + + nv50_miptree_surface_del(ps_src); + nv50_miptree_surface_del(ps_dst); } static void -nv50_surface_fill(struct pipe_context *pipe, struct pipe_surface *dest, - unsigned destx, unsigned desty, unsigned width, - unsigned height, unsigned value) +nv50_surface_fill(struct pipe_context *pipe, struct pipe_resource *dest, + struct pipe_subresource subdst, + unsigned destx, unsigned desty, unsigned destz, + unsigned width, unsigned height, unsigned value) { struct nv50_context *nv50 = nv50_context(pipe); + struct pipe_surface *ps; struct nv50_screen *screen = nv50->screen; struct nouveau_channel *chan = screen->eng2d->channel; struct nouveau_grobj *eng2d = screen->eng2d; @@ -225,9 +238,12 @@ nv50_surface_fill(struct pipe_context *pipe, struct pipe_surface *dest, if (format < 0) return; + ps = nv50_miptree_surface_new(pipe->screen, dest, subdst.face, + subdst.level, destz, 0 /* bind flags */); + WAIT_RING (chan, 32); - ret = nv50_surface_set(screen, dest, 1); + ret = nv50_surface_set(screen, ps, 1); if (ret) return; @@ -240,13 +256,15 @@ nv50_surface_fill(struct pipe_context *pipe, struct pipe_surface *dest, OUT_RING (chan, desty); OUT_RING (chan, width); OUT_RING (chan, height); + + nv50_miptree_surface_del(ps); } void nv50_init_surface_functions(struct nv50_context *nv50) { - nv50->pipe.surface_copy = nv50_surface_copy; - nv50->pipe.surface_fill = nv50_surface_fill; + nv50->pipe.resource_copy_region = nv50_surface_copy; + nv50->pipe.resource_fill_region = nv50_surface_fill; } diff --git a/src/gallium/drivers/nvfx/nv04_surface_2d.c b/src/gallium/drivers/nvfx/nv04_surface_2d.c index 4ed574227d..7acbb505df 100644 --- a/src/gallium/drivers/nvfx/nv04_surface_2d.c +++ b/src/gallium/drivers/nvfx/nv04_surface_2d.c @@ -502,12 +502,9 @@ nv04_surface_wrap_for_render(struct pipe_screen *pscreen, struct nv04_surface* temp_ns; int temp_flags; - temp_flags = (ns->base.usage | - PIPE_BIND_BLIT_SOURCE | - PIPE_BIND_BLIT_DESTINATION); + temp_flags = ns->base.usage; - ns->base.usage = (PIPE_BIND_BLIT_SOURCE | - PIPE_BIND_BLIT_DESTINATION); + ns->base.usage = 0; memset(&templ, 0, sizeof(templ)); templ.format = ns->base.texture->format; @@ -526,7 +523,7 @@ nv04_surface_wrap_for_render(struct pipe_screen *pscreen, temp_ns = (struct nv04_surface*)pscreen->get_tex_surface(pscreen, temp_tex, 0, 0, 0, temp_flags); temp_ns->backing = ns; - if(ns->base.usage & PIPE_BIND_BLIT_SOURCE) + if(1) /* hmm */ eng2d->copy(eng2d, &temp_ns->backing->base, 0, 0, &ns->base, 0, 0, ns->base.width, ns->base.height); diff --git a/src/gallium/drivers/nvfx/nvfx_miptree.c b/src/gallium/drivers/nvfx/nvfx_miptree.c index aeb88e9ac9..b5639bb464 100644 --- a/src/gallium/drivers/nvfx/nvfx_miptree.c +++ b/src/gallium/drivers/nvfx/nvfx_miptree.c @@ -300,7 +300,7 @@ nvfx_miptree_surface_del(struct pipe_surface *ps) if(ns->backing) { struct nvfx_screen* screen = (struct nvfx_screen*)ps->texture->screen; - if(ns->backing->base.usage & PIPE_BIND_BLIT_DESTINATION) + if(1 /*ns->backing->base.usage & PIPE_BIND_BLIT_DESTINATION*/) screen->eng2d->copy(screen->eng2d, &ns->backing->base, 0, 0, ps, 0, 0, ns->base.width, ns->base.height); nvfx_miptree_surface_del(&ns->backing->base); } diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c index 9f03ab1833..1786af776a 100644 --- a/src/gallium/drivers/nvfx/nvfx_screen.c +++ b/src/gallium/drivers/nvfx/nvfx_screen.c @@ -115,11 +115,15 @@ static boolean nvfx_screen_surface_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, + unsigned sample_count, unsigned tex_usage, unsigned geom_flags) { struct nvfx_screen *screen = nvfx_screen(pscreen); struct pipe_surface *front = ((struct nouveau_winsys *) pscreen->winsys)->front; + if (sample_count > 1) + return FALSE; + if (tex_usage & PIPE_BIND_RENDER_TARGET) { switch (format) { case PIPE_FORMAT_B8G8R8A8_UNORM: diff --git a/src/gallium/drivers/nvfx/nvfx_surface.c b/src/gallium/drivers/nvfx/nvfx_surface.c index 2e115650ae..fc3a670d40 100644 --- a/src/gallium/drivers/nvfx/nvfx_surface.c +++ b/src/gallium/drivers/nvfx/nvfx_surface.c @@ -27,35 +27,54 @@ **************************************************************************/ #include "nvfx_context.h" +#include "nvfx_resource.h" #include "pipe/p_defines.h" #include "util/u_inlines.h" static void nvfx_surface_copy(struct pipe_context *pipe, - struct pipe_surface *dest, unsigned destx, unsigned desty, - struct pipe_surface *src, unsigned srcx, unsigned srcy, + struct pipe_resource *dest, struct pipe_subresource subdst, + unsigned destx, unsigned desty, unsigned destz, + struct pipe_resource *src, struct pipe_subresource subsrc, + unsigned srcx, unsigned srcy, unsigned srcz, unsigned width, unsigned height) { struct nvfx_context *nvfx = nvfx_context(pipe); struct nv04_surface_2d *eng2d = nvfx->screen->eng2d; + struct pipe_surface *ps_dst, *ps_src; - eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height); + ps_src = nvfx_miptree_surface_new(pipe->screen, dest, subsrc.face, + subsrc.level, srcz, 0 /* bind flags */); + ps_dst = nvfx_miptree_surface_new(pipe->screen, dest, subdst.face, + subdst.level, destz, 0 /* bindflags */); + + eng2d->copy(eng2d, ps_dst, destx, desty, ps_src, srcx, srcy, width, height); + + nvfx_miptree_surface_del(ps_src); + nvfx_miptree_surface_del(ps_dst); } static void -nvfx_surface_fill(struct pipe_context *pipe, struct pipe_surface *dest, - unsigned destx, unsigned desty, unsigned width, - unsigned height, unsigned value) +nvfx_surface_fill(struct pipe_context *pipe, struct pipe_resource *dest, + struct pipe_subresource subdst, + unsigned destx, unsigned desty, unsigned destz, + unsigned width, unsigned height, unsigned value) { struct nvfx_context *nvfx = nvfx_context(pipe); + struct pipe_surface *ps; struct nv04_surface_2d *eng2d = nvfx->screen->eng2d; - eng2d->fill(eng2d, dest, destx, desty, width, height, value); + ps = nvfx_miptree_surface_new(pipe->screen, dest, subdst.face, + subdst.level, destz, 0 /* bind flags */); + + eng2d->fill(eng2d, ps, destx, desty, width, height, value); + + nvfx_miptree_surface_del(ps); } void nvfx_init_surface_functions(struct nvfx_context *nvfx) { - nvfx->pipe.surface_copy = nvfx_surface_copy; - nvfx->pipe.surface_fill = nvfx_surface_fill; + nvfx->pipe.resource_copy_region = nvfx_surface_copy; + nvfx->pipe.resource_fill_region = nvfx_surface_fill; } diff --git a/src/gallium/drivers/nvfx/nvfx_transfer.c b/src/gallium/drivers/nvfx/nvfx_transfer.c index b2ef27cf57..9ff0a93d30 100644 --- a/src/gallium/drivers/nvfx/nvfx_transfer.c +++ b/src/gallium/drivers/nvfx/nvfx_transfer.c @@ -40,11 +40,13 @@ static unsigned nvfx_transfer_bind_flags( unsigned transfer_usage ) { unsigned bind = 0; +#if 0 if (transfer_usage & PIPE_TRANSFER_WRITE) bind |= PIPE_BIND_BLIT_SOURCE; if (transfer_usage & PIPE_TRANSFER_READ) bind |= PIPE_BIND_BLIT_DESTINATION; +#endif return bind; } @@ -128,7 +130,7 @@ nvfx_miptree_transfer_new(struct pipe_context *pipe, src = pscreen->get_tex_surface(pscreen, pt, sr.face, sr.level, box->z, - PIPE_BIND_BLIT_SOURCE); + 0 /*PIPE_BIND_BLIT_SOURCE*/); /* TODO: Check if SIFM can deal with x,y,w,h when swizzling */ /* TODO: Check if SIFM can un-swizzle */ @@ -160,7 +162,7 @@ nvfx_miptree_transfer_del(struct pipe_context *pipe, ptx->sr.face, ptx->sr.level, ptx->box.z, - PIPE_BIND_BLIT_DESTINATION); + 0 /*PIPE_BIND_BLIT_DESTINATION*/); /* TODO: Check if SIFM can deal with x,y,w,h when swizzling */ nvscreen->eng2d->copy(nvscreen->eng2d, -- cgit v1.2.3 From 43234cee40c48e14a3eab4268181d9b0b2b7cf79 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Tue, 18 May 2010 16:20:44 +0200 Subject: gallium: implement set_sample_mask() in all drivers prevents segfault when state trackers try to set default mask. Other option would be to make this required only for drivers supporting multisampling, but this seems more clean. Only dummy implementations (for normal drivers) provided (no driver supports multisampling yet neither). --- src/gallium/drivers/cell/ppu/cell_pipe_state.c | 9 ++++++++- src/gallium/drivers/failover/fo_context.h | 2 ++ src/gallium/drivers/failover/fo_state.c | 14 ++++++++++++++ src/gallium/drivers/failover/fo_state_emit.c | 3 +++ src/gallium/drivers/i915/i915_state.c | 7 +++++++ src/gallium/drivers/i965/brw_pipe_depth.c | 7 +++++++ src/gallium/drivers/identity/id_context.c | 12 ++++++++++++ src/gallium/drivers/llvmpipe/lp_state_blend.c | 6 ++++++ src/gallium/drivers/nv50/nv50_state.c | 7 +++++++ src/gallium/drivers/nvfx/nvfx_state.c | 7 +++++++ src/gallium/drivers/r300/r300_state.c | 8 ++++++++ src/gallium/drivers/softpipe/sp_context.c | 1 + src/gallium/drivers/softpipe/sp_state.h | 3 +++ src/gallium/drivers/softpipe/sp_state_blend.c | 7 +++++++ src/gallium/drivers/svga/svga_pipe_depthstencil.c | 7 +++++++ src/gallium/drivers/trace/tr_context.c | 17 +++++++++++++++++ 16 files changed, 116 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/cell/ppu/cell_pipe_state.c b/src/gallium/drivers/cell/ppu/cell_pipe_state.c index 8c975c6ae2..ecc9de4df6 100644 --- a/src/gallium/drivers/cell/ppu/cell_pipe_state.c +++ b/src/gallium/drivers/cell/ppu/cell_pipe_state.c @@ -125,6 +125,7 @@ cell_set_stencil_ref(struct pipe_context *pipe, cell->dirty |= CELL_NEW_DEPTH_STENCIL; } + static void cell_set_clip_state(struct pipe_context *pipe, const struct pipe_clip_state *clip) @@ -136,6 +137,12 @@ cell_set_clip_state(struct pipe_context *pipe, } +static void +cell_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} + /* Called when driver state tracker notices changes to the viewport * matrix: @@ -430,7 +437,6 @@ cell_set_framebuffer_state(struct pipe_context *pipe, } - void cell_init_state_functions(struct cell_context *cell) { @@ -457,6 +463,7 @@ cell_init_state_functions(struct cell_context *cell) cell->pipe.set_blend_color = cell_set_blend_color; cell->pipe.set_stencil_ref = cell_set_stencil_ref; cell->pipe.set_clip_state = cell_set_clip_state; + cell->pipe.set_sample_mask = cell_set_sample_mask; cell->pipe.set_framebuffer_state = cell_set_framebuffer_state; diff --git a/src/gallium/drivers/failover/fo_context.h b/src/gallium/drivers/failover/fo_context.h index 88ae5ad60d..9d3e0d0dba 100644 --- a/src/gallium/drivers/failover/fo_context.h +++ b/src/gallium/drivers/failover/fo_context.h @@ -55,6 +55,7 @@ #define FO_NEW_CLEAR_COLOR 0x20000 #define FO_NEW_VERTEX_BUFFER 0x40000 #define FO_NEW_VERTEX_ELEMENT 0x80000 +#define FO_NEW_SAMPLE_MASK 0x100000 @@ -90,6 +91,7 @@ struct failover_context { struct pipe_blend_color blend_color; struct pipe_stencil_ref stencil_ref; struct pipe_clip_state clip; + unsigned sample_mask; struct pipe_framebuffer_state framebuffer; struct pipe_poly_stipple poly_stipple; struct pipe_scissor_state scissor; diff --git a/src/gallium/drivers/failover/fo_state.c b/src/gallium/drivers/failover/fo_state.c index 272e683067..12e42379f9 100644 --- a/src/gallium/drivers/failover/fo_state.c +++ b/src/gallium/drivers/failover/fo_state.c @@ -125,6 +125,19 @@ failover_set_clip_state( struct pipe_context *pipe, failover->hw->set_clip_state( failover->hw, clip ); } +static void +failover_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ + struct failover_context *failover = failover_context(pipe); + + failover->sample_mask = sample_mask; + failover->dirty |= FO_NEW_SAMPLE_MASK; + failover->sw->set_sample_mask( failover->sw, sample_mask ); + failover->hw->set_sample_mask( failover->hw, sample_mask ); + +} + static void * failover_create_depth_stencil_state(struct pipe_context *pipe, @@ -614,6 +627,7 @@ failover_init_state_functions( struct failover_context *failover ) failover->pipe.set_blend_color = failover_set_blend_color; failover->pipe.set_stencil_ref = failover_set_stencil_ref; failover->pipe.set_clip_state = failover_set_clip_state; + failover->pipe.set_sample_mask = failover_set_sample_mask; failover->pipe.set_framebuffer_state = failover_set_framebuffer_state; failover->pipe.set_polygon_stipple = failover_set_polygon_stipple; failover->pipe.set_scissor_state = failover_set_scissor_state; diff --git a/src/gallium/drivers/failover/fo_state_emit.c b/src/gallium/drivers/failover/fo_state_emit.c index 42bd6929a7..147f23269c 100644 --- a/src/gallium/drivers/failover/fo_state_emit.c +++ b/src/gallium/drivers/failover/fo_state_emit.c @@ -63,6 +63,9 @@ failover_state_emit( struct failover_context *failover ) if (failover->dirty & FO_NEW_CLIP) failover->sw->set_clip_state( failover->sw, &failover->clip ); + if (failover->dirty & FO_NEW_SAMPLE_MASK) + failover->sw->set_sample_mask( failover->sw, failover->sample_mask ); + if (failover->dirty & FO_NEW_DEPTH_STENCIL) failover->sw->bind_depth_stencil_alpha_state( failover->sw, failover->depth_stencil->sw_state ); diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index f883883852..e008195a91 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -806,6 +806,12 @@ i915_delete_vertex_elements_state(struct pipe_context *pipe, void *velems) FREE( velems ); } +static void +i915_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} + void i915_init_state_functions( struct i915_context *i915 ) { @@ -837,6 +843,7 @@ i915_init_state_functions( struct i915_context *i915 ) i915->base.set_blend_color = i915_set_blend_color; i915->base.set_stencil_ref = i915_set_stencil_ref; i915->base.set_clip_state = i915_set_clip_state; + i915->base.set_sample_mask = i915_set_sample_mask; i915->base.set_constant_buffer = i915_set_constant_buffer; i915->base.set_framebuffer_state = i915_set_framebuffer_state; diff --git a/src/gallium/drivers/i965/brw_pipe_depth.c b/src/gallium/drivers/i965/brw_pipe_depth.c index b7000d5e33..31c2c343d8 100644 --- a/src/gallium/drivers/i965/brw_pipe_depth.c +++ b/src/gallium/drivers/i965/brw_pipe_depth.c @@ -167,12 +167,19 @@ static void brw_set_stencil_ref(struct pipe_context *pipe, brw->state.dirty.mesa |= PIPE_NEW_DEPTH_STENCIL_ALPHA; } +static void +brw_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} + void brw_pipe_depth_stencil_init( struct brw_context *brw ) { brw->base.set_stencil_ref = brw_set_stencil_ref; brw->base.create_depth_stencil_alpha_state = brw_create_depth_stencil_state; brw->base.bind_depth_stencil_alpha_state = brw_bind_depth_stencil_state; brw->base.delete_depth_stencil_alpha_state = brw_delete_depth_stencil_state; + brw->base.set_sample_mask = brw_set_sample_mask; } void brw_pipe_depth_stencil_cleanup( struct brw_context *brw ) diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c index bd1b5ea2d0..9813170fb1 100644 --- a/src/gallium/drivers/identity/id_context.c +++ b/src/gallium/drivers/identity/id_context.c @@ -451,6 +451,17 @@ identity_set_clip_state(struct pipe_context *_pipe, clip); } +static void +identity_set_sample_mask(struct pipe_context *_pipe, + unsigned sample_mask) +{ + struct identity_context *id_pipe = identity_context(_pipe); + struct pipe_context *pipe = id_pipe->pipe; + + pipe->set_sample_mask(pipe, + sample_mask); +} + static void identity_set_constant_buffer(struct pipe_context *_pipe, uint shader, @@ -892,6 +903,7 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) id_pipe->base.set_blend_color = identity_set_blend_color; id_pipe->base.set_stencil_ref = identity_set_stencil_ref; id_pipe->base.set_clip_state = identity_set_clip_state; + id_pipe->base.set_sample_mask = identity_set_sample_mask; id_pipe->base.set_constant_buffer = identity_set_constant_buffer; id_pipe->base.set_framebuffer_state = identity_set_framebuffer_state; id_pipe->base.set_polygon_stipple = identity_set_polygon_stipple; diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c index 8569507f4e..5b39d9d1a9 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c @@ -148,6 +148,11 @@ llvmpipe_set_stencil_ref(struct pipe_context *pipe, llvmpipe->dirty |= LP_NEW_DEPTH_STENCIL_ALPHA; } +static void +llvmpipe_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} void llvmpipe_init_blend_funcs(struct llvmpipe_context *llvmpipe) @@ -163,4 +168,5 @@ llvmpipe_init_blend_funcs(struct llvmpipe_context *llvmpipe) llvmpipe->pipe.set_blend_color = llvmpipe_set_blend_color; llvmpipe->pipe.set_stencil_ref = llvmpipe_set_stencil_ref; + llvmpipe->pipe.set_sample_mask = llvmpipe_set_sample_mask; } diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c index e885a2b719..3fde859214 100644 --- a/src/gallium/drivers/nv50/nv50_state.c +++ b/src/gallium/drivers/nv50/nv50_state.c @@ -688,6 +688,12 @@ nv50_set_clip_state(struct pipe_context *pipe, { } +static void +nv50_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} + static void nv50_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, struct pipe_resource *buf ) @@ -833,6 +839,7 @@ nv50_init_state_functions(struct nv50_context *nv50) nv50->pipe.set_blend_color = nv50_set_blend_color; nv50->pipe.set_stencil_ref = nv50_set_stencil_ref; nv50->pipe.set_clip_state = nv50_set_clip_state; + nv50->pipe_set_sample_mask = nv50_set_sample_mask; nv50->pipe.set_constant_buffer = nv50_set_constant_buffer; nv50->pipe.set_framebuffer_state = nv50_set_framebuffer_state; nv50->pipe.set_polygon_stipple = nv50_set_polygon_stipple; diff --git a/src/gallium/drivers/nvfx/nvfx_state.c b/src/gallium/drivers/nvfx/nvfx_state.c index 315de492da..3c566808d0 100644 --- a/src/gallium/drivers/nvfx/nvfx_state.c +++ b/src/gallium/drivers/nvfx/nvfx_state.c @@ -505,6 +505,12 @@ nvfx_set_clip_state(struct pipe_context *pipe, nvfx->draw_dirty |= NVFX_NEW_UCP; } +static void +nvfx_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} + static void nvfx_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, struct pipe_resource *buf ) @@ -644,6 +650,7 @@ nvfx_init_state_functions(struct nvfx_context *nvfx) nvfx->pipe.set_blend_color = nvfx_set_blend_color; nvfx->pipe.set_stencil_ref = nvfx_set_stencil_ref; nvfx->pipe.set_clip_state = nvfx_set_clip_state; + nvfx->pipe.set_sample_mask = nvfx_set_sample_mask; nvfx->pipe.set_constant_buffer = nvfx_set_constant_buffer; nvfx->pipe.set_framebuffer_state = nvfx_set_framebuffer_state; nvfx->pipe.set_polygon_stipple = nvfx_set_polygon_stipple; diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 446422ca0f..4f41530c16 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -404,6 +404,13 @@ static void r300_set_clip_state(struct pipe_context* pipe, r300->clip_state.dirty = TRUE; } +static void +r300_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} + + /* Create a new depth, stencil, and alpha state based on the CSO dsa state. * * This contains the depth buffer, stencil buffer, alpha test, and such. @@ -1502,6 +1509,7 @@ void r300_init_state_functions(struct r300_context* r300) r300->context.set_blend_color = r300_set_blend_color; r300->context.set_clip_state = r300_set_clip_state; + r300->context.set_sample_mask = r300_set_sample_mask; r300->context.set_constant_buffer = r300_set_constant_buffer; diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index f6e2b80d46..0f1bcc21bd 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -251,6 +251,7 @@ softpipe_create_context( struct pipe_screen *screen, softpipe->pipe.set_blend_color = softpipe_set_blend_color; softpipe->pipe.set_stencil_ref = softpipe_set_stencil_ref; softpipe->pipe.set_clip_state = softpipe_set_clip_state; + softpipe->pipe.set_sample_mask = softpipe_set_sample_mask; softpipe->pipe.set_constant_buffer = softpipe_set_constant_buffer; softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state; softpipe->pipe.set_polygon_stipple = softpipe_set_polygon_stipple; diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h index f97fc6eca8..5b0faabeae 100644 --- a/src/gallium/drivers/softpipe/sp_state.h +++ b/src/gallium/drivers/softpipe/sp_state.h @@ -148,6 +148,9 @@ void softpipe_set_stencil_ref( struct pipe_context *pipe, void softpipe_set_clip_state( struct pipe_context *, const struct pipe_clip_state * ); +void softpipe_set_sample_mask( struct pipe_context *, + unsigned sample_mask ); + void softpipe_set_constant_buffer(struct pipe_context *, uint shader, uint index, struct pipe_resource *buf); diff --git a/src/gallium/drivers/softpipe/sp_state_blend.c b/src/gallium/drivers/softpipe/sp_state_blend.c index c63a49e90b..2a203f44e5 100644 --- a/src/gallium/drivers/softpipe/sp_state_blend.c +++ b/src/gallium/drivers/softpipe/sp_state_blend.c @@ -111,3 +111,10 @@ void softpipe_set_stencil_ref( struct pipe_context *pipe, softpipe->dirty |= SP_NEW_DEPTH_STENCIL_ALPHA; } + +void +softpipe_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} + diff --git a/src/gallium/drivers/svga/svga_pipe_depthstencil.c b/src/gallium/drivers/svga/svga_pipe_depthstencil.c index c317bec6d5..c84615a1f3 100644 --- a/src/gallium/drivers/svga/svga_pipe_depthstencil.c +++ b/src/gallium/drivers/svga/svga_pipe_depthstencil.c @@ -147,6 +147,12 @@ static void svga_set_stencil_ref( struct pipe_context *pipe, svga->dirty |= SVGA_NEW_STENCIL_REF; } +static void +svga_set_sample_mask(struct pipe_context *pipe, + unsigned sample_mask) +{ +} + void svga_init_depth_stencil_functions( struct svga_context *svga ) { @@ -155,6 +161,7 @@ void svga_init_depth_stencil_functions( struct svga_context *svga ) svga->pipe.delete_depth_stencil_alpha_state = svga_delete_depth_stencil_state; svga->pipe.set_stencil_ref = svga_set_stencil_ref; + svga->pipe.set_sample_mask = svga_set_sample_mask; } diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index 0edb685ac7..64a4316984 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -876,6 +876,22 @@ trace_context_set_clip_state(struct pipe_context *_pipe, trace_dump_call_end(); } +static INLINE void +trace_context_set_sample_mask(struct pipe_context *_pipe, + unsigned sample_mask) +{ + struct trace_context *tr_ctx = trace_context(_pipe); + struct pipe_context *pipe = tr_ctx->pipe; + + trace_dump_call_begin("pipe_context", "set_sample_mask"); + + trace_dump_arg(ptr, pipe); + trace_dump_arg(uint, sample_mask); + + pipe->set_sample_mask(pipe, sample_mask); + + trace_dump_call_end(); +} static INLINE void trace_context_set_constant_buffer(struct pipe_context *_pipe, @@ -1561,6 +1577,7 @@ trace_context_create(struct trace_screen *tr_scr, tr_ctx->base.set_blend_color = trace_context_set_blend_color; tr_ctx->base.set_stencil_ref = trace_context_set_stencil_ref; tr_ctx->base.set_clip_state = trace_context_set_clip_state; + tr_ctx->base.set_sample_mask = trace_context_set_sample_mask; tr_ctx->base.set_constant_buffer = trace_context_set_constant_buffer; tr_ctx->base.set_framebuffer_state = trace_context_set_framebuffer_state; tr_ctx->base.set_polygon_stipple = trace_context_set_polygon_stipple; -- cgit v1.2.3 From 23808f1b5e88373534c7ff546cdd89030ce1e935 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 19 May 2010 09:30:25 -0600 Subject: nv50: fix typo: s/_/./ --- src/gallium/drivers/nv50/nv50_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c index 3fde859214..cf4105bcb7 100644 --- a/src/gallium/drivers/nv50/nv50_state.c +++ b/src/gallium/drivers/nv50/nv50_state.c @@ -839,7 +839,7 @@ nv50_init_state_functions(struct nv50_context *nv50) nv50->pipe.set_blend_color = nv50_set_blend_color; nv50->pipe.set_stencil_ref = nv50_set_stencil_ref; nv50->pipe.set_clip_state = nv50_set_clip_state; - nv50->pipe_set_sample_mask = nv50_set_sample_mask; + nv50->pipe.set_sample_mask = nv50_set_sample_mask; nv50->pipe.set_constant_buffer = nv50_set_constant_buffer; nv50->pipe.set_framebuffer_state = nv50_set_framebuffer_state; nv50->pipe.set_polygon_stipple = nv50_set_polygon_stipple; -- cgit v1.2.3