mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa
This commit is contained in:
commit
4a98d19d1b
30 changed files with 144 additions and 122 deletions
|
|
@ -47,7 +47,7 @@
|
|||
#include "util/u_hash_table.h"
|
||||
|
||||
|
||||
struct u_hash_table
|
||||
struct util_hash_table
|
||||
{
|
||||
struct cso_hash *cso;
|
||||
|
||||
|
|
@ -61,27 +61,27 @@ struct u_hash_table
|
|||
};
|
||||
|
||||
|
||||
struct hash_table_item
|
||||
struct util_hash_table_item
|
||||
{
|
||||
void *key;
|
||||
void *value;
|
||||
};
|
||||
|
||||
|
||||
static INLINE struct hash_table_item *
|
||||
hash_table_item(struct cso_hash_iter iter)
|
||||
static INLINE struct util_hash_table_item *
|
||||
util_hash_table_item(struct cso_hash_iter iter)
|
||||
{
|
||||
return (struct hash_table_item *)cso_hash_iter_data(iter);
|
||||
return (struct util_hash_table_item *)cso_hash_iter_data(iter);
|
||||
}
|
||||
|
||||
|
||||
struct u_hash_table *
|
||||
u_hash_table_create(unsigned (*hash)(void *key),
|
||||
int (*compare)(void *key1, void *key2))
|
||||
struct util_hash_table *
|
||||
util_hash_table_create(unsigned (*hash)(void *key),
|
||||
int (*compare)(void *key1, void *key2))
|
||||
{
|
||||
struct u_hash_table *ht;
|
||||
struct util_hash_table *ht;
|
||||
|
||||
ht = MALLOC_STRUCT(u_hash_table);
|
||||
ht = MALLOC_STRUCT(util_hash_table);
|
||||
if(!ht)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -99,16 +99,16 @@ u_hash_table_create(unsigned (*hash)(void *key),
|
|||
|
||||
|
||||
static INLINE struct cso_hash_iter
|
||||
hash_table_find_iter(struct u_hash_table *ht,
|
||||
void *key,
|
||||
unsigned key_hash)
|
||||
util_hash_table_find_iter(struct util_hash_table *ht,
|
||||
void *key,
|
||||
unsigned key_hash)
|
||||
{
|
||||
struct cso_hash_iter iter;
|
||||
struct hash_table_item *item;
|
||||
struct util_hash_table_item *item;
|
||||
|
||||
iter = cso_hash_find(ht->cso, key_hash);
|
||||
while (!cso_hash_iter_is_null(iter)) {
|
||||
item = (struct hash_table_item *)cso_hash_iter_data(iter);
|
||||
item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
|
||||
if (!ht->compare(item->key, key))
|
||||
break;
|
||||
iter = cso_hash_iter_next(iter);
|
||||
|
|
@ -118,17 +118,17 @@ hash_table_find_iter(struct u_hash_table *ht,
|
|||
}
|
||||
|
||||
|
||||
static INLINE struct hash_table_item *
|
||||
hash_table_find_item(struct u_hash_table *ht,
|
||||
void *key,
|
||||
unsigned key_hash)
|
||||
static INLINE struct util_hash_table_item *
|
||||
util_hash_table_find_item(struct util_hash_table *ht,
|
||||
void *key,
|
||||
unsigned key_hash)
|
||||
{
|
||||
struct cso_hash_iter iter;
|
||||
struct hash_table_item *item;
|
||||
struct util_hash_table_item *item;
|
||||
|
||||
iter = cso_hash_find(ht->cso, key_hash);
|
||||
while (!cso_hash_iter_is_null(iter)) {
|
||||
item = (struct hash_table_item *)cso_hash_iter_data(iter);
|
||||
item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
|
||||
if (!ht->compare(item->key, key))
|
||||
return item;
|
||||
iter = cso_hash_iter_next(iter);
|
||||
|
|
@ -139,12 +139,12 @@ hash_table_find_item(struct u_hash_table *ht,
|
|||
|
||||
|
||||
enum pipe_error
|
||||
u_hash_table_set(struct u_hash_table *ht,
|
||||
void *key,
|
||||
void *value)
|
||||
util_hash_table_set(struct util_hash_table *ht,
|
||||
void *key,
|
||||
void *value)
|
||||
{
|
||||
unsigned key_hash;
|
||||
struct hash_table_item *item;
|
||||
struct util_hash_table_item *item;
|
||||
struct cso_hash_iter iter;
|
||||
|
||||
assert(ht);
|
||||
|
|
@ -153,14 +153,14 @@ u_hash_table_set(struct u_hash_table *ht,
|
|||
|
||||
key_hash = ht->hash(key);
|
||||
|
||||
item = hash_table_find_item(ht, key, key_hash);
|
||||
item = util_hash_table_find_item(ht, key, key_hash);
|
||||
if(item) {
|
||||
/* TODO: key/value destruction? */
|
||||
item->value = value;
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
item = MALLOC_STRUCT(hash_table_item);
|
||||
item = MALLOC_STRUCT(util_hash_table_item);
|
||||
if(!item)
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
|
|
@ -178,11 +178,11 @@ u_hash_table_set(struct u_hash_table *ht,
|
|||
|
||||
|
||||
void *
|
||||
u_hash_table_get(struct u_hash_table *ht,
|
||||
void *key)
|
||||
util_hash_table_get(struct util_hash_table *ht,
|
||||
void *key)
|
||||
{
|
||||
unsigned key_hash;
|
||||
struct hash_table_item *item;
|
||||
struct util_hash_table_item *item;
|
||||
|
||||
assert(ht);
|
||||
if (!ht)
|
||||
|
|
@ -190,7 +190,7 @@ u_hash_table_get(struct u_hash_table *ht,
|
|||
|
||||
key_hash = ht->hash(key);
|
||||
|
||||
item = hash_table_find_item(ht, key, key_hash);
|
||||
item = util_hash_table_find_item(ht, key, key_hash);
|
||||
if(!item)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -199,12 +199,12 @@ u_hash_table_get(struct u_hash_table *ht,
|
|||
|
||||
|
||||
void
|
||||
u_hash_table_remove(struct u_hash_table *ht,
|
||||
void *key)
|
||||
util_hash_table_remove(struct util_hash_table *ht,
|
||||
void *key)
|
||||
{
|
||||
unsigned key_hash;
|
||||
struct cso_hash_iter iter;
|
||||
struct hash_table_item *item;
|
||||
struct util_hash_table_item *item;
|
||||
|
||||
assert(ht);
|
||||
if (!ht)
|
||||
|
|
@ -212,11 +212,11 @@ u_hash_table_remove(struct u_hash_table *ht,
|
|||
|
||||
key_hash = ht->hash(key);
|
||||
|
||||
iter = hash_table_find_iter(ht, key, key_hash);
|
||||
iter = util_hash_table_find_iter(ht, key, key_hash);
|
||||
if(cso_hash_iter_is_null(iter))
|
||||
return;
|
||||
|
||||
item = hash_table_item(iter);
|
||||
item = util_hash_table_item(iter);
|
||||
assert(item);
|
||||
FREE(item);
|
||||
|
||||
|
|
@ -225,10 +225,10 @@ u_hash_table_remove(struct u_hash_table *ht,
|
|||
|
||||
|
||||
void
|
||||
u_hash_table_clear(struct u_hash_table *ht)
|
||||
util_hash_table_clear(struct util_hash_table *ht)
|
||||
{
|
||||
struct cso_hash_iter iter;
|
||||
struct hash_table_item *item;
|
||||
struct util_hash_table_item *item;
|
||||
|
||||
assert(ht);
|
||||
if (!ht)
|
||||
|
|
@ -236,7 +236,7 @@ u_hash_table_clear(struct u_hash_table *ht)
|
|||
|
||||
iter = cso_hash_first_node(ht->cso);
|
||||
while (!cso_hash_iter_is_null(iter)) {
|
||||
item = (struct hash_table_item *)cso_hash_take(ht->cso, cso_hash_iter_key(iter));
|
||||
item = (struct util_hash_table_item *)cso_hash_take(ht->cso, cso_hash_iter_key(iter));
|
||||
FREE(item);
|
||||
iter = cso_hash_first_node(ht->cso);
|
||||
}
|
||||
|
|
@ -244,13 +244,13 @@ u_hash_table_clear(struct u_hash_table *ht)
|
|||
|
||||
|
||||
enum pipe_error
|
||||
u_hash_table_foreach(struct u_hash_table *ht,
|
||||
util_hash_table_foreach(struct util_hash_table *ht,
|
||||
enum pipe_error (*callback)
|
||||
(void *key, void *value, void *data),
|
||||
void *data)
|
||||
{
|
||||
struct cso_hash_iter iter;
|
||||
struct hash_table_item *item;
|
||||
struct util_hash_table_item *item;
|
||||
enum pipe_error result;
|
||||
|
||||
assert(ht);
|
||||
|
|
@ -259,7 +259,7 @@ u_hash_table_foreach(struct u_hash_table *ht,
|
|||
|
||||
iter = cso_hash_first_node(ht->cso);
|
||||
while (!cso_hash_iter_is_null(iter)) {
|
||||
item = (struct hash_table_item *)cso_hash_iter_data(iter);
|
||||
item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
|
||||
result = callback(item->key, item->value, data);
|
||||
if(result != PIPE_OK)
|
||||
return result;
|
||||
|
|
@ -271,10 +271,10 @@ u_hash_table_foreach(struct u_hash_table *ht,
|
|||
|
||||
|
||||
void
|
||||
u_hash_table_destroy(struct u_hash_table *ht)
|
||||
util_hash_table_destroy(struct util_hash_table *ht)
|
||||
{
|
||||
struct cso_hash_iter iter;
|
||||
struct hash_table_item *item;
|
||||
struct util_hash_table_item *item;
|
||||
|
||||
assert(ht);
|
||||
if (!ht)
|
||||
|
|
@ -282,7 +282,7 @@ u_hash_table_destroy(struct u_hash_table *ht)
|
|||
|
||||
iter = cso_hash_first_node(ht->cso);
|
||||
while (!cso_hash_iter_is_null(iter)) {
|
||||
item = (struct hash_table_item *)cso_hash_iter_data(iter);
|
||||
item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
|
||||
FREE(item);
|
||||
iter = cso_hash_iter_next(iter);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ extern "C" {
|
|||
/**
|
||||
* Generic purpose hash table.
|
||||
*/
|
||||
struct u_hash_table;
|
||||
struct util_hash_table;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -55,38 +55,38 @@ struct u_hash_table;
|
|||
* @param hash hash function
|
||||
* @param compare should return 0 for two equal keys.
|
||||
*/
|
||||
struct u_hash_table *
|
||||
u_hash_table_create(unsigned (*hash)(void *key),
|
||||
int (*compare)(void *key1, void *key2));
|
||||
struct util_hash_table *
|
||||
util_hash_table_create(unsigned (*hash)(void *key),
|
||||
int (*compare)(void *key1, void *key2));
|
||||
|
||||
|
||||
enum pipe_error
|
||||
u_hash_table_set(struct u_hash_table *ht,
|
||||
void *key,
|
||||
void *value);
|
||||
util_hash_table_set(struct util_hash_table *ht,
|
||||
void *key,
|
||||
void *value);
|
||||
|
||||
void *
|
||||
u_hash_table_get(struct u_hash_table *ht,
|
||||
void *key);
|
||||
|
||||
|
||||
void
|
||||
u_hash_table_remove(struct u_hash_table *ht,
|
||||
util_hash_table_get(struct util_hash_table *ht,
|
||||
void *key);
|
||||
|
||||
|
||||
void
|
||||
u_hash_table_clear(struct u_hash_table *ht);
|
||||
util_hash_table_remove(struct util_hash_table *ht,
|
||||
void *key);
|
||||
|
||||
|
||||
void
|
||||
util_hash_table_clear(struct util_hash_table *ht);
|
||||
|
||||
|
||||
enum pipe_error
|
||||
u_hash_table_foreach(struct u_hash_table *ht,
|
||||
enum pipe_error (*callback)
|
||||
util_hash_table_foreach(struct util_hash_table *ht,
|
||||
enum pipe_error (*callback)
|
||||
(void *key, void *value, void *data),
|
||||
void *data);
|
||||
void *data);
|
||||
|
||||
void
|
||||
u_hash_table_destroy(struct u_hash_table *ht);
|
||||
util_hash_table_destroy(struct util_hash_table *ht);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
/**
|
||||
* Key lookup/associative container.
|
||||
*
|
||||
* Like Jose's u_hash_table, based on CSO cache code for now.
|
||||
* Like Jose's util_hash_table, based on CSO cache code for now.
|
||||
*
|
||||
* Author: Brian Paul
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ nv30_flush(struct pipe_context *pipe, unsigned flags,
|
|||
struct pipe_fence_handle **fence)
|
||||
{
|
||||
struct nv30_context *nv30 = nv30_context(pipe);
|
||||
|
||||
|
||||
if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
|
||||
BEGIN_RING(rankine, 0x1fd8, 1);
|
||||
OUT_RING (2);
|
||||
|
|
@ -37,10 +37,14 @@ nv30_is_texture_referenced( struct pipe_context *pipe,
|
|||
unsigned face, unsigned level)
|
||||
{
|
||||
/**
|
||||
* FIXME: Optimize.
|
||||
* FIXME: Return the corrent result. We can't alays return referenced
|
||||
* since it causes a double flush within the vbo module.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
|
@ -48,10 +52,14 @@ nv30_is_buffer_referenced( struct pipe_context *pipe,
|
|||
struct pipe_buffer *buf)
|
||||
{
|
||||
/**
|
||||
* FIXME: Optimize.
|
||||
* FIXME: Return the corrent result. We can't alays return referenced
|
||||
* since it causes a double flush within the vbo module.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
|
|
@ -95,4 +103,3 @@ nv30_create(struct pipe_screen *pscreen, unsigned pctx_id)
|
|||
|
||||
return &nv30->pipe;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,8 +108,7 @@ nv30_screen_surface_format_supported(struct pipe_screen *pscreen,
|
|||
switch (format) {
|
||||
case PIPE_FORMAT_Z24S8_UNORM:
|
||||
case PIPE_FORMAT_Z24X8_UNORM:
|
||||
return (front->format == PIPE_FORMAT_A8R8G8B8_UNORM)
|
||||
|| (front->format == PIPE_FORMAT_A8R8G8B8_UNORM);
|
||||
return (front->format == PIPE_FORMAT_A8R8G8B8_UNORM);
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
return (front->format == PIPE_FORMAT_R5G6B5_UNORM);
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ nv40_flush(struct pipe_context *pipe, unsigned flags,
|
|||
struct pipe_fence_handle **fence)
|
||||
{
|
||||
struct nv40_context *nv40 = nv40_context(pipe);
|
||||
|
||||
|
||||
if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
|
||||
BEGIN_RING(curie, 0x1fd8, 1);
|
||||
OUT_RING (2);
|
||||
|
|
@ -37,10 +37,14 @@ nv40_is_texture_referenced( struct pipe_context *pipe,
|
|||
unsigned face, unsigned level)
|
||||
{
|
||||
/**
|
||||
* FIXME: Optimize.
|
||||
* FIXME: Return the correct result. We can't always return referenced
|
||||
* since it causes a double flush within the vbo module.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
|
@ -48,10 +52,14 @@ nv40_is_buffer_referenced( struct pipe_context *pipe,
|
|||
struct pipe_buffer *buf)
|
||||
{
|
||||
/**
|
||||
* FIXME: Optimize.
|
||||
* FIXME: Return the correct result. We can't always return referenced
|
||||
* since it causes a double flush within the vbo module.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
|
|
@ -95,4 +103,3 @@ nv40_create(struct pipe_screen *pscreen, unsigned pctx_id)
|
|||
|
||||
return &nv40->pipe;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,18 +60,36 @@ SHARED_INCLUDES = \
|
|||
|
||||
##### TARGETS #####
|
||||
|
||||
default: symlinks depend $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
|
||||
default: symlinks subdirs depend $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
|
||||
|
||||
|
||||
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
|
||||
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) Makefile \
|
||||
$(TOP)/src/mesa/drivers/dri/Makefile.template
|
||||
$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
$(OBJECTS) $(PIPE_DRIVERS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
|
||||
$(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) \
|
||||
$(DRI_LIB_DEPS)
|
||||
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
|
||||
$(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)
|
||||
|
||||
|
||||
# If the Makefile defined SUBDIRS, run make in each
|
||||
.PHONY: subdirs
|
||||
subdirs:
|
||||
@if test -n "$(SUBDIRS)" ; then \
|
||||
for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE)) || exit 1; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
|
||||
|
||||
.PHONY: symlinks
|
||||
symlinks:
|
||||
|
||||
|
||||
depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
|
||||
@ echo "running $(MKDEP)"
|
||||
@ rm -f depend
|
||||
|
|
|
|||
|
|
@ -25,5 +25,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
||||
|
|
|
|||
|
|
@ -33,4 +33,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -32,4 +32,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -29,4 +29,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -72,4 +72,3 @@ intel_decode.o: ../intel/intel_decode.c
|
|||
|
||||
intel_tex_layout.o: ../intel/intel_tex_layout.c
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -100,6 +100,5 @@ DRI_LIB_DEPS += -ldrm_intel
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
intel_decode.o: ../intel/intel_decode.c
|
||||
intel_tex_layout.o: ../intel/intel_tex_layout.c
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
|
|||
#define OUT_BATCH(d) intel_batchbuffer_emit_dword(intel->batch, d)
|
||||
|
||||
#define OUT_RELOC(buf, read_domains, write_domain, delta) do { \
|
||||
assert((unsigned) (delta) <= buf->size); \
|
||||
assert((unsigned) (delta) < buf->size); \
|
||||
intel_batchbuffer_emit_reloc(intel->batch, buf, \
|
||||
read_domains, write_domain, delta); \
|
||||
} while (0)
|
||||
|
|
|
|||
|
|
@ -30,4 +30,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -31,4 +31,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -29,4 +29,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -66,4 +66,3 @@ include ../Makefile.template
|
|||
|
||||
#INCLUDES += -I../radeon/server
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -69,16 +69,12 @@ DRIVER_DEFINES = -DRADEON_R300
|
|||
|
||||
DRI_LIB_DEPS += $(RADEON_LDFLAGS)
|
||||
|
||||
PIPE_DRIVERS = compiler/libr300compiler.a
|
||||
SUBDIRS = compiler
|
||||
|
||||
EXTRA_MODULES = compiler/libr300compiler.a
|
||||
|
||||
|
||||
##### TARGETS #####
|
||||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
||||
# Mark the archive phony so that we always check for recompilation
|
||||
.PHONY : compiler/libr300compiler.a
|
||||
|
||||
compiler/libr300compiler.a:
|
||||
cd compiler && $(MAKE)
|
||||
|
|
|
|||
|
|
@ -76,4 +76,3 @@ DRI_LIB_DEPS += $(RADEON_LDFLAGS)
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -55,4 +55,3 @@ X86_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -33,4 +33,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -27,4 +27,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -34,4 +34,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@ SWRAST_COMMON_SOURCES = \
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -32,6 +32,4 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,4 +23,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -29,4 +29,3 @@ ASM_SOURCES =
|
|||
|
||||
include ../Makefile.template
|
||||
|
||||
symlinks:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.5
|
||||
* Version: 7.7
|
||||
*
|
||||
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
|
||||
|
|
@ -208,7 +208,7 @@ typedef enum
|
|||
VERT_RESULT_BFC0 = 13,
|
||||
VERT_RESULT_BFC1 = 14,
|
||||
VERT_RESULT_EDGE = 15,
|
||||
VERT_RESULT_VAR0 = 16 /**< shader varying */,
|
||||
VERT_RESULT_VAR0 = 16, /**< shader varying */
|
||||
VERT_RESULT_MAX = (VERT_RESULT_VAR0 + MAX_VARYING)
|
||||
} gl_vert_result;
|
||||
|
||||
|
|
@ -1917,10 +1917,10 @@ struct ati_fragment_shader
|
|||
struct atifs_instruction *Instructions[2];
|
||||
struct atifs_setupinst *SetupInst[2];
|
||||
GLfloat Constants[8][4];
|
||||
GLbitfield LocalConstDef; /** Indicates which constants have been set */
|
||||
GLbitfield LocalConstDef; /**< Indicates which constants have been set */
|
||||
GLubyte numArithInstr[2];
|
||||
GLubyte regsAssigned[2];
|
||||
GLubyte NumPasses; /** 1 or 2 */
|
||||
GLubyte NumPasses; /**< 1 or 2 */
|
||||
GLubyte cur_pass;
|
||||
GLubyte last_optype;
|
||||
GLboolean interpinp1;
|
||||
|
|
@ -1934,7 +1934,7 @@ struct ati_fragment_shader
|
|||
struct gl_ati_fragment_shader_state
|
||||
{
|
||||
GLboolean Enabled;
|
||||
GLboolean _Enabled; /** enabled and valid shader? */
|
||||
GLboolean _Enabled; /**< enabled and valid shader? */
|
||||
GLboolean Compiling;
|
||||
GLfloat GlobalConstants[8][4];
|
||||
struct ati_fragment_shader *Current;
|
||||
|
|
@ -2046,6 +2046,7 @@ struct gl_shader_program
|
|||
#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */
|
||||
#define GLSL_NOP_VERT 0x20 /**< Force no-op vertex shaders */
|
||||
#define GLSL_NOP_FRAG 0x40 /**< Force no-op fragment shaders */
|
||||
#define GLSL_USE_PROG 0x80 /**< Log glUseProgram calls */
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -390,6 +390,8 @@ get_shader_flags(void)
|
|||
flags |= GLSL_OPT;
|
||||
if (_mesa_strstr(env, "uniform"))
|
||||
flags |= GLSL_UNIFORMS;
|
||||
if (_mesa_strstr(env, "useprog"))
|
||||
flags |= GLSL_USE_PROG;
|
||||
}
|
||||
|
||||
return flags;
|
||||
|
|
@ -1524,19 +1526,32 @@ _mesa_use_program(GLcontext *ctx, GLuint program)
|
|||
}
|
||||
|
||||
/* debug code */
|
||||
if (0) {
|
||||
if (ctx->Shader.Flags & GLSL_USE_PROG) {
|
||||
GLuint i;
|
||||
_mesa_printf("Use Shader Program %u\n", shProg->Name);
|
||||
_mesa_printf("Mesa: glUseProgram(%u)\n", shProg->Name);
|
||||
for (i = 0; i < shProg->NumShaders; i++) {
|
||||
_mesa_printf(" shader %u, type 0x%x, checksum %u\n",
|
||||
const char *s;
|
||||
switch (shProg->Shaders[i]->Type) {
|
||||
case GL_VERTEX_SHADER:
|
||||
s = "vertex";
|
||||
break;
|
||||
case GL_FRAGMENT_SHADER:
|
||||
s = "fragment";
|
||||
break;
|
||||
case GL_GEOMETRY_SHADER:
|
||||
s = "geometry";
|
||||
break;
|
||||
default:
|
||||
s = "";
|
||||
}
|
||||
_mesa_printf(" %s shader %u, checksum %u\n", s,
|
||||
shProg->Shaders[i]->Name,
|
||||
shProg->Shaders[i]->Type,
|
||||
shProg->Shaders[i]->SourceChecksum);
|
||||
}
|
||||
if (shProg->VertexProgram)
|
||||
printf(" vert prog %u\n", shProg->VertexProgram->Base.Id);
|
||||
_mesa_printf(" vert prog %u\n", shProg->VertexProgram->Base.Id);
|
||||
if (shProg->FragmentProgram)
|
||||
printf(" frag prog %u\n", shProg->FragmentProgram->Base.Id);
|
||||
_mesa_printf(" frag prog %u\n", shProg->FragmentProgram->Base.Id);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue