projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '7.8'
[mesa.git]
/
src
/
gallium
/
drivers
/
svga
/
svga_state_constants.c
diff --git
a/src/gallium/drivers/svga/svga_state_constants.c
b/src/gallium/drivers/svga/svga_state_constants.c
index 6b0e511cec1d51554c35a7445f02a2bf55cbe21c..97c818cd379dcb1dfa69e8e47b097c42b3f3bf2d 100644
(file)
--- a/
src/gallium/drivers/svga/svga_state_constants.c
+++ b/
src/gallium/drivers/svga/svga_state_constants.c
@@
-23,7
+23,7
@@
*
**********************************************************/
*
**********************************************************/
-#include "
pipe/p
_inlines.h"
+#include "
util/u
_inlines.h"
#include "pipe/p_defines.h"
#include "svga_context.h"
#include "pipe/p_defines.h"
#include "svga_context.h"
@@
-82,7
+82,7
@@
static int emit_consts( struct svga_context *svga,
int offset,
int unit )
{
int offset,
int unit )
{
- struct pipe_
screen *screen = svga->pipe.screen
;
+ struct pipe_
transfer *transfer = NULL
;
unsigned count;
const float (*data)[4] = NULL;
unsigned i;
unsigned count;
const float (*data)[4] = NULL;
unsigned i;
@@
-91,11
+91,12
@@
static int emit_consts( struct svga_context *svga,
if (svga->curr.cb[unit] == NULL)
goto done;
if (svga->curr.cb[unit] == NULL)
goto done;
- count = svga->curr.cb[unit]->
size
/ (4 * sizeof(float));
+ count = svga->curr.cb[unit]->
width0
/ (4 * sizeof(float));
- data = (const float (*)[4])pipe_buffer_map(
screen
,
+ data = (const float (*)[4])pipe_buffer_map(
&svga->pipe
,
svga->curr.cb[unit],
svga->curr.cb[unit],
- PIPE_BUFFER_USAGE_CPU_READ);
+ PIPE_TRANSFER_READ,
+ &transfer);
if (data == NULL) {
ret = PIPE_ERROR_OUT_OF_MEMORY;
goto done;
if (data == NULL) {
ret = PIPE_ERROR_OUT_OF_MEMORY;
goto done;
@@
-109,7
+110,7
@@
static int emit_consts( struct svga_context *svga,
done:
if (data)
done:
if (data)
- pipe_buffer_unmap(
screen, svga->curr.cb[unit]
);
+ pipe_buffer_unmap(
&svga->pipe, svga->curr.cb[unit], transfer
);
return ret;
}
return ret;
}
@@
-137,7
+138,7
@@
static int emit_fs_consts( struct svga_context *svga,
for (i = 0; i < key->num_textures; i++) {
if (key->tex[i].unnormalized) {
for (i = 0; i < key->num_textures; i++) {
if (key->tex[i].unnormalized) {
- struct pipe_
texture *tex = svga->curr.texture[i]
;
+ struct pipe_
resource *tex = svga->curr.sampler_views[i]->texture
;
float data[4];
data[0] = 1.0 / (float)tex->width0;
float data[4];
data[0] = 1.0 / (float)tex->width0;