2008-03-14 21:54:02 +00:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* Copyright 2007 VMware, Inc.
|
2008-03-14 21:54:02 +00:00
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sub license, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
* next paragraph) shall be included in all copies or substantial portions
|
|
|
|
* of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
|
2008-03-14 21:54:02 +00:00
|
|
|
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
**************************************************************************/
|
|
|
|
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
/* Authors: Keith Whitwell <keithw@vmware.com>
|
2008-03-14 21:54:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SP_STATE_H
|
|
|
|
#define SP_STATE_H
|
|
|
|
|
|
|
|
#include "pipe/p_state.h"
|
2008-07-28 04:42:13 +01:00
|
|
|
#include "tgsi/tgsi_scan.h"
|
2008-03-14 21:54:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define SP_NEW_VIEWPORT 0x1
|
|
|
|
#define SP_NEW_RASTERIZER 0x2
|
|
|
|
#define SP_NEW_FS 0x4
|
|
|
|
#define SP_NEW_BLEND 0x8
|
|
|
|
#define SP_NEW_CLIP 0x10
|
|
|
|
#define SP_NEW_SCISSOR 0x20
|
|
|
|
#define SP_NEW_STIPPLE 0x40
|
|
|
|
#define SP_NEW_FRAMEBUFFER 0x80
|
|
|
|
#define SP_NEW_DEPTH_STENCIL_ALPHA 0x100
|
|
|
|
#define SP_NEW_CONSTANTS 0x200
|
|
|
|
#define SP_NEW_SAMPLER 0x400
|
|
|
|
#define SP_NEW_TEXTURE 0x800
|
|
|
|
#define SP_NEW_VERTEX 0x1000
|
|
|
|
#define SP_NEW_VS 0x2000
|
|
|
|
#define SP_NEW_QUERY 0x4000
|
2009-12-14 22:11:46 +00:00
|
|
|
#define SP_NEW_GS 0x8000
|
2010-05-28 18:14:07 +01:00
|
|
|
#define SP_NEW_SO 0x10000
|
|
|
|
#define SP_NEW_SO_BUFFERS 0x20000
|
2008-03-14 21:54:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
struct tgsi_sampler;
|
|
|
|
struct tgsi_exec_machine;
|
2008-05-17 17:30:21 +01:00
|
|
|
struct vertex_info;
|
2008-03-14 21:54:02 +00:00
|
|
|
|
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
struct sp_fragment_shader_variant_key
|
|
|
|
{
|
2011-07-21 16:55:22 +01:00
|
|
|
boolean polygon_stipple;
|
2011-07-21 16:55:22 +01:00
|
|
|
};
|
|
|
|
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
struct sp_fragment_shader_variant
|
|
|
|
{
|
|
|
|
const struct tgsi_token *tokens;
|
|
|
|
struct sp_fragment_shader_variant_key key;
|
2008-03-14 21:54:02 +00:00
|
|
|
struct tgsi_shader_info info;
|
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
unsigned stipple_sampler_unit;
|
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
/* See comments about this elsewhere */
|
|
|
|
#if 0
|
2010-09-18 01:41:30 +01:00
|
|
|
struct draw_fragment_shader *draw_shader;
|
2011-07-21 16:55:22 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void (*prepare)(const struct sp_fragment_shader_variant *shader,
|
|
|
|
struct tgsi_exec_machine *machine,
|
2013-02-27 18:07:18 +00:00
|
|
|
struct tgsi_sampler *sampler);
|
2010-09-18 01:41:30 +01:00
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
unsigned (*run)(const struct sp_fragment_shader_variant *shader,
|
|
|
|
struct tgsi_exec_machine *machine,
|
|
|
|
struct quad_header *quad);
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
/* Deletes this instance of the object */
|
2012-12-14 17:47:46 +00:00
|
|
|
void (*delete)(struct sp_fragment_shader_variant *shader,
|
|
|
|
struct tgsi_exec_machine *machine);
|
2011-07-21 16:55:22 +01:00
|
|
|
|
|
|
|
struct sp_fragment_shader_variant *next;
|
|
|
|
};
|
2008-03-14 21:54:02 +00:00
|
|
|
|
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
/** Subclass of pipe_shader_state */
|
|
|
|
struct sp_fragment_shader {
|
|
|
|
struct pipe_shader_state shader;
|
|
|
|
struct sp_fragment_shader_variant *variants;
|
|
|
|
struct draw_fragment_shader *draw_shader;
|
2008-03-14 21:54:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** Subclass of pipe_shader_state */
|
|
|
|
struct sp_vertex_shader {
|
2009-03-13 16:22:35 +00:00
|
|
|
struct pipe_shader_state shader;
|
2008-03-14 21:54:02 +00:00
|
|
|
struct draw_vertex_shader *draw_data;
|
2009-08-21 17:13:11 +01:00
|
|
|
int max_sampler; /* -1 if no samplers */
|
2008-03-14 21:54:02 +00:00
|
|
|
};
|
|
|
|
|
2009-12-14 22:11:46 +00:00
|
|
|
/** Subclass of pipe_shader_state */
|
|
|
|
struct sp_geometry_shader {
|
|
|
|
struct pipe_shader_state shader;
|
|
|
|
struct draw_geometry_shader *draw_data;
|
2010-06-11 18:31:52 +01:00
|
|
|
int max_sampler;
|
2009-12-14 22:11:46 +00:00
|
|
|
};
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2010-03-01 17:46:29 +00:00
|
|
|
struct sp_velems_state {
|
|
|
|
unsigned count;
|
2010-03-09 13:23:00 +00:00
|
|
|
struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS];
|
2010-03-01 17:46:29 +00:00
|
|
|
};
|
|
|
|
|
2010-05-28 18:14:07 +01:00
|
|
|
struct sp_so_state {
|
2011-12-15 17:42:21 +00:00
|
|
|
struct pipe_stream_output_info base;
|
2010-05-28 18:14:07 +01:00
|
|
|
};
|
|
|
|
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2010-09-25 20:58:41 +01:00
|
|
|
void
|
|
|
|
softpipe_init_blend_funcs(struct pipe_context *pipe);
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2010-09-25 21:15:11 +01:00
|
|
|
void
|
|
|
|
softpipe_init_clip_funcs(struct pipe_context *pipe);
|
|
|
|
|
2010-06-11 18:31:52 +01:00
|
|
|
void
|
2010-09-25 21:02:38 +01:00
|
|
|
softpipe_init_sampler_funcs(struct pipe_context *pipe);
|
|
|
|
|
2010-09-25 21:08:49 +01:00
|
|
|
void
|
|
|
|
softpipe_init_rasterizer_funcs(struct pipe_context *pipe);
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2010-09-25 21:12:12 +01:00
|
|
|
void
|
2010-09-25 21:19:18 +01:00
|
|
|
softpipe_init_shader_funcs(struct pipe_context *pipe);
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2010-09-25 20:54:24 +01:00
|
|
|
void
|
2010-09-25 21:19:18 +01:00
|
|
|
softpipe_init_streamout_funcs(struct pipe_context *pipe);
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2010-09-25 21:06:58 +01:00
|
|
|
void
|
|
|
|
softpipe_init_vertex_funcs(struct pipe_context *pipe);
|
2010-03-01 17:46:29 +00:00
|
|
|
|
2010-09-25 21:19:18 +01:00
|
|
|
void
|
|
|
|
softpipe_set_framebuffer_state(struct pipe_context *,
|
|
|
|
const struct pipe_framebuffer_state *);
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2010-09-25 21:19:18 +01:00
|
|
|
void
|
2011-07-21 16:55:22 +01:00
|
|
|
softpipe_update_derived(struct softpipe_context *softpipe, unsigned prim);
|
2008-03-14 21:54:02 +00:00
|
|
|
|
2013-03-08 21:29:34 +00:00
|
|
|
void
|
|
|
|
softpipe_set_sampler_views(struct pipe_context *pipe,
|
|
|
|
unsigned shader,
|
|
|
|
unsigned start,
|
|
|
|
unsigned num,
|
|
|
|
struct pipe_sampler_view **views);
|
|
|
|
|
|
|
|
|
2010-07-15 21:35:58 +01:00
|
|
|
void
|
|
|
|
softpipe_draw_vbo(struct pipe_context *pipe,
|
|
|
|
const struct pipe_draw_info *info);
|
|
|
|
|
2008-03-14 21:54:02 +00:00
|
|
|
void
|
|
|
|
softpipe_map_texture_surfaces(struct softpipe_context *sp);
|
|
|
|
|
|
|
|
void
|
|
|
|
softpipe_unmap_texture_surfaces(struct softpipe_context *sp);
|
|
|
|
|
|
|
|
|
|
|
|
struct vertex_info *
|
|
|
|
softpipe_get_vbuf_vertex_info(struct softpipe_context *softpipe);
|
|
|
|
|
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
struct sp_fragment_shader_variant *
|
|
|
|
softpipe_find_fs_variant(struct softpipe_context *softpipe,
|
|
|
|
struct sp_fragment_shader *fs,
|
|
|
|
const struct sp_fragment_shader_variant_key *key);
|
|
|
|
|
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
struct sp_fragment_shader_variant *
|
|
|
|
softpipe_find_fs_variant(struct softpipe_context *softpipe,
|
|
|
|
struct sp_fragment_shader *fs,
|
|
|
|
const struct sp_fragment_shader_variant_key *key);
|
|
|
|
|
2014-08-28 04:13:35 +01:00
|
|
|
void
|
|
|
|
softpipe_prepare_vertex_sampling(struct softpipe_context *ctx,
|
|
|
|
unsigned num,
|
|
|
|
struct pipe_sampler_view **views);
|
|
|
|
void
|
|
|
|
softpipe_cleanup_vertex_sampling(struct softpipe_context *ctx);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
softpipe_prepare_geometry_sampling(struct softpipe_context *ctx,
|
|
|
|
unsigned num,
|
|
|
|
struct pipe_sampler_view **views);
|
|
|
|
void
|
|
|
|
softpipe_cleanup_geometry_sampling(struct softpipe_context *ctx);
|
|
|
|
|
2011-07-21 16:55:22 +01:00
|
|
|
|
2008-03-14 21:54:02 +00:00
|
|
|
#endif
|