projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote branch 'origin/7.8'
[mesa.git]
/
src
/
gallium
/
state_trackers
/
vega
/
shader.c
diff --git
a/src/gallium/state_trackers/vega/shader.c
b/src/gallium/state_trackers/vega/shader.c
index f2ec24c57ff219b59d1f108443818954bee2459c..6eef94ce7670e5384820cf28a5480d0f7eb7dba3 100644
(file)
--- a/
src/gallium/state_trackers/vega/shader.c
+++ b/
src/gallium/state_trackers/vega/shader.c
@@
-51,7
+51,7
@@
struct shader {
VGImageMode image_mode;
float constants[MAX_CONSTANTS];
VGImageMode image_mode;
float constants[MAX_CONSTANTS];
- struct pipe_
buffer
*cbuf;
+ struct pipe_
resource
*cbuf;
struct pipe_shader_state fs_state;
void *fs;
};
struct pipe_shader_state fs_state;
void *fs;
};
@@
-96,7
+96,7
@@
static void setup_constant_buffer(struct shader *shader)
{
struct vg_context *ctx = shader->context;
struct pipe_context *pipe = shader->context->pipe;
{
struct vg_context *ctx = shader->context;
struct pipe_context *pipe = shader->context->pipe;
- struct pipe_
buffer
**cbuf = &shader->cbuf;
+ struct pipe_
resource
**cbuf = &shader->cbuf;
VGint param_bytes = paint_constant_buffer_size(shader->paint);
float temp_buf[MAX_CONSTANTS];
VGint param_bytes = paint_constant_buffer_size(shader->paint);
float temp_buf[MAX_CONSTANTS];
@@
-106,12
+106,13
@@
static void setup_constant_buffer(struct shader *shader)
if (*cbuf == NULL ||
memcmp(temp_buf, shader->constants, param_bytes) != 0)
{
if (*cbuf == NULL ||
memcmp(temp_buf, shader->constants, param_bytes) != 0)
{
- pipe_
buffer
_reference(cbuf, NULL);
+ pipe_
resource
_reference(cbuf, NULL);
memcpy(shader->constants, temp_buf, param_bytes);
*cbuf = pipe_user_buffer_create(pipe->screen,
&shader->constants,
memcpy(shader->constants, temp_buf, param_bytes);
*cbuf = pipe_user_buffer_create(pipe->screen,
&shader->constants,
- sizeof(shader->constants));
+ sizeof(shader->constants),
+ PIPE_BIND_VERTEX_BUFFER);
}
ctx->pipe->set_constant_buffer(ctx->pipe, PIPE_SHADER_FRAGMENT, 0, *cbuf);
}
ctx->pipe->set_constant_buffer(ctx->pipe, PIPE_SHADER_FRAGMENT, 0, *cbuf);